Work on 6.0 look and feel

This commit is contained in:
Laurent Destailleur 2017-04-01 00:35:05 +02:00
parent 93687997c9
commit 7254b54a04
6 changed files with 152 additions and 116 deletions

View File

@ -364,12 +364,19 @@ if (! empty($conf->use_javascript_ajax)) // If javascript on
$s.='<!-- Div to calendars selectors -->'."\n"; $s.='<!-- Div to calendars selectors -->'."\n";
$s.='<script type="text/javascript">' . "\n"; $s.='<script type="text/javascript">' . "\n";
$s.='jQuery(document).ready(function () {' . "\n"; $s.='jQuery(document).ready(function () {' . "\n";
$s.='jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });' . "\n"; $s.='jQuery("#check_birthday").click(function() { console.log("Toggle birthday"); jQuery(".family_birthday").toggle(); });' . "\n";
$s.='jQuery(".family_birthday").toggle();' . "\n"; $s.='jQuery(".family_birthday").toggle();' . "\n";
if ($action=="show_week" || $action=="show_month" || empty($action)) if ($action=="show_week" || $action=="show_month" || empty($action))
{ {
$s.='jQuery( "td.sortable" ).sortable({connectWith: ".sortable", placeholder: "ui-state-highlight", items: "div.movable", receive: function( event, ui ) {'; // Code to enable drag and drop
$s.='var frm=jQuery("#move_event");frm.attr("action",ui.item.find("a.cal_event").attr("href")).children("#newdate").val(jQuery(event.target).closest("div").attr("id"));frm.submit();}});'."\n"; $s.='jQuery( "div.sortable" ).sortable({connectWith: ".sortable", placeholder: "ui-state-highlight", items: "div.movable", receive: function( event, ui ) {';
// Code to submit form
$s.='console.log("submit form to record new event");';
//$s.='console.log(event.target);';
$s.='var newval = jQuery(event.target).closest("div.dayevent").attr("id");';
$s.='console.log("found parent div.dayevent with id = "+newval);';
$s.='var frm=jQuery("#move_event"); frm.attr("action",ui.item.find("a.cal_event").attr("href")).children("#newdate").val(newval);frm.submit();}';
$s.='});'."\n";
} }
$s.='});' . "\n"; $s.='});' . "\n";
$s.='</script>' . "\n"; $s.='</script>' . "\n";
@ -384,7 +391,6 @@ if (! empty($conf->use_javascript_ajax)) // If javascript on
$s.='jQuery(document).ready(function () { $s.='jQuery(document).ready(function () {
jQuery("table input[name^=\"check_ext\"]").click(function() { jQuery("table input[name^=\"check_ext\"]").click(function() {
var name = $(this).attr("name"); var name = $(this).attr("name");
jQuery(".family_ext" + name.replace("check_ext", "")).toggle(); jQuery(".family_ext" + name.replace("check_ext", "")).toggle();
}); });
});' . "\n"; });' . "\n";
@ -1007,10 +1013,10 @@ if (empty($action) || $action == 'show_month') // View by month
print $langs->trans($labelshort[$numdayinweek]); print $langs->trans($labelshort[$numdayinweek]);
} }
else print $langs->trans("Day".$numdayinweek); else print $langs->trans("Day".$numdayinweek);
print "</td>\n"; print ' </td>'."\n";
$i++; $i++;
} }
echo " </tr>\n"; echo ' </tr>'."\n";
$todayarray=dol_getdate($now,'fast'); $todayarray=dol_getdate($now,'fast');
$todaytms=dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']); $todaytms=dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']);
@ -1193,21 +1199,23 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
global $theme_datacolor; global $theme_datacolor;
global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused;
print "\n".'<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'; $dateint = sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day);
print "\n";
// Line with title of day // Line with title of day
$curtime = dol_mktime(0, 0, 0, $month, $day, $year); $curtime = dol_mktime(0, 0, 0, $month, $day, $year);
print '<table class="nobordernopadding" width="100%">'."\n"; print '<div id="dayevent_'.$dateint.'" class="dayevent tagtable centpercent nobordernopadding">'."\n";
print '<tr><td align="left" class="nowrap">'; print '<div class="tagtr"><div class="nowrap float">';
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?'; print '<a style="color: #666" href="'.DOL_URL_ROOT.'/comm/action/index.php?';
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
print $newparam; print $newparam;
print '">'; print '">';
if ($showinfo) print dol_print_date($curtime,'daytextshort'); if ($showinfo) print dol_print_date($curtime,'daytextshort');
else print dol_print_date($curtime,'%d'); else print dol_print_date($curtime,'%d');
print '</a>'; print '</a>';
print '</td><td align="right" class="nowrap">'; print '</div><div class="floatright nowrap">';
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
{ {
$newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
@ -1218,11 +1226,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print img_picto($langs->trans("NewAction"),'edit_add.png'); print img_picto($langs->trans("NewAction"),'edit_add.png');
print '</a>'; print '</a>';
} }
print '</td></tr>'."\n"; print '</div></div>'."\n";
// Line with td contains all div of each events // Line with td contains all div of each events
print '<tr height="'.$minheight.'"><td valign="top" colspan="2" class="sortable" style="padding-bottom: 2px;">'; print '<div class="tagtr">';
print '<div style="width: 100%; position: relative;">'; print '<div class="tagtd centpercent agendacell sortable">';
//$curtime = dol_mktime (0, 0, 0, $month, $day, $year); //$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array(); $i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();
@ -1242,26 +1250,26 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{ {
if ($i < $maxprint || $maxprint == 0 || ! empty($conf->global->MAIN_JS_SWITCH_AGENDA)) if ($i < $maxprint || $maxprint == 0 || ! empty($conf->global->MAIN_JS_SWITCH_AGENDA))
{ {
$keysofuserassigned=array_keys($event->userassigned); $keysofuserassigned=array_keys($event->userassigned);
$ponct=($event->date_start_in_calendar == $event->date_end_in_calendar); $ponct=($event->date_start_in_calendar == $event->date_end_in_calendar);
// Define $color (Hex string like '0088FF') and $cssclass of event // Define $color (Hex string like '0088FF') and $cssclass of event
$color=-1; $colorindex=-1; $color=-1; $colorindex=-1;
if (in_array($user->id, $keysofuserassigned)) if (in_array($user->id, $keysofuserassigned))
{ {
$nummytasks++; $cssclass='family_mytasks'; $nummytasks++; $cssclass='family_mytasks';
if (empty($cacheusers[$event->userownerid])) if (empty($cacheusers[$event->userownerid]))
{ {
$newuser=new User($db); $newuser=new User($db);
$newuser->fetch($event->userownerid); $newuser->fetch($event->userownerid);
$cacheusers[$event->userownerid]=$newuser; $cacheusers[$event->userownerid]=$newuser;
} }
//var_dump($cacheusers[$event->userownerid]->color); //var_dump($cacheusers[$event->userownerid]->color);
// We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event)
if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color;
} }
else if ($event->type_code == 'ICALEVENT') // Event come from external ical file else if ($event->type_code == 'ICALEVENT') // Event come from external ical file
{ {
@ -1352,19 +1360,25 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
// Show rect of event // Show rect of event
print "\n"; print "\n";
print '<!-- start event '.$i.' --><div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'"'; print '<!-- start event '.$i.' -->'."\n";
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'"';
//print ' style="height: 100px;'; //print ' style="height: 100px;';
//print ' position: absolute; top: 40px; width: 50%;'; //print ' position: absolute; top: 40px; width: 50%;';
//print '"'; //print '"';
print '>'; print '>';
print '<ul class="cal_event" style="'.$h.'">'; // always 1 li per ul, 1 ul per event print '<table class="centpercent cal_event'.(empty($event->transparency)?'':' cal_event_busy').'" style="'.$h;
print '<li class="cal_event" style="'.$h.'">'; print 'background: #'.$color.';';
print '<table class="cal_event'.(empty($event->transparency)?'':' cal_event_busy').'" style="'.$h; //print 'background: -webkit-gradient(linear, left top, left bottom, from(#'.dol_color_minus($color, -5).'), to(#'.dol_color_minus($color, -5).'));';
print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.dol_color_minus($color, -3).'), to(#'.dol_color_minus($color, -3).'));';
//if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));'; //if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
//else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;'; //else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;';
print ' -moz-border-radius:4px;" width="100%"><tr>'; //print ' -moz-border-radius:4px;"';
print '<td class="tdoverflow centpercent '.($nowrapontd?'nowrap ':'').'cal_event'.($event->type_code == 'BIRTHDAY'?' cal_event_birthday':'').'">'; //print 'border: 1px solid #ccc" width="100%"';
print '">';
print '<tr>';
print '<td class="tdoverflow nobottom centpercent '.($nowrapontd?'nowrap ':'').'cal_event'.($event->type_code == 'BIRTHDAY'?' cal_event_birthday':'').'">';
$daterange='';
if ($event->type_code == 'BIRTHDAY') // It's a birthday if ($event->type_code == 'BIRTHDAY') // It's a birthday
{ {
print $event->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact'); print $event->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact');
@ -1380,9 +1394,6 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
// Date // Date
if (empty($event->fulldayevent)) if (empty($event->fulldayevent))
{ {
//print '<strong>';
$daterange='';
// Show hours (start ... end) // Show hours (start ... end)
$tmpyearstart = date('Y',$event->date_start_in_calendar); $tmpyearstart = date('Y',$event->date_start_in_calendar);
$tmpmonthstart = date('m',$event->date_start_in_calendar); $tmpmonthstart = date('m',$event->date_start_in_calendar);
@ -1415,22 +1426,6 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
$daterange.=dol_print_date($event->date_end_in_calendar,'%H:%M'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user $daterange.=dol_print_date($event->date_end_in_calendar,'%H:%M'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user
} }
//print $daterange;
if ($event->type_code != 'ICALEVENT')
{
$savlabel=$event->libelle;
$event->libelle=$daterange;
//print '<strong>';
print $event->getNomUrl(0);
//print '</strong>';
$event->libelle=$savlabel;
}
else
{
print $daterange;
}
//print '</strong> ';
print " ";
} }
else else
{ {
@ -1441,9 +1436,36 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
} }
// Show title // Show title
if ($event->type_code == 'ICALEVENT') print dol_trunc($event->libelle,$maxnbofchar); $titletoshow = $daterange;
else print $event->getNomUrl(0,$maxnbofchar,'cal_event'); $titletoshow.=($titletoshow?' ':'').$event->libelle;
if ($event->type_code == 'ICALEVENT') print $titletoshow;
else
{
$savlabel=$event->libelle;
$event->libelle=$titletoshow;
print $event->getNomUrl(0,$maxnbofchar,'cal_event','',0,1);
$event->libelle=$savlabel;
}
// Loop on each assigned user
$listofusertoshow='';
$posuserassigned=0;
foreach($event->userassigned as $tmpid => $tmpdata)
{
if (! $posuserassigned && $titletoshow) $listofusertoshow.='<br>';
$posuserassigned++;
if (empty($cacheusers[$tmpid]))
{
$newuser=new User($db);
$newuser->fetch($tmpid);
$cacheusers[$tmpid]=$newuser;
}
$listofusertoshow.=$cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'valigntextbottom');
}
print $listofusertoshow;
if ($event->type_code == 'ICALEVENT') print '<br>('.dol_trunc($event->icalname,$maxnbofchar).')'; if ($event->type_code == 'ICALEVENT') print '<br>('.dol_trunc($event->icalname,$maxnbofchar).')';
// If action related to company / contact // If action related to company / contact
@ -1486,12 +1508,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print '</td>'; print '</td>';
// Status - Percent // Status - Percent
print '<td align="right" class="nowrap cal_event_right">'; $withstatus=0;
if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT') print $event->getLibStatut(3,1); if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT')
{
$withstatus=1;
if ($event->percentage >= 0) $withstatus=2;
}
print '<td class="nobottom right nowrap cal_event_right'.($withstatus >= 2 ?' cal_event_right_status':'').'">';
if ($withstatus) print $event->getLibStatut(3,1);
else print '&nbsp;'; else print '&nbsp;';
print '</td></tr></table>'; print '</td></tr></table>';
print '</li>';
print '</ul>';
print '</div><!-- end event '.$i.' -->'."\n"; print '</div><!-- end event '.$i.' -->'."\n";
$i++; $i++;
} }
@ -1533,10 +1559,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print '</script>'."\n"; print '</script>'."\n";
} }
print '</div>'; print '</div></div>'; // td tr
print '</td></tr>';
print '</table></div>'."\n"; print '</div>'; // table
print "\n";
} }

