Selaa lähdekoodia

calendar view fixes

szollosil 1 vuosi sitten
vanhempi
sitoutus
64f598e040
1 muutettua tiedostoa jossa 10 lisäystä ja 5 poistoa
  1. 10 5
      comm/action/index.php

+ 10 - 5
comm/action/index.php

@@ -60,7 +60,7 @@ $showbirthday = empty($conf->use_javascript_ajax) ? GETPOST("showbirthday", "int
 
 // If not choice done on calendar owner (like on left menu link "Agenda"), we filter on user.
 if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) {
-	$filtert = $user->id;
+	//$filtert = $user->id;
 }
 
 $newparam = '';
@@ -97,7 +97,7 @@ if (empty($user->rights->agenda->allactions->read)) {
 	$canedit = 0;
 }
 if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') {  // If no permission to see all, we show only affected to me
-	$filtert = $user->id;
+	//$filtert = $user->id;
 }
 
 $action = GETPOST('action', 'aZ09');
@@ -788,7 +788,7 @@ if ($filtert > 0 || $usergroup > 0) {
 // Sort on date
 $sql .= " AND ca.code = 'AC_EVENT'";
 $sql .= ' ORDER BY datep';
-//print $sql;
+print $sql;
 
 dol_syslog("comm/action/index.php", LOG_DEBUG);
 $resql = $db->query($sql);
@@ -1920,6 +1920,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
 					print '<td class="tdoverflow nobottom centpercent '.($nowrapontd ? 'nowrap ' : '').'cal_event'.($event->type_code == 'BIRTHDAY' ? ' cal_event_birthday' : '').'">';
 
 					$daterange = '';
+					$fulldaterange = '';
 
 					if ($event->type_code == 'BIRTHDAY') { 			// It's birthday calendar
 						print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'birthday', 'contact');
@@ -1957,9 +1958,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
 							// Hour start
 							if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) {
 								$daterange .= dol_print_date($event->date_start_in_calendar, 'H:i', 'tzuserrel');
+								$fulldaterange .= dol_print_date($event->date_start_in_calendar, 'Y-m-d H:i', 'tzuserrel');
 								if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) {
 									if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) {
-										$daterange .= '-';
+										$daterange .= ' - ';
+										$fulldaterange .= ' - ';
 									}
 									//else
 									//print '...';
@@ -1974,6 +1977,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
 							if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) {
 								if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) {
 									$daterange .= dol_print_date($event->date_end_in_calendar, 'H:i', 'tzuserrel');
+									$fulldaterange .= dol_print_date($event->date_end_in_calendar, 'Y-m-d H:i', 'tzuserrel');
+
 								}
 							}
 						} else {
@@ -2018,7 +2023,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
 
 						print $titletoshow;
 						print '<br>';
-						print '<a class="cal_event cal_event_title classfortooltip" href="" title="asd">' . $daterange . '</a>';
+						print '<a class="cal_event cal_event_title classfortooltip" href="" title="' . $fulldaterange . '">' . $daterange . '</a>';
 						print $listofusertoshow;
 
 						if ($event->type_code == 'ICALEVENT') {