Look and feel v18
This commit is contained in:
parent
30e1ac2aa0
commit
be8f9f33df
@ -1501,8 +1501,9 @@ class Fichinter extends CommonObject
|
|||||||
$return .= '<div class="info-box-content">';
|
$return .= '<div class="info-box-content">';
|
||||||
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
||||||
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
if (property_exists($this, 'socid')) {
|
if (!empty($arraydata['thirdparty'])) {
|
||||||
$return .= '<br><span class="info-box-label">'.$this->socid.'</span>';
|
$tmpthirdparty = $arraydata['thirdparty'];
|
||||||
|
$return .= '<br><span class="info-box-label">'.$tmpthirdparty->getNomUrl(1).'</span>';
|
||||||
}
|
}
|
||||||
if (property_exists($this, 'duration')) {
|
if (property_exists($this, 'duration')) {
|
||||||
$return .= '<br><span class="info-box-label ">'.$langs->trans("Duration").' : '.convertSecondToTime($this->duration, 'allhourmin').'</span>';
|
$return .= '<br><span class="info-box-label ">'.$langs->trans("Duration").' : '.convertSecondToTime($this->duration, 'allhourmin').'</span>';
|
||||||
|
|||||||
@ -93,7 +93,7 @@ if (!$sortfield) {
|
|||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$object = new Fichinter($db);
|
$object = new Fichinter($db);
|
||||||
$hookmanager->initHooks(array('interventionlist'));
|
$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
@ -148,6 +148,7 @@ if ($user->socid) {
|
|||||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||||
|
|
||||||
$permissiontoread = $user->rights->ficheinter->lire;
|
$permissiontoread = $user->rights->ficheinter->lire;
|
||||||
|
$permissiontoadd = $user->rights->ficheinter->creer;
|
||||||
$permissiontodelete = $user->rights->ficheinter->supprimer;
|
$permissiontodelete = $user->rights->ficheinter->supprimer;
|
||||||
|
|
||||||
|
|
||||||
@ -213,8 +214,8 @@ if (isModEnabled('contrat')) {
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$help_url = '';
|
|
||||||
$title = $langs->trans("Interventions");
|
$title = $langs->trans("Interventions");
|
||||||
|
$help_url = '';
|
||||||
$morejs = array();
|
$morejs = array();
|
||||||
$morecss = array();
|
$morecss = array();
|
||||||
|
|
||||||
@ -250,7 +251,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
|||||||
}
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sqlfields = $sql; // $sql fields to remove for count total
|
$sqlfields = $sql; // $sql fields to remove for count total
|
||||||
@ -271,7 +272,7 @@ if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines)
|
|||||||
|
|
||||||
// Add table from hooks
|
// Add table from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($user->rights->societe->client->voir) && empty($socid)) {
|
if (empty($user->rights->societe->client->voir) && empty($socid)) {
|
||||||
@ -318,7 +319,7 @@ if ($search_all) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
// Add GroupBy from hooks
|
// Add GroupBy from hooks
|
||||||
$parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall);
|
$parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall);
|
||||||
@ -339,7 +340,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
@ -373,7 +374,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
|||||||
// Output page
|
// Output page
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
|
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
|
||||||
|
|
||||||
|
|
||||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||||
@ -394,7 +395,7 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
|||||||
$param .= '&contextpage='.urlencode($contextpage);
|
$param .= '&contextpage='.urlencode($contextpage);
|
||||||
}
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.((int) $limit);
|
||||||
}
|
}
|
||||||
if ($search_all) {
|
if ($search_all) {
|
||||||
$param .= "&search_all=".urlencode($search_all);
|
$param .= "&search_all=".urlencode($search_all);
|
||||||
@ -427,7 +428,7 @@ if ($optioncss != '') {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
// Add $param from hooks
|
// Add $param from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$param .= $hookmanager->resPrint;
|
$param .= $hookmanager->resPrint;
|
||||||
|
|
||||||
// List of mass actions available
|
// List of mass actions available
|
||||||
@ -454,7 +455,10 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
|||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
print '<input type="hidden" name="page_y" value="">';
|
||||||
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
$url = DOL_URL_ROOT.'/fichinter/card.php?action=create';
|
$url = DOL_URL_ROOT.'/fichinter/card.php?action=create';
|
||||||
@ -464,6 +468,7 @@ if (!empty($socid)) {
|
|||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||||
|
$newcardbutton .= dolGetButtonTitleSeparator();
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer);
|
$newcardbutton .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer);
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
@ -475,16 +480,19 @@ $trackid = 'int'.$object->id;
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
|
|
||||||
if ($search_all) {
|
if ($search_all) {
|
||||||
|
$setupstring = '';
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
|
$setupstring .= $key."=".$val.";";
|
||||||
}
|
}
|
||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
|
print '<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
||||||
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$moreforfilter .= $hookmanager->resPrint;
|
$moreforfilter .= $hookmanager->resPrint;
|
||||||
} else {
|
} else {
|
||||||
@ -494,22 +502,25 @@ if (empty($reshook)) {
|
|||||||
if (!empty($moreforfilter)) {
|
if (!empty($moreforfilter)) {
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|
||||||
// Fields title search
|
// Fields title search
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre center maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterButtons('left');
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -549,7 +560,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields);
|
$parameters = array('arrayfields'=>$arrayfields);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (!empty($arrayfields['f.datec']['checked'])) {
|
if (!empty($arrayfields['f.datec']['checked'])) {
|
||||||
// Date creation
|
// Date creation
|
||||||
@ -598,7 +609,7 @@ if (!empty($arrayfields['fd.duree']['checked'])) {
|
|||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre center maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterButtons();
|
$searchpicto = $form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -614,72 +625,88 @@ print '<tr class="liste_titre">';
|
|||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.ref']['checked'])) {
|
if (!empty($arrayfields['f.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.ref_client']['checked'])) {
|
if (!empty($arrayfields['f.ref_client']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.ref_client']['label'], $_SERVER["PHP_SELF"], "f.ref_client", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.ref_client']['label'], $_SERVER["PHP_SELF"], "f.ref_client", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['pr.ref']['checked'])) {
|
if (!empty($arrayfields['pr.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['c.ref']['checked'])) {
|
if (!empty($arrayfields['c.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.description']['checked'])) {
|
if (!empty($arrayfields['f.description']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (!empty($arrayfields['f.datec']['checked'])) {
|
if (!empty($arrayfields['f.datec']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.tms']['checked'])) {
|
if (!empty($arrayfields['f.tms']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.note_public']['checked'])) {
|
if (!empty($arrayfields['f.note_public']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.note_private']['checked'])) {
|
if (!empty($arrayfields['f.note_private']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.fk_statut']['checked'])) {
|
if (!empty($arrayfields['f.fk_statut']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['fd.description']['checked'])) {
|
if (!empty($arrayfields['fd.description']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], '');
|
print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], '');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['fd.date']['checked'])) {
|
if (!empty($arrayfields['fd.date']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['fd.duree']['checked'])) {
|
if (!empty($arrayfields['fd.duree']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
// Loop on record
|
// Loop on record
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
$total = 0;
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$savnbfield = $totalarray['nbfield'];
|
$savnbfield = $totalarray['nbfield'];
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$totalarray['val'] = array();
|
$totalarray['val'] = array();
|
||||||
$totalarray['val']['fd.duree'] = 0;
|
$totalarray['val']['fd.duree'] = 0;
|
||||||
|
$total = 0;
|
||||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
while ($i < $imaxinloop) {
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -706,21 +733,29 @@ while ($i < $imaxinloop) {
|
|||||||
//mode kanban
|
//mode kanban
|
||||||
if ($mode == 'kanban') {
|
if ($mode == 'kanban') {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
print '<tr><td colspan="12">';
|
print '<tr><td colspan="'.$savnbfield.'">';
|
||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
$objectstatic->duration = $obj->duree;
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
$objectstatic->socid = $companystatic->getNomUrl(1, '', 44);
|
$selected = 0;
|
||||||
|
if (in_array($object->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print $objectstatic->getKanbanView('');
|
$objectstatic->duration = $obj->duree;
|
||||||
|
$arraydata['thirdparty'] = $companystatic;
|
||||||
|
print $objectstatic->getKanbanView('', $arraydata);
|
||||||
if ($i == ($imaxinloop - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<tr class="oddeven">';
|
// Show here line of result
|
||||||
|
$j = 0;
|
||||||
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
@ -732,6 +767,9 @@ while ($i < $imaxinloop) {
|
|||||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.ref']['checked'])) {
|
if (!empty($arrayfields['f.ref']['checked'])) {
|
||||||
print "<td>";
|
print "<td>";
|
||||||
@ -906,9 +944,9 @@ while ($i < $imaxinloop) {
|
|||||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
if (!$i) {
|
||||||
if (!$i) {
|
$totalarray['nbfield']++;
|
||||||
$totalarray['nbfield']++;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
@ -958,8 +996,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
|
|||||||
$urlsource .= str_replace('&', '&', $param);
|
$urlsource .= str_replace('&', '&', $param);
|
||||||
|
|
||||||
$filedir = $diroutputmassaction;
|
$filedir = $diroutputmassaction;
|
||||||
$genallowed = $user->rights->ficheinter->lire;
|
$genallowed = $permissiontoread;
|
||||||
$delallowed = $user->rights->ficheinter->creer;
|
$delallowed = $permissiontoadd;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_interventions', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
print $formfile->showdocuments('massfilesarea_interventions', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user