\n";
- echo ' | ';
- $maxnbofchar=80;
- show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
- echo " | \n";
- echo "
\n";
+ //echo '';
+ echo '';
+
+ echo ' ';
+ echo ' | ';
+ echo ' '.$langs->trans("Day".$arraytimestamp['wday'])." | \n";
+ echo " \n";
+
+ /*
+ echo ' ';
+ echo '
';
+ echo '
';
+ echo show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, -1);
+ echo '
'."\n";
+ echo "
\n";
+ */
+
echo '
';
- print '';
+
+ /* WIP View per hour */
+ $useviewhour = 0;
+ if ($useviewhour)
+ {
+ print ''; // You can use div-table-responsive-no-min if you dont need reserved height for your table
+
+ $maxheightwin=(isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500)?($_SESSION["dol_screenheight"]-200):660; // Also into index.php file
+
+ echo '
';
+ echo '
';
+
+ $maxnbofchar=80;
+
+ $tmp = explode('-', $conf->global->MAIN_DEFAULT_WORKING_HOURS);
+ $minhour = round($tmp[0],0);
+ $maxhour = round($tmp[1],0);
+ if ($minhour > 23) $minhour = 23;
+ if ($maxhour < 1) $maxhour = 1;
+ if ($maxhour <= $minhour) { $maxhour = $minhour + 1; }
+
+ $i = 0;
+ $j = 0;
+ while ($i < 24)
+ {
+ echo '
'."\n";
+ echo '
'.dol_print_date($i*3600, 'hour', 'gmt').'
';
+ echo '
';
+ echo "
\n";
+ echo "
\n";
+ $i++;
+ $j++;
+ }
+
+ echo '
';
+
+ show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 1);
+
+ print '
';
+ }
+ else
+ {
+ print ''; // You can use div-table-responsive-no-min if you dont need reserved height for your table
+
+ show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 0);
+
+ print '
';
+ }
}
print "\n".'';
@@ -1213,9 +1269,10 @@ $db->close();
* @param string $newparam Parameters on current URL
* @param int $showinfo Add extended information (used by day and week view)
* @param int $minheight Minimum height for each event. 60px by default.
+ * @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button"
* @return void
*/
-function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60)
+function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $nonew=0)
{
global $user, $conf, $langs;
global $action, $filter, $filtert, $status, $actioncode; // Filters used into search form
@@ -1230,26 +1287,35 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
print ''."\n";
- print '
';
- if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
+ if ($nonew <= 0)
{
- $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
+ print '
'."\n";
+ }
+
+ if ($nonew < 0)
+ {
+ print '
';
+ return;
}
- print '
'."\n";
// Line with td contains all div of each events
print '';
@@ -1390,6 +1456,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
//print ' position: absolute; top: 40px; width: 50%;';
//print '"';
print '>';
+
//var_dump($event->userassigned);
//var_dump($event->transparency);
print '