New: View per user into agenda.
This commit is contained in:
parent
0cefe5af43
commit
2c46613f4a
@ -234,12 +234,13 @@ from origin/upstream and origin/pristine.
|
||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
||||
|
||||
* Edit tgz file to remove
|
||||
- ckeditor
|
||||
- phpexcel
|
||||
- tcpdf
|
||||
- htdocs/includes/ckeditor
|
||||
- htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf
|
||||
- htdocs/includes/phpexcel
|
||||
- htdocs/includes/tcpdf
|
||||
And rename file into
|
||||
dolibarr-x.y.z+dfsgw.tgz
|
||||
(x.y.z = version, w start from 1 and is increased for each new import)
|
||||
(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
|
||||
|
||||
* Staying into git root directory, run
|
||||
> git-import-orig -vv ../dolibarr-x.y.z+dfsgw.tgz
|
||||
|
||||
@ -393,17 +393,17 @@ if ($action == 'mupdate')
|
||||
$object->fetch($id);
|
||||
$shour = dol_print_date($object->datep,"%H");
|
||||
$smin = dol_print_date($object->datep, "%M");
|
||||
|
||||
|
||||
$newdate=GETPOST('newdate','alpha');
|
||||
if (empty($newdate) || strpos($newdate,'dayevent_') != 0 )
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
|
||||
$datep=dol_mktime($shour, $smin, 0, substr($newdate,13,2), substr($newdate,15,2), substr($newdate,9,4));
|
||||
if ($datep!=$object->datep)
|
||||
{
|
||||
{
|
||||
if (!empty($object->datef))
|
||||
{
|
||||
$object->datef+=$datep-$object->datep;
|
||||
@ -414,19 +414,21 @@ if ($action == 'mupdate')
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
setEventMessage($object->errors,'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$action='';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
@ -579,7 +579,6 @@ foreach ($eventarray as $daykey => $notused)
|
||||
}*/
|
||||
if ($filtert > 0)
|
||||
{
|
||||
var_dump($filtert);
|
||||
$tmpuser = new User($db);
|
||||
$tmpuser->fetch($filtert);
|
||||
$usernames[] = $tmpuser;
|
||||
@ -645,8 +644,36 @@ echo "</table>\n";
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".onclickopenref").click(function() {
|
||||
|
||||
alert(\'ee\');
|
||||
var ref=$(this).attr(\'ref\');
|
||||
var res = ref.split("_");
|
||||
var userid = res[1];
|
||||
var year = res[2];
|
||||
var month = res[3];
|
||||
var day = res[4];
|
||||
var hour = res[5];
|
||||
var min = res[6];
|
||||
var ids = res[7];
|
||||
if (ids == \'none\') /* No event */
|
||||
{
|
||||
/* alert(\'no event\'); */
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&affectedto="+userid+"&datep="+year+month+day+hour+min+"00"
|
||||
alert(url);
|
||||
window.location.href = url;
|
||||
}
|
||||
else if (ids.indexOf(",") > -1) /* There is several events */
|
||||
{
|
||||
/* alert(\'several events\'); */
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?usertodo="+userid
|
||||
alert(url);
|
||||
window.location.href = url;
|
||||
}
|
||||
else /* One event */
|
||||
{
|
||||
/* alert(\'one event\'); */
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/list.php?action=view&id="+ids
|
||||
alert(url);
|
||||
window.location.href = url;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
@ -796,28 +823,30 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
{
|
||||
if ($cases1[$h] != '')
|
||||
{
|
||||
$title = (int) $cases1[$h];
|
||||
$title1=count($cases1[$h]).' '.$langs->trans("Events");
|
||||
/*$title = $h;
|
||||
$title .= 'h';
|
||||
if ((int) $cases1[$h] != $cases1[$h])
|
||||
$title .= '30';
|
||||
else
|
||||
$title .= '00';
|
||||
$title .= '00';*/
|
||||
$string1=' ';
|
||||
$style1='peruser_busy';
|
||||
$url='<a href="" title="'.$title.'">';
|
||||
$url='<a href="" title="'.$title1.'">';
|
||||
}
|
||||
}
|
||||
if (isset($cases2[$h]))
|
||||
{
|
||||
if ($cases2[$h] != '')
|
||||
{
|
||||
$title = (int) $cases2[$h];
|
||||
/*$title = $h;
|
||||
$title .= 'h';
|
||||
if ((int) $cases2[$h] != $cases2[$h]) $title .= '30';
|
||||
else $title .= '00';
|
||||
else $title .= '00';*/
|
||||
$title2=count($cases1[$h]).' '.$langs->trans("Events");
|
||||
$string2=' ';
|
||||
$style2='peruser_busy';
|
||||
$url='<a href="" title="'.$title.'">';
|
||||
$url='<a href="" title="'.$title2.'">';
|
||||
}
|
||||
}
|
||||
|
||||
@ -828,19 +857,19 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
{
|
||||
$ids=array_keys($cases1[$h]);
|
||||
$id=$ids[0];
|
||||
$title1='zzz';
|
||||
}
|
||||
if (count($cases2[$h]) == 1) // 1 seul evenement
|
||||
if (count($cases2[$h]) == 1) // 1 seul evenement
|
||||
{
|
||||
$ids=array_keys($cases2[$h]);
|
||||
$id=$ids[0];
|
||||
$title2='bbb';
|
||||
}
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr><td class="'.$style1.' onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.$id.'"'.($title1?' title="'.$title1.'"':'').'>';
|
||||
$ids1=join(',',array_keys($cases1[$h]));
|
||||
$ids2=join(',',array_keys($cases2[$h]));
|
||||
//var_dump($cases1[$h]);
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr><td class="'.$style1.' onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.sprintf("%04d",$year).'_'.sprintf("%02d",$month).'_'.sprintf("%02d",$day).'_'.sprintf("%02d",$h).'_00_'.($ids1?$ids1:'none').'"'.($title1?' title="'.$title1.'"':'').'>';
|
||||
print $string1;
|
||||
print '</td><td class="'.$style2.' onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.$id.'"'.($title2?' title="'.$title2.'"':'').'>';
|
||||
print '</td><td class="'.$style2.' onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.sprintf("%04d",$year).'_'.sprintf("%02d",$month).'_'.sprintf("%02d",$day).'_'.sprintf("%02d",$h).'_30_'.($ids2?$ids2:'none').'"'.($title2?' title="'.$title2.'"':'').'>';
|
||||
print $string2;
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user