Fix phpcs
This commit is contained in:
parent
561520b44c
commit
e6c4c8082e
@ -184,7 +184,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="2">';
|
||||
print $langs->trans("BoxTitleLatestModifiedMyObjects",$max);
|
||||
print $langs->trans("BoxTitleLatestModifiedMyObjects", $max);
|
||||
print '</th>';
|
||||
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||
print '</tr>';
|
||||
@ -203,15 +203,13 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
|
||||
print '<td class="nowrap">'.$myobjectstatic->getNomUrl(1).'</td>';
|
||||
print '<td class="right nowrap">';
|
||||
print "</td>";
|
||||
print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms),'day')."</td>";
|
||||
print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms), 'day')."</td>";
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@ -468,27 +468,22 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Back to draft
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
{
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Modify
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n";
|
||||
}
|
||||
|
||||
// Validate
|
||||
if ($object->status == $object::STATUS_DRAFT)
|
||||
{
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_DRAFT) {
|
||||
if ($permissiontoadd) {
|
||||
if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").'</a>';
|
||||
@ -500,31 +495,24 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=myobject">'.$langs->trans("ToClone").'</a>'."\n";
|
||||
}
|
||||
|
||||
/*
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_ENABLED)
|
||||
{
|
||||
if ($object->status == $object::STATUS_ENABLED) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable">'.$langs->trans("Disable").'</a>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable">'.$langs->trans("Enable").'</a>'."\n";
|
||||
}
|
||||
}
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close">'.$langs->trans("Cancel").'</a>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Re-Open").'</a>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ if (! empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitm
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="2">';
|
||||
print $langs->trans("BoxTitleLatestModifiedJobPositions",$max);
|
||||
print $langs->trans("BoxTitleLatestModifiedJobPositions", $max);
|
||||
print '</th>';
|
||||
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||
print '</tr>';
|
||||
@ -281,17 +281,13 @@ if (! empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitm
|
||||
print '<td class="nowrap">'.$staticrecruitmentjobposition->getNomUrl(1, '').'</td>';
|
||||
print '<td class="right nowrap">';
|
||||
print "</td>";
|
||||
print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms),'day')."</td>";
|
||||
print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms), 'day')."</td>";
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@ -455,8 +455,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Back to draft
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>';
|
||||
@ -464,18 +463,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Modify
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n";
|
||||
}
|
||||
|
||||
// Validate
|
||||
if ($object->status == $object::STATUS_DRAFT)
|
||||
{
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_DRAFT) {
|
||||
if ($permissiontoadd) {
|
||||
if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").'</a>';
|
||||
@ -487,38 +483,29 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=recruitmentjobposition">'.$langs->trans("ToClone").'</a>'."\n";
|
||||
}
|
||||
|
||||
/*
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_ENABLED)
|
||||
{
|
||||
if ($permissiontoadd) {
|
||||
if ($object->status == $object::STATUS_ENABLED) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable">'.$langs->trans("Disable").'</a>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable">'.$langs->trans("Enable").'</a>'."\n";
|
||||
}
|
||||
}*/
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes">'.$langs->trans("Cancel").'</a>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("Re-Open").'</a>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
|
||||
{
|
||||
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user