NEW List of user in agenda view per user show photo thumb

This commit is contained in:
Laurent Destailleur 2016-04-23 16:51:22 +02:00
parent b639849a47
commit 00a658143d
8 changed files with 49 additions and 31 deletions

View File

@ -937,7 +937,7 @@ if ($id > 0)
print '<table class="border" width="100%">';
// Ref
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
// Type of event
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
@ -951,7 +951,7 @@ if ($id > 0)
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$object->label.'"></td></tr>';
// Full day event
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent?' checked':'').'></td></tr>';
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent?' checked':'').'></td></tr>';
// Date start
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td colspan="3">';
@ -1090,7 +1090,7 @@ if ($id > 0)
// Thirdparty - Contact
if ($conf->societe->enabled)
{
print '<tr><td class="titlefield">'.$langs->trans("ActionOnCompany").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ActionOnCompany").'</td>';
print '<td>';
print '<div class="maxwidth200onsmartphone">';
$events=array();
@ -1115,7 +1115,7 @@ if ($id > 0)
$langs->load("projects");
print '<tr><td class="titlefield">'.$langs->trans("Project").'</td><td colspan="3">';
print '<tr><td class="titlefieldcreate">'.$langs->trans("Project").'</td><td colspan="3">';
$numprojet=$formproject->select_projects($object->socid, $object->fk_project, 'projectid');
if ($numprojet==0)
{
@ -1125,7 +1125,7 @@ if ($id > 0)
}
// Priority
print '<tr><td class="titlefield nowrap">'.$langs->trans("Priority").'</td><td colspan="3">';
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("Priority").'</td><td colspan="3">';
print '<input type="text" name="priority" value="'.($object->priority?$object->priority:'').'" size="5">';
print '</td></tr>';

View File

@ -360,6 +360,7 @@ $showextcals=$listofextcals;
if (! empty($conf->use_javascript_ajax)) // If javascript on
{
$s.='<!-- Div to calendars selectors -->'."\n";
$s.='<script type="text/javascript">' . "\n";
$s.='jQuery(document).ready(function () {' . "\n";
$s.='jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });' . "\n";
@ -373,7 +374,7 @@ if (! empty($conf->use_javascript_ajax)) // If javascript on
$s.='</script>' . "\n";
// Local calendar
$s.='<div class="nowrap clear float"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> ' . $langs->trans("LocalAgenda").' &nbsp; </div>';
$s.='<div class="nowrap clear float minheight20"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> ' . $langs->trans("LocalAgenda").' &nbsp; </div>';
// External calendars
if (is_array($showextcals) && count($showextcals) > 0)

View File

@ -306,10 +306,11 @@ if ($resql)
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);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ActionsOwnedBy"),$_SERVER["PHP_SELF"],"",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder);
print_liste_field_titre("");
print "</tr>\n";
print '<tr class="liste_titre">';
@ -329,9 +330,12 @@ if ($resql)
print '<td class="liste_titre"></td>';
//print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</td>';
print '<td></td>';
// Action column
print '<td class="liste_titre" align="middle">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
print '</td>';
print "</tr>\n";
$contactstatic = new Contact($db);
@ -371,7 +375,7 @@ if ($resql)
{
$labeltype=$obj->type_code;
if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype];
print '<td>'.dol_trunc($labeltype,24).'</td>';
print '<td>'.dol_trunc($labeltype,28).'</td>';
}
// Start date
@ -397,7 +401,7 @@ if ($resql)
$societestatic->id=$obj->socid;
$societestatic->client=$obj->client;
$societestatic->name=$obj->societe;
print $societestatic->getNomUrl(1,'',10);
print $societestatic->getNomUrl(1,'',28);
}
else print '&nbsp;';
print '</td>';
@ -409,7 +413,7 @@ if ($resql)
$contactstatic->lastname=$obj->lastname;
$contactstatic->firstname=$obj->firstname;
$contactstatic->id=$obj->fk_contact;
print $contactstatic->getNomUrl(1,'',10);
print $contactstatic->getNomUrl(1,'',28);
}
else
{
@ -430,6 +434,8 @@ if ($resql)
// Status/Percent
print '<td align="right" class="nowrap">'.$actionstatic->LibStatut($obj->percent,6).'</td>';
print '<td></td>';
print "</tr>\n";
$i++;
}

View File

@ -420,7 +420,7 @@ if ($filtert > 0 || $usergroup > 0)
$sql.= ' ORDER BY fk_user_action, datep'; //fk_user_action
//print $sql;
dol_syslog("comm/action/index.php", LOG_DEBUG);
dol_syslog("comm/action/peruser.php", LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
{
@ -703,7 +703,9 @@ foreach ($usernames as $username)
{
$var = ! $var;
echo "<tr>";
echo '<td class="cal_current_month cal_peruserviewname'.($var?' cal_impair':'').'">' . $username->getNomUrl(1). '</td>';
echo '<td class="cal_current_month cal_peruserviewname'.($var?' cal_impair':'').'">';
print $username->getNomUrl(-1,'',0,0,24,1,'');
print '</td>';
$tmpday = $sav;
// Lopp on each day of week

View File

@ -65,7 +65,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '<div class="fichecenter">';
if (! empty($conf->browser->phone)) print '<div class="fichehalfleft">';
else print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap borderright">';
else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">';
print '<table class="nobordernopadding">';
@ -74,7 +74,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("ActionsToDoBy").' &nbsp; ';
print '</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
print '</td><td class="maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
print $form->select_dolusers($filtert, 'usertodo', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
if (empty($conf->dol_optimize_smallscreen)) print ' &nbsp; '.$langs->trans("or") . ' '.$langs->trans("ToUserOfGroup").' &nbsp; ';
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit);
@ -95,14 +95,6 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
}
print $formactions->select_type_actions($actioncode, "actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), 0, $multiselect);
print '</td></tr>';
// Status
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("Status");
print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
$formactions->form_select_status_action('formaction',$status,1,'status',1,2);
print '</td></tr>';
}
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
@ -128,6 +120,17 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '</td></tr>';
}
if ($canedit)
{
// Status
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("Status");
print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
$formactions->form_select_status_action('formaction',$status,1,'status',1,2);
print '</td></tr>';
}
if ($canedit && $action == 'show_peruser')
{
// Filter on hours

View File

@ -54,7 +54,9 @@ $userstatic=new User($db);
<!-- BEGIN PHP TEMPLATE CONTACTS -->
<div class="tagtable centpercent noborder allwidth">
<?php if ($permission) { ?>
<?php
if ($permission) {
?>
<form class="tagtr liste_titre">
<div class="tagtd"><?php echo $langs->trans("Nature"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ThirdParty"); ?></div>
@ -132,10 +134,12 @@ $userstatic=new User($db);
</div>
</form>
<?php }
} ?>
<?php
}
}
?>
<form class="tagtr liste_titre">
<form class="tagtr liste_titre formnoborder">
<div class="tagtd"><?php echo $langs->trans("Nature"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ThirdParty"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Users").'/'.$langs->trans("Contacts"); ?></div>

View File

@ -582,6 +582,7 @@ div.myavailability {
.maxwidth400 { max-width: 400px; }
.maxwidth500 { max-width: 500px; }
.minheight20 { min-height: 20px; }
.minheight40 { min-height: 40px; }
.titlefield { width: 25%; }
.titlefieldcreate { width: 20%; }
@ -2204,7 +2205,7 @@ table.liste, table.noborder, table.formdoc, div.noborder {
-webkit-border-radius: 0.2em;
border-radius: 0.2em;*/
}
#tablelines tr.liste_titre td, tr.liste_titre.trnoborder td {
#tablelines tr.liste_titre td, form.formnoborder div, tr.liste_titre.trnoborder td {
border-top-width: 1px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;

View File

@ -580,6 +580,7 @@ div.myavailability {
.maxwidth400 { max-width: 400px; }
.maxwidth500 { max-width: 500px; }
.minheight20 { min-height: 20px; }
.minheight40 { min-height: 40px; }
.titlefield { width: 30%; }
.titlefieldcreate { width: 20%; }
@ -2074,7 +2075,7 @@ table.liste, table.noborder, table.formdoc, div.noborder {
-webkit-border-radius: 0.1em;
border-radius: 0.1em;
}
#tablelines tr.liste_titre td, tr.liste_titre.trnoborder td {
#tablelines tr.liste_titre td, form.formnoborder, tr.liste_titre.trnoborder td {
border-top-width: 1px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;