Fix look and feel v6

This commit is contained in:
Laurent Destailleur 2017-06-10 13:54:43 +02:00
parent a8e16910c0
commit 6ab47a845e
2 changed files with 34 additions and 25 deletions

View File

@ -47,12 +47,12 @@ $status=GETPOST("status",'alpha');
$type=GETPOST('type');
$optioncss = GETPOST('optioncss','alpha');
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
if (GETPOST('actioncode','array'))
if (GETPOST('actioncode','array'))
{
$actioncode=GETPOST('actioncode','array',3);
if (! count($actioncode)) $actioncode='0';
}
else
else
{
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE));
}
@ -337,11 +337,11 @@ if ($resql)
if ($pid) $nav.='<input type="hidden" name="projectid" value="'.$pid.'">';
if ($usergroup) $nav.='<input type="hidden" name="usergroup" value="'.$usergroup.'">';
print $nav;
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, -1 * $nbtotalofrecords, '', 0, $nav, '', $limit);
$moreforfilter='';
$i = 0;
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
@ -369,11 +369,11 @@ if ($resql)
print $searchpicto;
print '</td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"a.id",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder);
//if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
//if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"a.datep",$param,'','align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"a.datep2",$param,'','align="center"',$sortfield,$sortorder);
@ -392,7 +392,7 @@ if ($resql)
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
$caction=new CActionComm($db);
$arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0));
$var=true;
while ($i < min($num,$limit))
{
@ -405,15 +405,13 @@ if ($resql)
continue;
}
$actionstatic->id=$obj->id;
$actionstatic->ref=$obj->id;
$actionstatic->type_code=$obj->type_code;
$actionstatic->type_label=$obj->type_label;
$actionstatic->type_picto=$obj->type_picto;
$actionstatic->label=$obj->label;
print '<tr class="oddeven">';
// Action (type)
@ -443,7 +441,7 @@ if ($resql)
if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype];
print dol_trunc($labeltype,28);
print '</td>';
// Start date
print '<td align="center" class="nowrap">';
print dol_print_date($db->jdate($obj->dp),"dayhour");
@ -514,7 +512,7 @@ if ($resql)
print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,3,1,$datep).'</td>';
print '<td></td>';
print "</tr>\n";
$i++;
}

View File

@ -188,9 +188,9 @@ class FormActions
print load_fiche_titre($title, $buttontoaddnewevent, '');
$page=0; $param=''; $sortfield='a.datep';
$total = 0;
$total = 0;
print '<div class="div-table-responsive">';
print '<table class="noborder'.($morecss?' '.$morecss:'').'" width="100%">';
print '<tr class="liste_titre">';
@ -209,12 +209,23 @@ class FormActions
{
$ref=$action->getNomUrl(1,-1);
$label=$action->getNomUrl(0,38);
print '<tr class="oddeven">';
print '<td>'.$ref.'</td>';
print '<td>'.$label.'</td>';
print '<td>'.$action->type.'</td>';
print '<td>';
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
if ($action->type_picto) print img_picto('', $action->type_picto);
else {
if ($action->type_code == 'AC_RDV') print img_picto('', 'object_group').' ';
if ($action->type_code == 'AC_TEL') print img_picto('', 'object_phoning').' ';
if ($action->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax').' ';
if ($action->type_code == 'AC_EMAIL') print img_picto('', 'object_email').' ';
}
}
print $action->type;
print '</td>';
print '<td>'.dol_print_date($action->datep,'dayhour');
if ($action->datef)
{
@ -233,7 +244,7 @@ class FormActions
$userstatic->id = $action->author->id;
$userstatic->firstname = $action->author->firstname;
$userstatic->lastname = $action->author->lastname;
print $userstatic->getNomUrl(1);
print $userstatic->getNomUrl(1, '', 0, 0, 16, 0, '', '');
}
print '</td>';
print '<td align="right">';
@ -285,22 +296,22 @@ class FormActions
if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']);
$out='';
if (! empty($multiselect))
if (! empty($multiselect))
{
if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected);
$out.=$form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
}
else
else
{
$out.=$form->selectarray($htmlname, $arraylist, $selected);
}
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
{
$out.=info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''),1);
}
if ($nooutput) return $out;
else print $out;
return '';