[Devel] r311 - trunk

svn at agendadulibre.org svn at agendadulibre.org
Mar 6 Nov 23:53:21 CET 2007


Author: thomas
Date: Tue Nov  6 23:52:24 2007
New Revision: 311

Log:

- Dans icallist.php, passage de la liste à un tableau, pour donner
  l'URL webcal et l'URL pour ajouter le calendrier dans son agenda
  Google pour chaque calendrier

- Dans rsslist.php, passage de la liste à un tableau pour la cohérence
  avec icallist.php.

- Dans funcs.inc.php, ajout d'une petite note en bas de chaque
  calendrier donnant les liens rss, ical et google du calendrier en
  cours de visualisation.

- Dans calendar.css, ajout des styles CSS nécessaires aux
  modifications décrites ci-dessus.



Modified:
   trunk/calendar.css
   trunk/funcs.inc.php
   trunk/icallist.php
   trunk/rsslist.php

Modified: trunk/calendar.css
==============================================================================
--- trunk/calendar.css	(original)
+++ trunk/calendar.css	Tue Nov  6 23:52:24 2007
@@ -51,11 +51,6 @@
   width: 16em;
 }
 
-div.main p
-{
- text-align: justify; 
-}
-
 #important p
 {
   margin: 0;
@@ -64,6 +59,11 @@
   line-height: 1.5em;
 }
 
+div.main p
+{
+ text-align: justify; 
+}
+
 form
 {
   margin: 0;
@@ -112,7 +112,7 @@
 }
 
 a:hover, a:active {
-	color: #b9dff1;
+        color: #b9dff1;
 }
 
 table.calendar {
@@ -150,13 +150,13 @@
 /*
  * These attributes apply to all cells of the agenda
  */
-td a:link, td a:visited {
+table.calendar td a:link, td a:visited {
 	font-weight: normal;
 	text-decoration: none;
 	color: #444444;
 }
 
-td a:hover, td a:active {
+table.calendar td a:hover, td a:active {
 	color: #1d99d3;
 }
 
@@ -208,6 +208,13 @@
           text-decoration: bold;
 }
 
+p#notice {
+           font-size: 0.8em;
+           text-align: right;
+           width: 90%;
+           margin: 10px auto;
+}
+
 /*
  * Region map (used only by map.php)
  */
@@ -293,6 +300,29 @@
   text-align: right;
 }
 
+table.list {
+  margin-left: auto;
+  margin-right: auto;
+  width: 30%;
+}
+
+table.list tr.odd {
+  background-color: #dfedff;
+}
+
+table.list tr.even {
+  background-color: #b9d8ff;
+}
+
+table.list td {
+  text-align: center;
+}
+
+table.list td a:hover, a:active {
+  text-decoration: underline;
+  color: #336699;
+}
+
 /*
  * Lug list (used only by showevent.php)
  */

Modified: trunk/funcs.inc.php
==============================================================================
--- trunk/funcs.inc.php	(original)
+++ trunk/funcs.inc.php	Tue Nov  6 23:52:24 2007
@@ -425,6 +425,12 @@
    * Display the calendar
    */
   calendar($db, $month, $year, $region);
+
+  echo "<p id=\"notice\">Ce calendrier en ";
+  echo "<a href=\"rss.php?region=" . $region . "\">rss</a>, ";
+  echo "<a href=\"" . calendar_absolute_url("ical.php?region=" . $region, "webcal") . "\">iCal</a> ou ";
+  echo "<a href=\"http://www.google.com/calendar/render?cid=" . calendar_absolute_url("ical.php?region%3D" . $region, "http") . "\">calendrier Google</a>";
+  echo "</p>";
 }
 
 function year_calendar($db, $year, $region)
@@ -494,6 +500,12 @@
     $month = $next['month'];
     $num++;
   }
+
+  echo "<p id=\"notice\">Ce calendrier en ";
+  echo "<a href=\"rss.php?region=" . $region . "\">rss</a>, ";
+  echo "<a href=\"" . calendar_absolute_url("ical.php?region=" . $region, "webcal") . "\">iCal</a> ou ";
+  echo "<a href=\"http://www.google.com/calendar/render?cid=" . calendar_absolute_url("ical.php?region%3D" . $region, "http") . "\">calendrier Google</a>";
+  echo "</p>";
 }
 
 function fetch_event($db, $id)

