Fix label
This commit is contained in:
parent
f759b918ff
commit
f3f3b952e9
@ -70,8 +70,8 @@ if (!$user->rights->projet->lire) {
|
|||||||
$diroutputmassaction = $conf->project->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->project->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", "aZ09comma");
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST("sortorder", 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||||
// If $page is not defined, or '' or -1 or if we click on clear filters
|
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||||
@ -224,7 +224,8 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) {
|
if (GETPOST('cancel', 'alpha')) {
|
||||||
$action = 'list'; $massaction = '';
|
$action = 'list';
|
||||||
|
$massaction = '';
|
||||||
}
|
}
|
||||||
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
|
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
|
||||||
$massaction = '';
|
$massaction = '';
|
||||||
@ -349,13 +350,22 @@ if (empty($reshook)) {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$companystatic = new Societe($db);
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
$companystatic = new Societe($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
|
|
||||||
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||||
$title = $langs->trans("Projects");
|
$title = $langs->trans("LeadsOrProjects");
|
||||||
|
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||||
|
$title = $langs->trans("Projects");
|
||||||
|
}
|
||||||
|
if (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||||
|
$title = $langs->trans("Leads");
|
||||||
|
}
|
||||||
|
$morejs = array();
|
||||||
|
$morecss = array();
|
||||||
|
|
||||||
|
|
||||||
// Get list of project id allowed to user (in a string list separated by comma)
|
// Get list of project id allowed to user (in a string list separated by comma)
|
||||||
@ -863,7 +873,14 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
|
|||||||
|
|
||||||
// Fields title search
|
// Fields title search
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre">';
|
||||||
|
// Action column
|
||||||
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// Project ref
|
// Project ref
|
||||||
if (!empty($arrayfields['p.ref']['checked'])) {
|
if (!empty($arrayfields['p.ref']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
@ -1130,8 +1147,12 @@ $totalarray = array(
|
|||||||
'nbfield' => 0,
|
'nbfield' => 0,
|
||||||
'val' => array(),
|
'val' => array(),
|
||||||
);
|
);
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
if (empty($obj)) {
|
||||||
|
break; // Should not happen
|
||||||
|
}
|
||||||
|
|
||||||
$object->id = $obj->id;
|
$object->id = $obj->id;
|
||||||
$object->user_author_id = $obj->fk_user_creat;
|
$object->user_author_id = $obj->fk_user_creat;
|
||||||
@ -1512,15 +1533,17 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap center">';
|
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
print '<td class="nowrap center">';
|
||||||
$selected = 0;
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
if (in_array($obj->id, $arrayofselected)) {
|
$selected = 0;
|
||||||
$selected = 1;
|
if (in_array($object->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
@ -1534,14 +1557,26 @@ while ($i < min($num, $limit)) {
|
|||||||
// Show total line
|
// Show total line
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||||
|
|
||||||
|
// If no record found
|
||||||
|
if ($num == 0) {
|
||||||
|
$colspan = 1;
|
||||||
|
foreach ($arrayfields as $key => $val) {
|
||||||
|
if (!empty($val['checked'])) {
|
||||||
|
$colspan++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
$parameters = array('sql' => $sql);
|
$parameters = array('arrayfields'=>$arrayfields, 'sql' => $sql);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user