Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2012-07-08 16:54:27 +02:00
commit be04878d4d
6 changed files with 23 additions and 20 deletions

View File

@ -106,7 +106,7 @@ foreach($workflow as $child => $parents)
{ {
foreach($actions as $action) foreach($actions as $action)
{ {
$workflowcodes[$action] = $action; $workflowcodes[$child][] = $action;
} }
} }
} }
@ -115,27 +115,29 @@ foreach($workflow as $child => $parents)
if (count($workflowcodes) > 0) if (count($workflowcodes) > 0)
{ {
foreach($workflowcodes as $code) foreach($workflowcodes as $key => $actions)
{
foreach($actions as $action)
{ {
$var = !$var; $var = !$var;
print "<tr ".$bc[$var].">\n"; print "<tr ".$bc[$var].">\n";
print "<td>".$langs->trans('desc'.$code)."</td>\n"; print "<td>".img_object('', $key).$langs->trans('desc'.$action)."</td>\n";
print '<td align="center">'; print '<td align="center">';
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
print ajax_constantonoff($code); print ajax_constantonoff($action);
} }
else else
{ {
if (! empty($conf->global->$code)) if (! empty($conf->global->$action))
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del'.$code.'">'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=del'.$action.'">';
print img_picto($langs->trans("Activated"),'switch_on'); print img_picto($langs->trans("Activated"),'switch_on');
print '</a>'; print '</a>';
} }
else else
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set'.$code.'">'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=set'.$action.'">';
print img_picto($langs->trans("Disabled"),'switch_off'); print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>'; print '</a>';
} }
@ -144,6 +146,7 @@ if (count($workflowcodes) > 0)
print '</tr>'; print '</tr>';
} }
} }
}
else else
{ {
print '<tr><td colspan="3">'.$langs->trans("ThereIsNoWorkflowToModify"); print '<tr><td colspan="3">'.$langs->trans("ThereIsNoWorkflowToModify");

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B