Modified: trunk/icallist.php
==============================================================================
--- trunk/icallist.php	(original)
+++ trunk/icallist.php	Tue Nov  6 23:52:24 2007
@@ -38,18 +38,28 @@
   exit;
 }
 
-echo "<p>Chaque calendrier iCal liste les évènements pour les 30 jours à venir dans une région donnée. En vous inscrivant au calendrier de votre région, vous verrez apparaître les évènements de votre région à portée locale, ainsi que tous les évènements à portée nationale, comme les RMLL.</p>";
+echo "<p>Chaque calendrier iCal liste les évènements pour les 30 jours à venir dans une région donnée. En vous inscrivant au calendrier de votre région, vous verrez apparaître les évènements de votre région à portée locale, ainsi que tous les évènements à portée nationale, comme les RMLL. Le lien <i>webcal</i> permet d'ajouter un calendrier dans votre logiciel favori, tandis que le lien <i>google</i> permet d'ajouter un calendrier à votre agenda Google.</p>";
 
-echo "  <ul>\n";
+echo "<table class=\"list\">";
 
-echo "   <li><a href=\"" . calendar_absolute_url("ical.php?region=all", "webcal") . "\">Toutes les régions</a></li>\n\n";
+echo "<tr class=\"odd\">";
+echo " <td>Toutes les régions</td>";
+echo " <td><a href=\"" . calendar_absolute_url("ical.php?region=all", "webcal") . "\">webcal</td>";
+echo " <td><a href=\"http://www.google.com/calendar/render?cid=" . calendar_absolute_url("ical.php?region%3Dall", "http") . "\">google</a></td>";
+echo "</tr>\n\n";
 
+$cpt = 0;
 while ($row = mysql_fetch_object($ret))
 {
-  echo "   <li><a href=\"" . calendar_absolute_url("ical.php?region=" . $row->id, "webcal") . "\">" . $row->name . "</a></li>\n";
+  echo "<tr class=\"" . ($cpt % 2 == 0 ? "even" : "odd") . "\">";
+  echo " <td>" . $row->name . "</td>";
+  echo " <td><a href=\"" . calendar_absolute_url("ical.php?region=" . $row->id, "webcal") . "\">webcal</td>";
+  echo " <td><a href=\"http://www.google.com/calendar/render?cid=" . calendar_absolute_url("ical.php?region%3D" . $row->id, "http") . "\">google</a></td>";
+  echo "</tr>\n";
+  $cpt++;
 }
 
-echo "  </ul>\n";
+echo "  </table>\n";
 
 ?>
 
@@ -83,4 +93,4 @@
  </li>
 </ul>
 
-<?php put_footer(); ?>
\ No newline at end of file
+<?php put_footer(); ?>

Modified: trunk/rsslist.php
==============================================================================
--- trunk/rsslist.php	(original)
+++ trunk/rsslist.php	Tue Nov  6 23:52:24 2007
@@ -40,16 +40,23 @@
 
 echo "<p>Chaque flux RSS liste les évènements pour les 30 prochains jours en cours dans une région donnée. En vous abonnant à un flux régional, vous recevrez des informations sur les évènements de votre région à portée locale, mais également les évènements à portée nationale comme les RMLL.</p>";
 
-echo "  <ul>\n";
-
-echo "   <li><a href=\"rss.php?region=all\">Toutes les régions</a></li>\n\n";
+echo "<table class=\"list\">";
+echo "<tr class=\"odd\">";
+echo " <td>Toutes les régions</td>";
+echo " <td><a href=\"rss.php?region=all\">rss</a></td>";
+echo "</tr>\n";
 
+$cpt = 0;
 while ($row = mysql_fetch_object($ret))
 {
-  echo "   <li><a href=\"rss.php?region=" . $row->id . "\">" . $row->name . "</a></li>\n";
+  echo "<tr class=\"" . ($cpt % 2 == 0 ? "even" : "odd") . "\">";
+  echo "<td>" . $row->name . "</td>";
+  echo "<td><a href=\"rss.php?region=" . $row->id . "\">rss</a></td>\n";
+  echo "</tr>";
+  $cpt++;
 }
 
-echo "  </ul>\n";
+echo "  </table>\n";
 
 ?>
 


Plus d'informations sur la liste de diffusion Devel