Author: baptiste.goupil@gmail.com
Date: Thu Jul 13 19:27:58 2006
New Revision: 3979
Log:
Afficher avec une classe particulière ("horsperiode") les jours hors-période. Dans le squelette demo_calendrier_mini, ils sont colorés en gris.
Modified:
_plugins_/_contenu_editorial_/Agenda/balise/calendrier_mini.php
_plugins_/_contenu_editorial_/Agenda/demo_calendrier_mini.html
Modified: _plugins_/_contenu_editorial_/Agenda/balise/calendrier_mini.php
--- _plugins_/_contenu_editorial_/Agenda/balise/calendrier_mini.php (original)
+++ _plugins_/_contenu_editorial_/Agenda/balise/calendrier_mini.php Thu Jul 13 19:27:58 2006
@@ -68,7 +68,9 @@
$ligne = '';
$debut = date("w",mktime(1,1,1,$mois,$premier_jour,$annee));
for ($i=$debut ? $debut : 7;$i>1;$i--) {
- $ligne .= "\n\t<td> </td>";
+ $mois_precedent = mktime(1,1,1,$mois-1,1,$annee);
+ $jour_mois_precedent = date('t', $mois_precedent)+2-$i;
+ $ligne .= "\n\t<td class=\"horsperiode\">$jour_mois_precedent</td>";
}
$total = '';
@@ -100,7 +102,7 @@
}
// affichage de la fin de semaine hors periode
for($j=$jour_semaine ? $jour_semaine : 7; $j<7; $j++) {
- $ligne .= "\n\t<td> </td>";
+ $ligne .= "\n\t<td class=\"horsperiode\">$i</td>";
}
return $total . ($ligne ? "\n<tr>$ligne\n</tr>" : '');
Modified: _plugins_/_contenu_editorial_/Agenda/demo_calendrier_mini.html
--- _plugins_/_contenu_editorial_/Agenda/demo_calendrier_mini.html (original)
+++ _plugins_/_contenu_editorial_/Agenda/demo_calendrier_mini.html Thu Jul 13 19:27:58 2006
@@ -37,6 +37,7 @@
<div id="contenu">
<style type='text/css'>
td.occupe a {font-weight:bold;text-decoration:underline;}
+ td.horsperiode {color:#878787;font-size:.9em;}
</style>
[(#REM) mini calendrier :
1er arg la date,