|
|
|
|
@@ -66,41 +66,48 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
|
|
|
|
print '<input type="hidden" name="action" value="'.$action.'">';
|
|
|
|
|
print '<input type="hidden" name="search_showbirthday" value="'.$showbirthday.'">';
|
|
|
|
|
|
|
|
|
|
print '<div class="fichecenter">';
|
|
|
|
|
//print '<div class="fichecenter">';
|
|
|
|
|
|
|
|
|
|
if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">';
|
|
|
|
|
else print '<table class="nobordernopadding centpercent"><tr><td class="borderright">';
|
|
|
|
|
//if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">';
|
|
|
|
|
//else print '<table class="nobordernopadding centpercent"><tr><td class="borderright">';
|
|
|
|
|
|
|
|
|
|
print '<table class="nobordernopadding centpercent tableforfield">';
|
|
|
|
|
//print '<table class="nobordernopadding centpercent tableforfield">';
|
|
|
|
|
|
|
|
|
|
if ($canedit)
|
|
|
|
|
{
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
// Type
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
print $langs->trans("Type");
|
|
|
|
|
print '</td><td class="nowraponall">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;"></span>';
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("Type").'</span>';
|
|
|
|
|
//print '</td><td class="nowraponall">';
|
|
|
|
|
$multiselect = 0;
|
|
|
|
|
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
|
|
|
|
|
{
|
|
|
|
|
$multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
|
|
|
|
|
}
|
|
|
|
|
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;"></span>';
|
|
|
|
|
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
|
|
|
|
// Assigned to
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
print $langs->trans("ActionsToDoBy").' ';
|
|
|
|
|
print '</td><td>';
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'user', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("ActionsToDoBy").'</span>';
|
|
|
|
|
//print '</td><td>';
|
|
|
|
|
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500');
|
|
|
|
|
if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("or").' '.$langs->trans("ToUserOfGroup").' ';
|
|
|
|
|
else print '<br>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("ToUserOfGroup").' ';
|
|
|
|
|
//else print '<br>';
|
|
|
|
|
print img_picto('', 'object_group', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("ToUserOfGroup").'</span>';
|
|
|
|
|
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
|
|
|
|
if ($conf->resource->enabled)
|
|
|
|
|
{
|
|
|
|
|
@@ -108,25 +115,29 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
|
|
|
|
$formresource = new FormResource($db);
|
|
|
|
|
|
|
|
|
|
// Resource
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
print $langs->trans("Resource");
|
|
|
|
|
print '</td><td class="nowraponall">';
|
|
|
|
|
print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("Resource").'</span>';
|
|
|
|
|
//print '</td><td class="nowraponall">';
|
|
|
|
|
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
|
|
|
|
{
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
print $langs->trans("ThirdParty").' ';
|
|
|
|
|
print '</td><td class="nowraponall">';
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'company', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("ThirdParty").'</span>';
|
|
|
|
|
//print '</td><td class="nowraponall">';
|
|
|
|
|
print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty($conf->projet->enabled) && $user->rights->projet->lire)
|
|
|
|
|
@@ -134,34 +145,41 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
|
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
|
|
|
|
$formproject = new FormProjets($db);
|
|
|
|
|
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
print $langs->trans("Project").' ';
|
|
|
|
|
print '</td><td class="nowraponall">';
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'project', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("Project").'</span>';
|
|
|
|
|
//print '</td><td class="nowraponall">';
|
|
|
|
|
print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"]))
|
|
|
|
|
{
|
|
|
|
|
// Status
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
print $langs->trans("Status");
|
|
|
|
|
print ' </td><td class="nowraponall">';
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'setup', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("Status").'</span>';
|
|
|
|
|
//print '</td><td class="nowraponall">';
|
|
|
|
|
$formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($canedit && $action == 'show_peruser')
|
|
|
|
|
{
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
// Filter on hours
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">'.$langs->trans("VisibleTimeRange").'</td>';
|
|
|
|
|
print "<td class='nowrap'>";
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'clock', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("VisibleTimeRange").'</span>';
|
|
|
|
|
//print '</td>';
|
|
|
|
|
//print "<td class='nowrap'>";
|
|
|
|
|
print "\n".'<div class="ui-grid-a inline-block"><div class="ui-block-a">';
|
|
|
|
|
print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">';
|
|
|
|
|
if (empty($conf->dol_use_jmobile)) print ' - ';
|
|
|
|
|
@@ -169,30 +187,35 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
|
|
|
|
print '<input type="number" class="short" name="end_h" value="'.$end_h.'" min="1" max="24">';
|
|
|
|
|
if (empty($conf->dol_use_jmobile)) print ' '.$langs->trans("H");
|
|
|
|
|
print '</div></div>';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
|
|
|
|
// Filter on days
|
|
|
|
|
print '<tr>';
|
|
|
|
|
print '<td class="nowrap">'.$langs->trans("VisibleDaysRange").'</td>';
|
|
|
|
|
print "<td class='nowrap'>";
|
|
|
|
|
print '<div class="divsearchfield">';
|
|
|
|
|
//print '<tr>';
|
|
|
|
|
//print '<td class="nowrap">';
|
|
|
|
|
print img_picto('', 'clock', 'class="fawidth30 inline-block"');
|
|
|
|
|
print '<span class="hideonsmartphone">'.$langs->trans("VisibleDaysRange").'</span>';
|
|
|
|
|
//print '</td>';
|
|
|
|
|
//print "<td class='nowrap'>";
|
|
|
|
|
print "\n".'<div class="ui-grid-a inline-block"><div class="ui-block-a">';
|
|
|
|
|
print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">';
|
|
|
|
|
if (empty($conf->dol_use_jmobile)) print ' - ';
|
|
|
|
|
else print '</div><div class="ui-block-b">';
|
|
|
|
|
print '<input type="number" class="short" name="end_d" value="'.$end_d.'" min="1" max="7">';
|
|
|
|
|
print '</div></div>';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
//print '</td></tr>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Hooks
|
|
|
|
|
$parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid);
|
|
|
|
|
$reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
//print '</table>';
|
|
|
|
|
|
|
|
|
|
if ($conf->browser->layout == 'phone') print '</div>';
|
|
|
|
|
else print '</td>';
|
|
|
|
|
//if ($conf->browser->layout == 'phone') print '</div>';
|
|
|
|
|
//else print '</td>';
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
if ($conf->browser->layout == 'phone') print '<div class="fichehalfright">';
|
|
|
|
|
@@ -208,9 +231,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
|
|
|
|
if ($conf->browser->layout == 'phone') print '</div>';
|
|
|
|
|
else print '</td>';
|
|
|
|
|
*/
|
|
|
|
|
if ($conf->browser->layout != 'phone') print '</tr></table>';
|
|
|
|
|
//if ($conf->browser->layout != 'phone') print '</tr></table>';
|
|
|
|
|
|
|
|
|
|
print '</div>'; // Close fichecenter
|
|
|
|
|
//print '</div>'; // Close fichecenter
|
|
|
|
|
print '<div style="clear:both"></div>';
|
|
|
|
|
|
|
|
|
|
//print '</form>';
|
|
|
|
|
|