View File

@ -28,7 +28,7 @@
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
$theme_bordercolor = array(235,235,224); $theme_bordercolor = array(235,235,224);
$theme_datacolor = array(array(120,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_datacolor = array(array(136,102,136), array(140,140,180), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));

View File

@ -1670,11 +1670,22 @@ img.login, img.printer, img.entity {
.userimgatoplogin img.userphoto { /* size for user photo in login bar */ .userimgatoplogin img.userphoto { /* size for user photo in login bar */
width: 16px; width: 16px;
height: 16px; height: 16px;
border-radius: 8px;
background-size: contain;
background-size: contain;
} }
img.userphoto { /* size for user photo in lists */ img.userphoto { /* size for user photo in lists */
border-radius: 2px; border-radius: 9px;
width: 18px; width: 18px;
height: 18px; height: 18px;
background-size: contain;
vertical-align: middle;
}
img.userphotosmall { /* size for user photo in lists */
border-radius: 6px;
width: 12px;
height: 12px;
background-size: contain;
vertical-align: middle; vertical-align: middle;
} }
.span-icon-user { .span-icon-user {
@ -3271,6 +3282,7 @@ a.websitebuttonsitepreview img {
/* Module agenda */ /* Module agenda */
/* ============================================================================== */ /* ============================================================================== */
.agendacell { height: 60px; }
table.cal_month { border-spacing: 0px; } table.cal_month { border-spacing: 0px; }
table.cal_month td:first-child { border-left: 0px; } table.cal_month td:first-child { border-left: 0px; }
table.cal_month td:last-child { border-right: 0px; } table.cal_month td:last-child { border-right: 0px; }
@ -3294,18 +3306,10 @@ table.cal_month td:last-child { border-right: 0px; }
.cal_today_peruser_impair { background: #F8F8F0; } .cal_today_peruser_impair { background: #F8F8F0; }
.peruser_busy { background: #CC8888; } .peruser_busy { background: #CC8888; }
.peruser_notbusy { background: #EEDDDD; opacity: 0.5; } .peruser_notbusy { background: #EEDDDD; opacity: 0.5; }
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; min-height: 20px; }
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d));
min-height: 20px;
}
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 { 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 { padding: 4px 4px !important; }
table.cal_event td.cal_event_right { padding: 4px 4px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; }
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -moz-padding-start: 0px; -webkit-padding-start: 0px; }
li.cal_event { border: none; list-style-type: none; }
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
.cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; }
.cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; }

View File

@ -1701,14 +1701,24 @@ img.login, img.printer, img.entity {
font-weight: bold; font-weight: bold;
} }
.userimgatoplogin img.userphoto { /* size for user photo in login bar */ .userimgatoplogin img.userphoto { /* size for user photo in login bar */
border-radius: 5px; border-radius: 8px;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-size: contain;
vertical-align: text-bottom; vertical-align: text-bottom;
} }
img.userphoto { /* size for user photo in lists */ img.userphoto { /* size for user photo in lists */
border-radius: 9px;
width: 18px; width: 18px;
height: 18px; height: 18px;
background-size: contain;
vertical-align: middle;
}
img.userphotosmall { /* size for user photo in lists */
border-radius: 6px;
width: 12px;
height: 12px;
background-size: contain;
vertical-align: middle; vertical-align: middle;
} }
.span-icon-user { .span-icon-user {
@ -3366,6 +3376,7 @@ a.websitebuttonsitepreview img {
/* Module agenda */ /* Module agenda */
/* ============================================================================== */ /* ============================================================================== */
.agendacell { height: 60px; }
table.cal_month { border-spacing: 0px; } table.cal_month { border-spacing: 0px; }
table.cal_month td:first-child { border-left: 0px; } table.cal_month td:first-child { border-left: 0px; }
table.cal_month td:last-child { border-right: 0px; } table.cal_month td:last-child { border-right: 0px; }
@ -3389,18 +3400,10 @@ table.cal_month td:last-child { border-right: 0px; }
.cal_today_peruser_impair { background: #F8F8F0; } .cal_today_peruser_impair { background: #F8F8F0; }
.peruser_busy { background: #CC8888; } .peruser_busy { background: #CC8888; }
.peruser_notbusy { background: #EEDDDD; opacity: 0.5; } .peruser_notbusy { background: #EEDDDD; opacity: 0.5; }
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 3px; border-radius: 3px; table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 3px; border-radius: 3px; min-height: 20px; }
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d));
min-height: 20px;
}
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 { 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 { padding: 4px 4px !important; }
table.cal_event td.cal_event_right { padding: 4px 4px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; }
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -moz-padding-start: 0px; -webkit-padding-start: 0px; }
li.cal_event { border: none; list-style-type: none; }
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
.cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; }
.cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; }

View File

@ -2346,35 +2346,38 @@ else
print '</form>'; print '</form>';
} }
print '<div class="fichecenter"><div class="fichehalfleft">'; if ($action != 'edit')
/* {
* Documents generes print '<div class="fichecenter"><div class="fichehalfleft">';
*/ /*
$filename = dol_sanitizeFileName($object->ref); * Documents generes
$filedir = $conf->user->dir_output . "/" . dol_sanitizeFileName($object->ref); */
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $filename = dol_sanitizeFileName($object->ref);
$genallowed = $user->rights->user->user->creer; $filedir = $conf->user->dir_output . "/" . dol_sanitizeFileName($object->ref);
$delallowed = $user->rights->user->user->supprimer; $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->user->user->creer;
$var = true; $delallowed = $user->rights->user->user->supprimer;
$somethingshown = $formfile->show_documents('user', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); $var = true;
// Show links to link elements $somethingshown = $formfile->show_documents('user', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
$linktoelem = $form->showLinkToObjectBlock($object, null, null);
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); // Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, null);
print '</div><div class="fichehalfright"><div class="ficheaddleft">'; $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
// List of actions on element print '</div><div class="fichehalfright"><div class="ficheaddleft">';
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db); // List of actions on element
$somethingshown = $formactions->showactions($object, 'user', $socid); include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'user', $socid);
print '</div></div></div>';
}
if (! empty($conf->ldap->enabled) && ! empty($object->ldap_sid)) $ldap->close();
print '</div></div></div>';
if (! empty($conf->ldap->enabled) && ! empty($object->ldap_sid)) $ldap->close;
} }
} }

