Fix look and feel v7
This commit is contained in:
parent
51cfb9795e
commit
479c4b4d77
@ -557,7 +557,7 @@ else
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("CronTask"), -1, 'cron');
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
@ -805,6 +805,69 @@ class Cronjob extends CommonObject
|
||||
$this->libname = '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a link to the object card (with optionaly the picto)
|
||||
*
|
||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||
* @param string $option On what the link point to ('nolink', ...)
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param string $morecss Add more css on link
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
|
||||
{
|
||||
global $db, $conf, $langs;
|
||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||
global $menumanager;
|
||||
|
||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||
|
||||
$result = '';
|
||||
$companylink = '';
|
||||
|
||||
$label = '<u>' . $langs->trans("CronJob") . '</u>';
|
||||
$label.= '<br>';
|
||||
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
|
||||
$url = DOL_URL_ROOT.'/cron/card.php?id='.$this->id;
|
||||
|
||||
if ($option != 'nolink')
|
||||
{
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
|
||||
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
|
||||
}
|
||||
|
||||
$linkclose='';
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowCronJob");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||
}
|
||||
else $linkclose = ($morecss?' class="'.$morecss.'"':'');
|
||||
|
||||
$linkstart = '<a href="'.$url.'"';
|
||||
$linkstart.=$linkclose.'>';
|
||||
$linkend='</a>';
|
||||
|
||||
$result .= $linkstart;
|
||||
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
|
||||
if ($withpicto != 2) $result.= $this->ref;
|
||||
$result .= $linkend;
|
||||
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load object information
|
||||
*
|
||||
|
||||
@ -50,7 +50,7 @@ $head = cron_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron');
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
@ -38,6 +38,7 @@ if (!$user->rights->cron->read) accessforbidden();
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=GETPOST('id','int');
|
||||
$contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'cronjoblist'; // To manage different context of search
|
||||
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@ -50,9 +51,6 @@ $pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield='t.status';
|
||||
if (! $sortorder) $sortorder='ASC';
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$contextpage='cronjoblist';
|
||||
|
||||
$status=GETPOST('status','int');
|
||||
if ($status == '') $status=-2;
|
||||
|
||||
@ -151,6 +149,7 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$cronjob = new Cronjob($db);
|
||||
|
||||
$pagetitle=$langs->trans("CronList");
|
||||
|
||||
@ -280,6 +279,9 @@ if (! empty($conf->global->CRON_WARNING_DELAY_HOURS)) $text.=$langs->trans("Warn
|
||||
print info_admin($text);
|
||||
print '<br>';
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
//$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
//$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder">';
|
||||
@ -340,19 +342,22 @@ if ($num > 0)
|
||||
if (empty($obj)) break;
|
||||
if (! verifCond($obj->test)) continue; // Discard line with test = false
|
||||
|
||||
$object->id = $obj->rowid;
|
||||
$object->ref = $obj->rowid;
|
||||
$object->label = $obj->label;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td class="nowrap">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/cron/card.php?id='.$obj->rowid.'">';
|
||||
print img_picto('', 'object_cron').' ';
|
||||
print $obj->rowid;
|
||||
print '</a>';
|
||||
print $object->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
if (! empty($obj->label))
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/cron/card.php?id='.$obj->rowid.'">'.$langs->trans($obj->label).'</a>';
|
||||
$object->ref = $obj->label;
|
||||
print $object->getNomUrl(0, '', 1);
|
||||
$object->ref = $obj->rowid;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -430,7 +435,7 @@ if ($num > 0)
|
||||
print '<td align="right" class="nowrap">';
|
||||
if ($user->rights->cron->create)
|
||||
{
|
||||
print "<a href=\"".DOL_URL_ROOT."/cron/card.php?id=".$obj->rowid."&action=edit".($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'').$param."&backtourl=".urlencode($_SERVER["PHP_SELF"])."\" title=\"".dol_escape_htmltag($langs->trans('Edit'))."\">".img_picto($langs->trans('Edit'),'edit')."</a> ";
|
||||
print "<a href=\"".DOL_URL_ROOT."/cron/card.php?id=".$obj->rowid."&action=edit".($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'').$param."&backtourl=".urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:''))."\" title=\"".dol_escape_htmltag($langs->trans('Edit'))."\">".img_picto($langs->trans('Edit'),'edit')."</a> ";
|
||||
}
|
||||
if ($user->rights->cron->delete)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user