mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Debug v23
This commit is contained in:
@@ -2593,8 +2593,10 @@ class Form
|
||||
}
|
||||
|
||||
$out .= '<li>';
|
||||
|
||||
$userstatic->fetch($value['id']);
|
||||
$out .= $userstatic->getNomUrl(-1);
|
||||
$out .= $userstatic->getNomUrl(-4);
|
||||
|
||||
if ($i == 0) {
|
||||
$ownerid = $value['id'];
|
||||
$out .= ' (' . $langs->trans("Owner") . ')';
|
||||
@@ -7878,8 +7880,8 @@ class Form
|
||||
|
||||
// Icon calendar
|
||||
if ($disabled) {
|
||||
$retstringbutton = '<button id="' . $prefix . 'Button" type="button" class="dpInvisibleButtons">' . img_object($langs->trans("Disabled"), 'calendarday', 'class="datecallink"') . '</button>';
|
||||
$retstring = $retstringbutton . $retstring;
|
||||
$retstringbutton = '<button id="' . $prefix . 'Button" type="button" class="dpInvisibleButtons">' . img_object($langs->trans("Disabled"), 'calendarday', 'class="datecallink ui-datepicker-notrigger"') . '</button>';
|
||||
$retstring = $retstring . $retstringbutton;
|
||||
}
|
||||
|
||||
$retstring .= '</div>';
|
||||
|
||||
@@ -297,16 +297,39 @@ class FormActions
|
||||
print '<td class="nowraponall nopaddingrightimp">'.$actioncomm->getNomUrl(1, -1).'</td>';
|
||||
|
||||
// Date
|
||||
print '<td class="center nowraponall">'.dol_print_date($actioncomm->datep, 'dayhourreduceformat', 'tzuserrel');
|
||||
if ($actioncomm->datef) {
|
||||
print '<td class="center nowraponall nopaddingtopimp nopaddingbottomimp">';
|
||||
if ($actioncomm->datef) { // There is also a end date
|
||||
$tmpa = dol_getdate($actioncomm->datep);
|
||||
$tmpb = dol_getdate($actioncomm->datef);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
|
||||
// The same day
|
||||
if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) {
|
||||
print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel');
|
||||
print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel');
|
||||
print '<br><span class="small opacitymedium">';
|
||||
print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel');
|
||||
print '-'.dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel');
|
||||
print '</span>';
|
||||
} else {
|
||||
print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel');
|
||||
print '<br><span class="small opacitymedium">';
|
||||
print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel');
|
||||
print '</span>';
|
||||
}
|
||||
} else {
|
||||
print '-'.dol_print_date($actioncomm->datef, 'dayhourreduceformat', 'tzuserrel');
|
||||
// Not the same day
|
||||
print '<div class="center inline-block">';
|
||||
print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel');
|
||||
print '<br><span class="small opacitymedium">';
|
||||
print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel');
|
||||
print '</span>';
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print '<div class="center inline-block">';
|
||||
print dol_print_date($actioncomm->datef, 'dayreduceformat', 'tzuserrel');
|
||||
print '<br><span class="small opacitymedium">';
|
||||
print dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel');
|
||||
print '</span>';
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -2399,6 +2399,61 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
|
||||
$out .= '</td>';
|
||||
|
||||
// Date
|
||||
$out .= '<td class="center nowraponall nopaddingtopimp nopaddingbottomimp">';
|
||||
if ($histo[$key]['dateend']) { // There is also a end date
|
||||
$tmpa = dol_getdate($histo[$key]['datestart']);
|
||||
$tmpb = dol_getdate($histo[$key]['dateend']);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
|
||||
// The same day
|
||||
if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) {
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel');
|
||||
$out .= '<br><span class="small opacitymedium">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel');
|
||||
$out .= '-'.dol_print_date($histo[$key]['dateend'], 'hourreduceformat', 'tzuserrel');
|
||||
$out .= '</span>';
|
||||
} else {
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel');
|
||||
$out .= '<br><span class="small opacitymedium">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel');
|
||||
$out .= '</span>';
|
||||
}
|
||||
} else {
|
||||
// Not the same day
|
||||
$out .= '<div class="center inline-block">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel');
|
||||
$out .= '<br><span class="small opacitymedium">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel');
|
||||
$out .= '</span>';
|
||||
$out .= '</div>';
|
||||
$out .= ' ';
|
||||
$out .= '<div class="center inline-block">';
|
||||
$out .= dol_print_date($histo[$key]['dateend'], 'dayreduceformat', 'tzuserrel');
|
||||
$out .= '<br><span class="small opacitymedium">';
|
||||
$out .= dol_print_date($histo[$key]['dateend'], 'hourreduceformat', 'tzuserrel');
|
||||
$out .= '</span>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
}
|
||||
// Add the late warning
|
||||
$late = 0;
|
||||
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
|
||||
$late = 1;
|
||||
}
|
||||
if ($histo[$key]['percent'] == 0 && !$histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
|
||||
$late = 1;
|
||||
}
|
||||
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) {
|
||||
$late = 1;
|
||||
}
|
||||
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && !$histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
|
||||
$late = 1;
|
||||
}
|
||||
if ($late) {
|
||||
$out .= img_warning($langs->trans("Late")) . ' ';
|
||||
}
|
||||
$out .= '</td>';
|
||||
|
||||
/*
|
||||
$out .= '<td class="center nowraponall">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel');
|
||||
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) {
|
||||
@@ -2410,6 +2465,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
|
||||
$out .= '-' . dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel');
|
||||
}
|
||||
}
|
||||
// Add the late warning
|
||||
$late = 0;
|
||||
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
|
||||
$late = 1;
|
||||
@@ -2427,6 +2483,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
|
||||
$out .= img_warning($langs->trans("Late")) . ' ';
|
||||
}
|
||||
$out .= "</td>\n";
|
||||
*/
|
||||
|
||||
// Author of event
|
||||
$out .= '<td class="tdoverflowmax125">';
|
||||
|
||||
@@ -6078,12 +6078,17 @@ img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
select.ui-datepicker-year {
|
||||
margin-left: 2px !important;
|
||||
}
|
||||
.ui-datepicker-trigger {
|
||||
.ui-datepicker-trigger, .ui-datepicker-notrigger {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
.ui-datepicker-notrigger {
|
||||
cursor: default;
|
||||
}
|
||||
.ui-datepicker-trigger {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*
|
||||
.bodyline {
|
||||
|
||||
@@ -5948,12 +5948,18 @@ img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
select.ui-datepicker-year {
|
||||
margin-left: 2px !important;
|
||||
}
|
||||
.ui-datepicker-trigger {
|
||||
.ui-datepicker-trigger, .ui-datepicker-notrigger {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
.ui-datepicker-notrigger {
|
||||
cursor: default;
|
||||
}
|
||||
.ui-datepicker-trigger {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*
|
||||
.bodyline {
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -3113,7 +3113,7 @@ class User extends CommonObject
|
||||
* Return a HTML link to the user card (with optionally the picto)
|
||||
* 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, -3=Only photo very small)
|
||||
* @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, -4=Include photo very small into link)
|
||||
* @param string $option On what the link point to ('leave', 'accountancy', 'nolink', )
|
||||
* @param integer $infologin 0=Add default info tooltip, 1=Add complete info tooltip, -1=No info tooltip
|
||||
* @param integer $notooltip 1=Disable tooltip on picto and name
|
||||
@@ -3205,7 +3205,7 @@ class User extends CommonObject
|
||||
$result .= (($option == 'nolink') ? '' : $linkstart);
|
||||
if ($withpictoimg) {
|
||||
$paddafterimage = '';
|
||||
if (abs((int) $withpictoimg) == 1) {
|
||||
if (abs((int) $withpictoimg) == 1 || abs((int) $withpictoimg) == 4) {
|
||||
$paddafterimage = 'style="margin-'.($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right').': 3px;"';
|
||||
}
|
||||
// Only picto
|
||||
@@ -3213,11 +3213,11 @@ class User extends CommonObject
|
||||
$picto = '<!-- picto user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'"><div class="valignmiddle userphoto inline-block center marginrightonlyshort"'.($paddafterimage ? ' '.$paddafterimage : '').'>'.img_object('', 'user', 'class=""', 0, 0, $notooltip ? 0 : 1).'</div></span>';
|
||||
} else {
|
||||
// Picto must be a photo
|
||||
$picto = '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1).'</span>';
|
||||
$picto = '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.(($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1).'</span>';
|
||||
}
|
||||
$result .= $picto;
|
||||
}
|
||||
if ($withpictoimg > -2 && $withpictoimg != 2) {
|
||||
if ($withpictoimg == -4 || ($withpictoimg > -2 && $withpictoimg != 2)) {
|
||||
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
||||
$result .= '<span class="nopadding usertext'.((!isset($this->status) || $this->status) ? '' : ' strikefordisabled').($morecss ? ' '.$morecss : '').'">';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user