View File

@ -1968,7 +1968,7 @@ class User extends CommonObject
* Return a link to the user card (with optionaly the picto) * Return a link to the user card (with optionaly the picto)
* Use this->id,this->lastname, this->firstname * Use this->id,this->lastname, this->firstname
* *
* @param int $withpictoimg Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo) * @param int $withpictoimg Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small)
* @param string $option On what the link point to * @param string $option On what the link point to
* @param integer $infologin Add complete info tooltip * @param integer $infologin Add complete info tooltip
* @param integer $notooltip 1=Disable tooltip on picto and name * @param integer $notooltip 1=Disable tooltip on picto and name
@ -2074,10 +2074,10 @@ class User extends CommonObject
// Only picto // Only picto
if ($withpictoimg > 0) $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'</div>'; if ($withpictoimg > 0) $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'</div>';
// Picto must be a photo // Picto must be a photo
else $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto', 'mini', 0, 1).'</div>'; else $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).'</div>';
$result.=$picto; $result.=$picto;
} }
if (abs($withpictoimg) != 2) if ($withpictoimg > -2 && $withpictoimg != 2)
{ {
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='<div class="inline-block nopadding valignmiddle'.((! isset($this->statut) || $this->statut)?'':' strikefordisabled').($morecss?' usertext'.$morecss:'').'">'; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='<div class="inline-block nopadding valignmiddle'.((! isset($this->statut) || $this->statut)?'':' strikefordisabled').($morecss?' usertext'.$morecss:'').'">';
if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen); if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen);