Skip to content
Snippets Groups Projects
Commit e2280ce9 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

NEW Can close a project that has draft status with no need to switch it

to validate status before.
parent 4a70bb7a
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -713,34 +713,34 @@ else
if ($action != "edit" )
{
// Validate
if ($object->statut == 0 && $user->rights->projet->creer)
// Modify
if ($object->statut != 2 && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
print '<a class="butAction" href="card.php?id='.$object->id.'&action=validate">'.$langs->trans("Validate").'</a>';
print '<a class="butAction" href="card.php?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>';
}
else
{
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Validate').'</a>';
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Modify').'</a>';
}
}
// Modify
if ($object->statut != 2 && $user->rights->projet->creer)
// Validate
if ($object->statut == 0 && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
print '<a class="butAction" href="card.php?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>';
print '<a class="butAction" href="card.php?id='.$object->id.'&action=validate">'.$langs->trans("Validate").'</a>';
}
else
{
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Modify').'</a>';
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Validate').'</a>';
}
}
// Close
if ($object->statut == 1 && $user->rights->projet->creer)
if (($object->statut == 0 || $object->statut == 1) && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment