This commit is contained in:
Laurent Destailleur 2020-07-09 11:55:16 +02:00
parent 0a708e46bf
commit 9592fdb3fc
6 changed files with 82 additions and 59 deletions

View File

@ -1174,9 +1174,9 @@ if (empty($action) || $action == 'show_month') // View by month
$newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter
$newparam .= '&viewcal=1';
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
print '</div></div>';
print '</div>';
print '<div class="div-table-responsive-no-min">';
print '<table width="100%" class="noborder nocellnopadd cal_pannel cal_month">';

View File

@ -547,9 +547,9 @@ if ($resql)
$i = 0;
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
print '</div></div>';
print '</div>';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";

View File

@ -445,9 +445,9 @@ $s = $newtitle;
print $s;
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
print '</div></div>';
print '</div>';

View File

@ -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").' &nbsp; ';
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 ' &nbsp; '.$langs->trans("or").' '.$langs->trans("ToUserOfGroup").' &nbsp; ';
else print '<br>';
print '</div>';
print '<div class="divsearchfield">';
//if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("ToUserOfGroup").' &nbsp; ';
//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").' &nbsp; ';
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', '', '&nbsp;', 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").' &nbsp; ';
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 ' &nbsp;</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>';

View File

@ -14,7 +14,7 @@ EventsNb=Number of events
ListOfActions=List of events
EventReports=Event reports
Location=Location
ToUserOfGroup=To any user in group
ToUserOfGroup=Event assigned to any user in group
EventOnFullDay=Event on all day(s)
MenuToDoActions=All incomplete events
MenuDoneActions=All terminated events

View File

@ -4432,7 +4432,7 @@ table.cal_month td:last-child { border-right: 0px; }
.cal_today_peruser_impair { background: #F8F8F0; }
.peruser_busy { }
.peruser_notbusy { opacity: 0.5; }
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; min-height: 20px; filter: saturate(0.8); }
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; min-height: 20px; filter: saturate(0.8); border-radius: 3px; }
table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
table.cal_event td.cal_event { padding: 4px 4px !important; }
table.cal_event td.cal_event_right { padding: 4px 4px !important; }