New: task #11018 : Add a status "not applicable" on event
@ -25,6 +25,7 @@ For users:
|
|||||||
- New: Use autocompletion on invoice select when creating replacement
|
- New: Use autocompletion on invoice select when creating replacement
|
||||||
or credit note invoice.
|
or credit note invoice.
|
||||||
- New: task #10885: Add a week view for calendar
|
- New: task #10885: Add a week view for calendar
|
||||||
|
- New: task #11018 : Add a status "not applicable" on event
|
||||||
- Fix: Better Postgresql compatibility.
|
- Fix: Better Postgresql compatibility.
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
|
|||||||
@ -504,60 +504,69 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return label of status
|
* Return label of status
|
||||||
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
* @return string Libelle
|
* @param hidenastatus 1=Show nothing if status is "Not applicable"
|
||||||
|
* @return string String with status
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode)
|
function getLibStatut($mode,$hidenastatus=0)
|
||||||
{
|
{
|
||||||
return $this->LibStatut($this->percentage,$mode);
|
return $this->LibStatut($this->percentage,$mode,$hidenastatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return label of action status
|
* Return label of action status
|
||||||
* @param percent Percent
|
* @param percent Percent
|
||||||
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
* @return string Label
|
* @param hidenastatus 1=Show nothing if status is "Not applicable"
|
||||||
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
function LibStatut($percent,$mode)
|
function LibStatut($percent,$mode,$hidenastatus=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
if ($percent==0) return $langs->trans('StatusActionToDo').' (0%)';
|
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable');
|
||||||
|
if ($percent==0) return $langs->trans('StatusActionToDo').' (0%)';
|
||||||
if ($percent > 0 && $percent < 100) return $langs->trans('StatusActionInProcess').' ('.$percent.'%)';
|
if ($percent > 0 && $percent < 100) return $langs->trans('StatusActionInProcess').' ('.$percent.'%)';
|
||||||
if ($percent >= 100) return $langs->trans('StatusActionDone').' (100%)';
|
if ($percent >= 100) return $langs->trans('StatusActionDone').' (100%)';
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
if ($percent==0) return $langs->trans('StatusActionToDo');
|
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable');
|
||||||
|
if ($percent==0) return $langs->trans('StatusActionToDo');
|
||||||
if ($percent > 0 && $percent < 100) return $percent.'%';
|
if ($percent > 0 && $percent < 100) return $percent.'%';
|
||||||
if ($percent >= 100) return $langs->trans('StatusActionDone');
|
if ($percent >= 100) return $langs->trans('StatusActionDone');
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo');
|
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9').' '.$langs->trans('StatusNotApplicable');
|
||||||
|
if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo');
|
||||||
if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '. $percent.'%';
|
if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '. $percent.'%';
|
||||||
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone');
|
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone');
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
|
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans("Status").': '.$langs->trans('StatusNotApplicable'),'statut9');
|
||||||
if ($percent==0) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionToDo').' (0%)','statut1');
|
if ($percent==0) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionToDo').' (0%)','statut1');
|
||||||
if ($percent > 0 && $percent < 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)','statut3');
|
if ($percent > 0 && $percent < 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)','statut3');
|
||||||
if ($percent >= 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionDone').' (100%)','statut6');
|
if ($percent >= 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionDone').' (100%)','statut6');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo').' (0%)';
|
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9').' '.$langs->trans('StatusNotApplicable');
|
||||||
|
if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1').' '.$langs->trans('StatusActionToDo').' (0%)';
|
||||||
if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)';;
|
if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess'),'statut3').' '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)';;
|
||||||
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone').' (100%)';
|
if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6').' '.$langs->trans('StatusActionDone').' (100%)';
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
|
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9');
|
||||||
|
if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
|
||||||
if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess'),'statut3');
|
if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess'),'statut3');
|
||||||
if ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6');
|
if ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -871,15 +871,35 @@ if ($id)
|
|||||||
else print dol_print_date($act->datep,'day');
|
else print dol_print_date($act->datep,'day');
|
||||||
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td rowspan="2" align="center" valign="middle" width="140">'."\n";
|
print '<td rowspan="3" align="center" valign="middle" width="140">'."\n";
|
||||||
print '<form name="listactionsfilter" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="show_month">';
|
||||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||||
|
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
print '</td>';
|
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="show_week">';
|
||||||
|
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||||
|
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||||
|
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
|
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
|
print img_picto($langs->trans("ViewCal"),'object_calendarweek').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||||
|
print '</form>'."\n";
|
||||||
|
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="show_day">';
|
||||||
|
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||||
|
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||||
|
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
|
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||||
|
print img_picto($langs->trans("ViewCal"),'object_calendarday').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||||
|
print '</form>'."\n";
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
@ -889,8 +909,8 @@ if ($id)
|
|||||||
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Statut
|
// Status
|
||||||
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||||
print $act->getLibStatut(4);
|
print $act->getLibStatut(4);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -74,10 +74,9 @@ $day=GETPOST("day","int")?GETPOST("day","int"):0;
|
|||||||
$pid=GETPOST("projectid","int")?GETPOST("projectid","int"):0;
|
$pid=GETPOST("projectid","int")?GETPOST("projectid","int"):0;
|
||||||
$status=GETPOST("status");
|
$status=GETPOST("status");
|
||||||
$maxprint=GETPOST("maxprint");
|
$maxprint=GETPOST("maxprint");
|
||||||
|
if (GETPOST('viewcal')) { $action='show_month'; $day=''; } // View by month
|
||||||
if (GETPOST('viewcal')) { $action='show_month'; $day=''; } // View by month
|
if (GETPOST('viewweek')) { $action='show_week'; $week=($week?$week:date("W")); $day=($day?$day:date("d")); } // View by week
|
||||||
if (GETPOST('viewweek')) { $action='show_week'; $week=date("W"); $day=date("d");} // View by week
|
if (GETPOST('viewday')) { $action='show_day'; $day=($day?$day:date("d")); } // View by day
|
||||||
if (GETPOST('viewday')) { $action='show_day'; $day=date("d"); } // View by day
|
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
@ -152,21 +151,21 @@ if ($action=='show_week')
|
|||||||
$prev_day = $prev['prev_day'];
|
$prev_day = $prev['prev_day'];
|
||||||
$first_day = $prev['first_day'];
|
$first_day = $prev['first_day'];
|
||||||
|
|
||||||
$week = $prev['week'];
|
$week = $prev['week'];
|
||||||
|
|
||||||
$day =(int)$day;
|
$day =(int)$day;
|
||||||
$next = dol_get_next_week($day, $week, $month, $year);
|
$next = dol_get_next_week($day, $week, $month, $year);
|
||||||
$next_year = $next['year'];
|
$next_year = $next['year'];
|
||||||
$next_month = $next['month'];
|
$next_month = $next['month'];
|
||||||
$next_day = $next['day'];
|
$next_day = $next['day'];
|
||||||
|
|
||||||
// Define firstdaytoshow and lastdaytoshow
|
// Define firstdaytoshow and lastdaytoshow
|
||||||
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$first_day,$prev_year);
|
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$first_day,$prev_year);
|
||||||
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
||||||
|
|
||||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||||
|
|
||||||
$tmpday = $first_day;
|
$tmpday = $first_day;
|
||||||
}
|
}
|
||||||
if ($action=='show_day')
|
if ($action=='show_day')
|
||||||
{
|
{
|
||||||
@ -471,10 +470,10 @@ if (is_readable($color_file))
|
|||||||
if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), array(200,160,180), array(190,190,220));
|
if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), array(200,160,180), array(190,190,220));
|
||||||
|
|
||||||
// Add link to show birthdays
|
// Add link to show birthdays
|
||||||
$link='<a href="'.$_SERVER['PHP_SELF'];
|
$newparam=$param; // newparam is for birthday links
|
||||||
$newparam=$param;
|
|
||||||
$newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam);
|
$newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam);
|
||||||
if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1';
|
if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1';
|
||||||
|
$link='<a href="'.$_SERVER['PHP_SELF'];
|
||||||
$link.='?'.$newparam;
|
$link.='?'.$newparam;
|
||||||
$link.='">';
|
$link.='">';
|
||||||
if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents");
|
if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents");
|
||||||
@ -484,7 +483,13 @@ print_fiche_titre('',$link);
|
|||||||
|
|
||||||
if (empty($action) || $action == 'show_month') // View by month
|
if (empty($action) || $action == 'show_month') // View by month
|
||||||
{
|
{
|
||||||
echo '<table width="100%" class="nocellnopadd">';
|
$newparam=$param; // newparam is for birthday links
|
||||||
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
|
echo '<table width="100%" class="nocellnopadd">';
|
||||||
echo ' <tr class="liste_titre">';
|
echo ' <tr class="liste_titre">';
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < 7)
|
while ($i < 7)
|
||||||
@ -507,7 +512,7 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
{
|
{
|
||||||
$style='cal_other_month';
|
$style='cal_other_month';
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events ($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW, $maxlength, $param);
|
show_day_events ($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW, $maxlength, $newparam);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
/* Show days of the current month */
|
/* Show days of the current month */
|
||||||
@ -523,7 +528,7 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
|
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW, $maxlength, $param);
|
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW, $maxlength, $newparam);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
/* Show days after the current month (next month) */
|
/* Show days after the current month (next month) */
|
||||||
@ -531,7 +536,7 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
{
|
{
|
||||||
$style='cal_other_month';
|
$style='cal_other_month';
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW, $maxlength, $param);
|
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW, $maxlength, $newparam);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
}
|
}
|
||||||
$tmpday++;
|
$tmpday++;
|
||||||
@ -542,8 +547,12 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
}
|
}
|
||||||
elseif ($action == 'show_week') // View by week
|
elseif ($action == 'show_week') // View by week
|
||||||
{
|
{
|
||||||
//print $langs->trans("FeatureNotYetAvailable"); //Work in progress...
|
$newparam=$param; // newparam is for birthday links
|
||||||
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
echo '<table width="100%" class="nocellnopadd">';
|
echo '<table width="100%" class="nocellnopadd">';
|
||||||
echo ' <tr class="liste_titre">';
|
echo ' <tr class="liste_titre">';
|
||||||
$i=0;
|
$i=0;
|
||||||
@ -557,9 +566,9 @@ elseif ($action == 'show_week') // View by week
|
|||||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
||||||
//var_dump($eventarray);
|
//var_dump($eventarray);
|
||||||
//print $tmpday;
|
//print $tmpday;
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
|
|
||||||
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
||||||
{
|
{
|
||||||
if(($tmpday <= $max_day_in_month))
|
if(($tmpday <= $max_day_in_month))
|
||||||
@ -573,14 +582,14 @@ elseif ($action == 'show_week') // View by week
|
|||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
|
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, 0, $maxlength, $param, 1, 300);
|
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, 0, $maxlength, $newparam, 1, 300);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, 0, $maxlength, $param, 1, 300);
|
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, 0, $maxlength, $newparam, 1, 300);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
}
|
}
|
||||||
$tmpday++;
|
$tmpday++;
|
||||||
@ -591,7 +600,13 @@ elseif ($action == 'show_week') // View by week
|
|||||||
}
|
}
|
||||||
else // View by day
|
else // View by day
|
||||||
{
|
{
|
||||||
// Code to show just one day
|
$newparam=$param; // newparam is for birthday links
|
||||||
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
|
// Code to show just one day
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
$timestamp=dol_mktime(12,0,0,$month,$day,$year);
|
$timestamp=dol_mktime(12,0,0,$month,$day,$year);
|
||||||
$arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$day,$year));
|
$arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$day,$year));
|
||||||
@ -601,7 +616,7 @@ else // View by day
|
|||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events ($db, $day, $month, $year, $month, $style, $eventarray, 0, 80, $param, 1, 300);
|
show_day_events ($db, $day, $month, $year, $month, $style, $eventarray, 0, 80, $newparam, 1, 300);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
@ -616,7 +631,6 @@ llxFooter('$Date$ - $Revision$');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show event of a particular day
|
* Show event of a particular day
|
||||||
*
|
|
||||||
* @param $db Database handler
|
* @param $db Database handler
|
||||||
* @param $day Day
|
* @param $day Day
|
||||||
* @param $month Month
|
* @param $month Month
|
||||||
@ -638,12 +652,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
global $cachethirdparty, $cachecontact;
|
global $cachethirdparty, $cachecontact;
|
||||||
|
|
||||||
if ($_GET["maxprint"] == 'on') $maxPrint=0; // Force to remove limits
|
if ($_GET["maxprint"] == 'on') $maxPrint=0; // Force to remove limits
|
||||||
|
|
||||||
$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
||||||
print '<table class="nobordernopadding" width="100%">';
|
print '<table class="nobordernopadding" width="100%">';
|
||||||
print '<tr style="background: #EEEEEE"><td align="left" nowrap="nowrap">';
|
print '<tr style="background: #EEEEEE"><td align="left" nowrap="nowrap">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?';
|
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?';
|
||||||
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT);
|
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;
|
||||||
//.'&month='.$month.'&year='.$year;
|
//.'&month='.$month.'&year='.$year;
|
||||||
print '">';
|
print '">';
|
||||||
@ -780,7 +794,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// Status - Percent
|
// Status - Percent
|
||||||
print '<td align="right" nowrap="nowrap">';
|
print '<td align="right" nowrap="nowrap">';
|
||||||
if ($event->type_code != 'BIRTHDAY') print $event->getLibStatut(3);
|
if ($event->type_code != 'BIRTHDAY') print $event->getLibStatut(3,1);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
@ -313,9 +313,9 @@ class Form
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne la liste des types de comptes financiers
|
* Retourne la liste des types de comptes financiers
|
||||||
* \param selected Type pre-selectionne
|
* @param selected Type pre-selectionne
|
||||||
* \param htmlname Nom champ formulaire
|
* @param htmlname Nom champ formulaire
|
||||||
*/
|
*/
|
||||||
function select_type_comptes_financiers($selected=1,$htmlname='type')
|
function select_type_comptes_financiers($selected=1,$htmlname='type')
|
||||||
{
|
{
|
||||||
@ -347,13 +347,13 @@ class Form
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of social contributions.
|
* Return list of social contributions.
|
||||||
* \remarks Use mysoc->pays_id or mysoc->pays_code so they must be defined.
|
* Use mysoc->pays_id or mysoc->pays_code so they must be defined.
|
||||||
* \param selected Preselected type
|
* @param selected Preselected type
|
||||||
* \param htmlname Name of field in form
|
* @param htmlname Name of field in form
|
||||||
* \param useempty Set to 1 if we want an empty value
|
* @param useempty Set to 1 if we want an empty value
|
||||||
* \param maxlen Max length of text in combo box
|
* @param maxlen Max length of text in combo box
|
||||||
* \param help Add or not the admin help picto
|
* @param help Add or not the admin help picto
|
||||||
*/
|
*/
|
||||||
function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1)
|
function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1)
|
||||||
{
|
{
|
||||||
@ -2623,9 +2623,7 @@ class Form
|
|||||||
|
|
||||||
if ($d)
|
if ($d)
|
||||||
{
|
{
|
||||||
/*
|
// Show date with popup
|
||||||
* Affiche date en popup
|
|
||||||
*/
|
|
||||||
if ($conf->use_javascript_ajax && $conf->use_popup_calendar)
|
if ($conf->use_javascript_ajax && $conf->use_popup_calendar)
|
||||||
{
|
{
|
||||||
//print "e".$set_time." t ".$conf->format_date_short;
|
//print "e".$set_time." t ".$conf->format_date_short;
|
||||||
@ -2649,7 +2647,7 @@ class Form
|
|||||||
{
|
{
|
||||||
$retstring.='<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
$retstring.='<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
||||||
$base=DOL_URL_ROOT.'/lib/';
|
$base=DOL_URL_ROOT.'/lib/';
|
||||||
$retstring.=' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\',\''.$langs->defaultlang.'\');">'.img_object($langs->trans("SelectDate"),'calendar').'</button>';
|
$retstring.=' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\',\''.$langs->defaultlang.'\');">'.img_object($langs->trans("SelectDate"),'calendarday').'</button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$retstring.='<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
$retstring.='<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||||
@ -2659,40 +2657,10 @@ class Form
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Bad value of calendar";
|
print "Bad value of calendar";
|
||||||
// Calendrier popup version defaut
|
|
||||||
/*
|
|
||||||
if ($langs->defaultlang != "")
|
|
||||||
{
|
|
||||||
$retstring.='<script type="text/javascript">';
|
|
||||||
$retstring.='selectedLanguage = "'.substr($langs->defaultlang,0,2).'"';
|
|
||||||
$retstring.='</script>';
|
|
||||||
}
|
|
||||||
$retstring.='<script type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_calendar.js"></script>';
|
|
||||||
$retstring.='<input id="'.$prefix.'" type="text" name="'.$prefix.'" size="9" value="'.$formated_date.'"';
|
|
||||||
$retstring.=' onChange="dpChangeDay(\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\')"';
|
|
||||||
$retstring.='> ';
|
|
||||||
$retstring.='<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
|
||||||
$retstring.='<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
|
||||||
$retstring.='<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
|
||||||
if ($form_name =="")
|
|
||||||
{
|
|
||||||
$retstring.='<a href="javascript:showCalendar(document.forms[3].'.$prefix.')">';
|
|
||||||
$retstring.='<img style="vertical-align:middle" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/calendar.png" border="0" alt="" title="">';
|
|
||||||
$retstring.='</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$retstring.='<a href="javascript:showCalendar(document.forms[\''.$form_name.'\'].'.$prefix.')">';
|
|
||||||
$retstring.='<img style="vertical-align:middle" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/calendar.png" border="0" alt="" title="">';
|
|
||||||
$retstring.='</a>';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Show date with combo selects
|
||||||
* Show date with combo selects
|
|
||||||
*/
|
|
||||||
if (! $conf->use_javascript_ajax || ! $conf->use_popup_calendar)
|
if (! $conf->use_javascript_ajax || ! $conf->use_popup_calendar)
|
||||||
{
|
{
|
||||||
// Jour
|
// Jour
|
||||||
@ -2763,9 +2731,7 @@ class Form
|
|||||||
|
|
||||||
if ($h)
|
if ($h)
|
||||||
{
|
{
|
||||||
/*
|
// Show hour
|
||||||
* Affiche heure en select
|
|
||||||
*/
|
|
||||||
$retstring.='<select'.($disabled?' disabled="true"':'').' class="flat '.($fullday?$fullday.'hour':'').'" name="'.$prefix.'hour">';
|
$retstring.='<select'.($disabled?' disabled="true"':'').' class="flat '.($fullday?$fullday.'hour':'').'" name="'.$prefix.'hour">';
|
||||||
if ($empty) $retstring.='<option value="-1"> </option>';
|
if ($empty) $retstring.='<option value="-1"> </option>';
|
||||||
for ($hour = 0; $hour < 24; $hour++)
|
for ($hour = 0; $hour < 24; $hour++)
|
||||||
@ -2789,9 +2755,7 @@ class Form
|
|||||||
|
|
||||||
if ($m)
|
if ($m)
|
||||||
{
|
{
|
||||||
/*
|
// Show minutes
|
||||||
* Affiche min en select
|
|
||||||
*/
|
|
||||||
$retstring.='<select'.($disabled?' disabled="true"':'').' class="flat '.($fullday?$fullday.'min':'').'" name="'.$prefix.'min">';
|
$retstring.='<select'.($disabled?' disabled="true"':'').' class="flat '.($fullday?$fullday.'min':'').'" name="'.$prefix.'min">';
|
||||||
if ($empty) $retstring.='<option value="-1"> </option>';
|
if ($empty) $retstring.='<option value="-1"> </option>';
|
||||||
for ($min = 0; $min < 60 ; $min++)
|
for ($min = 0; $min < 60 ; $min++)
|
||||||
@ -2862,10 +2826,10 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function to show a form to select a duration on a page
|
* Function to show a form to select a duration on a page
|
||||||
* \param prefix prefix
|
* @param prefix prefix
|
||||||
* \param iSecond Default preselected duration (number of seconds)
|
* @param iSecond Default preselected duration (number of seconds)
|
||||||
* \param disabled Disable the combo box
|
* @param disabled Disable the combo box
|
||||||
*/
|
*/
|
||||||
function select_duration($prefix,$iSecond='',$disabled=0)
|
function select_duration($prefix,$iSecond='',$disabled=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (c) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (c) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class FormActions
|
* \class FormActions
|
||||||
* \brief Classe permettant la generation de composants html actions
|
* \brief Class to manage building of HTML components
|
||||||
*/
|
*/
|
||||||
class FormActions
|
class FormActions
|
||||||
{
|
{
|
||||||
@ -35,8 +35,8 @@ class FormActions
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur
|
* Constructor
|
||||||
* \param DB handler d'acc<EFBFBD>s base de donn<EFBFBD>e
|
* @param DB Database access handler
|
||||||
*/
|
*/
|
||||||
function FormActions($DB)
|
function FormActions($DB)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,6 +46,7 @@ ToDoActions=Incomplete events
|
|||||||
ToDoActionsFor=Incomplete events for %s
|
ToDoActionsFor=Incomplete events for %s
|
||||||
SendPropalRef=Send commercial proposal %s
|
SendPropalRef=Send commercial proposal %s
|
||||||
SendOrderRef=Send order %s
|
SendOrderRef=Send order %s
|
||||||
|
StatusNotApplicable=Not applicable
|
||||||
StatusActionToDo=To do
|
StatusActionToDo=To do
|
||||||
StatusActionDone=Complete
|
StatusActionDone=Complete
|
||||||
MyActionsAsked=Actions I have recorded
|
MyActionsAsked=Actions I have recorded
|
||||||
|
|||||||
@ -46,6 +46,7 @@ DoneAndToDoActionsFor=Liste des événements réalisés ou à faire pour %s
|
|||||||
DoneAndToDoActions=Liste des événements réalisés ou à faire
|
DoneAndToDoActions=Liste des événements réalisés ou à faire
|
||||||
SendPropalRef=Envoi proposition commerciale %s
|
SendPropalRef=Envoi proposition commerciale %s
|
||||||
SendOrderRef=Envoi commande %s
|
SendOrderRef=Envoi commande %s
|
||||||
|
StatusNotApplicable=Non applicable
|
||||||
StatusActionToDo=À faire
|
StatusActionToDo=À faire
|
||||||
StatusActionDone=Réalisé
|
StatusActionDone=Réalisé
|
||||||
StatusActionInProcess=En cours
|
StatusActionInProcess=En cours
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 223 B |
BIN
htdocs/theme/auguria/img/statut9.png
Executable file
|
After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 223 B |
BIN
htdocs/theme/eldy/img/statut9.png
Executable file
|
After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 223 B |
BIN
htdocs/theme/freelug/img/statut9.png
Executable file
|
After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 223 B |
BIN
htdocs/theme/yellow/img/statut9.png
Executable file
|
After Width: | Height: | Size: 214 B |