Adding nice next, previous icons to calendar

skala
Julio Montoya 16 years ago
parent 88ffd62a52
commit 36717d960b
  1. 16
      main/admin/calendar.lib.php

@ -56,9 +56,9 @@ function display_minimonthcalendar($agendaitems, $month, $year, $monthName)
echo "<table class=\"data_table\">\n",
"<tr>\n",
"<th width=\"10%\"><a href=\"", $backwardsURL, "\"> &laquo; </a></th>\n",
"<th width=\"10%\"><a href=\"", $backwardsURL, "\"> ".Display::return_icon('action_prev.png',get_lang('Previous'))." </a></th>\n",
"<th width=\"80%\" colspan=\"5\">", $monthName, " ", $year, "</th>\n",
"<th width=\"10%\"><a href=\"", $forewardsURL, "\"> &raquo; </a></th>\n", "</tr>\n";
"<th width=\"10%\"><a href=\"", $forewardsURL, "\"> ".Display::return_icon('action_next.png',get_lang('Next'))."</a></th>\n", "</tr>\n";
echo "<tr>\n";
for ($ii = 1; $ii < 8; $ii ++)
{
@ -326,9 +326,9 @@ function display_monthcalendar($month, $year)
echo "<table class=\"data_table\">\n",
"<tr>\n",
"<th width=\"10%\"><a href=\"",$backwardsURL,"\"> &laquo; </a></th>\n",
"<th width=\"10%\"><a href=\"",$backwardsURL,"\"> ".Display::return_icon('action_prev.png',get_lang('Previous'))."</a></th>\n",
"<th width=\"80%\" colspan=\"5\">",$MonthsLong[$maand_array_maandnummer]," ",$year,"</th>\n",
"<th width=\"10%\"><a href=\"",$forewardsURL,"\"> &raquo; </a></th>\n",
"<th width=\"10%\"><a href=\"",$forewardsURL,"\"> ".Display::return_icon('action_next.png',get_lang('Next'))."</a></th>\n",
"</tr>\n";
echo "<tr>\n";
@ -1787,10 +1787,10 @@ function display_daycalendar($agendaitems, $day, $month, $year, $weekdaynames, $
$backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&amp;courseCode=".Security::remove_XSS($_GET['courseCode'])."&amp;action=view&amp;view=day&amp;day=".date("j", $previousday)."&amp;month=".date("n", $previousday)."&amp;year=".date("Y", $previousday);
$forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&amp;courseCode=".Security::remove_XSS($_GET['courseCode'])."&amp;action=view&amp;view=day&amp;day=".date("j", $nextday)."&amp;month=".date("n", $nextday)."&amp;year=".date("Y", $nextday);
// The title row containing the day
echo "<tr>\n", "<th width=\"10%\"><a href=\"", $backwardsURL, "\">&#171;</a></th>\n", "<th>";
echo "<tr>\n", "<th width=\"10%\"><a href=\"", $backwardsURL, "\">".Display::return_icon('action_prev.png',get_lang('Previous'))."</a></th>\n", "<th>";
echo $DaysLong[$day_of_the_week]." ".date("j", $today)." ".$MonthsLong[date("n", $today) - 1]." ".date("Y", $today);
echo "</th>";
echo "<th width=\"10%\"><a href=\"", $forewardsURL, "\">&#187;</a></th>\n";
echo "<th width=\"10%\"><a href=\"", $forewardsURL, "\">".Display::return_icon('action_next.png',get_lang('Next'))."</a></th>\n";
echo "</tr>\n";
// the rows for each half an hour
for ($i = 10; $i < 48; $i ++)
@ -1863,11 +1863,11 @@ function display_weekcalendar($agendaitems, $month, $year, $weekdaynames, $month
echo "<table id=\"agenda_list\">\n";
// The title row containing the the week information (week of the year (startdate of week - enddate of week)
echo "<tr class=\"title\">\n";
echo "<td width=\"10%\"><a href=\"", $backwardsURL, "\">&#171;</a></td>\n";
echo "<td width=\"10%\"><a href=\"", $backwardsURL, "\">".Display::return_icon('action_prev.png',get_lang('Previous'))."</a></td>\n";
echo "<td colspan=\"5\">".get_lang("Week")." ".$week_number;
echo " (".$DaysShort['1']." ".date("j", $timestamp_first_date_of_week)." ".$MonthsLong[date("n", $timestamp_first_date_of_week) - 1]." ".date("Y", $timestamp_first_date_of_week)." - ".$DaysShort['0']." ".date("j", $timestamp_last_date_of_week)." ".$MonthsLong[date("n", $timestamp_last_date_of_week) - 1]." ".date("Y", $timestamp_last_date_of_week).')';
echo "</td>";
echo "<td width=\"10%\"><a href=\"", $forewardsURL, "\">&#187;</a></td>\n", "</tr>\n";
echo "<td width=\"10%\"><a href=\"", $forewardsURL, "\">".Display::return_icon('action_next.png',get_lang('Next'))."</a></td>", "</tr>";
// The second row containing the short names of the days of the week
echo "<tr>\n";
// this is the Day of the month without leading zeros (1 to 31) of the monday of this week

Loading…
Cancel
Save