diff --git a/.gitattributes b/.gitattributes index b03ad8dade1f049c3d4c708bb7024110a6d99b6e..36f95299527c4c985b561fa8a4af1b822484d980 100644 --- a/.gitattributes +++ b/.gitattributes @@ -343,6 +343,8 @@ img_pack/soyezcreateurs_help-48.png -text inc/sc_agenda.php -text inc/sc_article.php -text /inc_mots_article.html -text +inclure/agenda_programmation.html -text +inclure/agenda_programmation_fonctions.php -text inclure/entravaux.html -text inclure/mesfavoris.html -text /inscription_evenement.html -text @@ -480,6 +482,9 @@ noisettes/cartouches/themes.html -text noisettes/cartouches/themes_agenda_mensuel.html -text noisettes/cartouchetitre/401.html -text noisettes/cartouchetitre/404.html -text +noisettes/cartouchetitre/agenda_calendrier.html -text +noisettes/cartouchetitre/agenda_calendrier_dyn.html -text +noisettes/cartouchetitre/agenda_programmation.html -text noisettes/cartouchetitre/antichrono.html -text noisettes/cartouchetitre/article.html -text noisettes/cartouchetitre/meteo.html -text diff --git a/agenda_calendrier.html b/agenda_calendrier.html index eb4396d80544a4b7989584053fd04a855b39e669..2f3020ed3cc7f72b7b86a1c5f94b4e25ebd34648 100644 --- a/agenda_calendrier.html +++ b/agenda_calendrier.html @@ -20,17 +20,10 @@ <INCLURE{fond=noisettes/header/header} {title=(#TITRE|attribut_html|texte_script) - (#GET{date}|affdate_mois_annee)} {titretop=#GET{titretop}} + {id_rubrique} + {date_ev=#ENV{'date_ev'}}{month=#ENV{'month'}}{year=#ENV{'year'}} + {type=agenda_calendrier} > -<nav id="miettesdepain"> - <h2 class="nocontent offscreen">Fil d'Ariane</h2> - <ul> - <li><a href="#URL_SITE_SPIP" title="<:soyezcreateurs:accueil_site|attribut_html:>"><:soyezcreateurs:accueil:></a></li> - <BOUCLE_plan(HIERARCHIE){id_rubrique}> - <li><a href="[(#URL_PAGE{agenda_calendrier}|parametre_url{'id_rubrique', #ID_RUBRIQUE}|parametre_url{'date_ev', [(#GET{date_th, [(#ENV{date})]}|annee)]'-[(#GET{date_th,[(#ENV{date})]}|mois)]-01'}|parametre_url{'id_mot', [(#ENV{id_mot,''}|urlencode)]})]"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]>[(#TITRE)]</a></li> - </BOUCLE_plan> - <li>[(#TITRE)]</li> - </ul> -</nav> <div class="texte"> <main id="main" role="main"> <!-- Une : contenu de la rubrique --> diff --git a/agenda_calendrier_dyn.html b/agenda_calendrier_dyn.html index c439beff1a1cd81213daebe6e658069e63802220..54066b03a1eed5f14216bcddb831cab6ba238f3d 100644 --- a/agenda_calendrier_dyn.html +++ b/agenda_calendrier_dyn.html @@ -21,17 +21,10 @@ {title=(#TITRE|attribut_html|texte_script) - (#GET{date}|affdate_mois_annee)} {titretop=#GET{titretop}} {wdcalendar=oui} + {id_rubrique} + {date_ev=#ENV{'date_ev'}}{month=#ENV{'month'}}{year=#ENV{'year'}} + {type=agenda_calendrier_dyn} > -<nav id="miettesdepain"> - <h2 class="nocontent offscreen">Fil d'Ariane</h2> - <ul> - <li><a href="#URL_SITE_SPIP" title="<:soyezcreateurs:accueil_site|attribut_html:>"><:soyezcreateurs:accueil:></a></li> - <BOUCLE_plan(HIERARCHIE){id_rubrique}> - <li><a href="[(#URL_PAGE{agenda_calendrier}|parametre_url{'id_rubrique', #ID_RUBRIQUE}|parametre_url{'date_ev', [(#ENV{date_ev, [(#ENV{date})]}|annee)]'-[(#ENV{date_ev,[(#ENV{date})]}|mois)]-01'}|parametre_url{'id_mot', [(#ENV{id_mot,''}|urlencode)]})]"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]>[(#TITRE)]</a></li> - </BOUCLE_plan> - <li>[(#TITRE)]</li> - </ul> -</nav> <div class="texte"> <main id="main" role="main"> diff --git a/agenda_programmation.html b/agenda_programmation.html index 6d93e03f837ea845013b2b955a338ccb69ce6381..83fc73e63ace685ef56b5eaee13d3c898a0ebcb8 100644 --- a/agenda_programmation.html +++ b/agenda_programmation.html @@ -7,17 +7,11 @@ <INCLURE{fond=noisettes/header/header} {title=(#TITRE|attribut_html|texte_script) - (#GET{periode})} {titretop=#GET{titretop}} + {id_rubrique} + {date_debut}{jour_debut}{duree} + {type=agenda_programmation} + > -<nav id="miettesdepain"> - <h2 class="nocontent offscreen">Fil d'Ariane</h2> - <ul> - <li><a href="#URL_SITE_SPIP" title="<:soyezcreateurs:accueil_site|attribut_html:>"><:soyezcreateurs:accueil:></a></li> - <BOUCLE_plan(HIERARCHIE){id_rubrique}> - <li><a href="[(#URL_PAGE{agenda_programmation}|parametre_url{'id_rubrique', #ID_RUBRIQUE})]"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]>[(#TITRE)]</a></li> - </BOUCLE_plan> - <li>[(#TITRE)]</li> - </ul> -</nav> <div class="texte"> <main id="main" role="main"> <!-- Une : contenu de la rubrique --> diff --git a/inclure/agenda_programmation.html b/inclure/agenda_programmation.html new file mode 100644 index 0000000000000000000000000000000000000000..10f28470d42151bc49fa3496e89e859df4ac5c80 --- /dev/null +++ b/inclure/agenda_programmation.html @@ -0,0 +1,44 @@ +[(#REM) Trouver, par rapport à la date du jour, la date de début de la période ] +[(#SET{date_debut,[(#ENV{date_debut,#DATE}|programmation_debut{#ENV{jour_debut}}|affdate{'Y-m-d'})]})] +<table summary="En colonne les jours de la semaine, en ligne, le nom des films et à l’intersection, l’heure de projection" class="spip"> +<caption>Programmation</caption> +<thead><tr class="row_first"><th scope="col">Du [(#GET{date_debut}|affdate{'j/n'})] au [(#GET{date_debut}|programmation_datedecalejours{[(#ENV{duree,7}|moins{1})]}|affdate{'j/n'})]<br />[Semaine (#GET{date_debut}|affdate{'W'})]</th> +[(#REM) Affiche la première ligne du tableau donnant les jours concernés ] +<BOUCLE_Jours(ENUM){0,#ENV{duree,7}}> +[(#SET{lejour,[(#GET{date_debut}|programmation_datedecalejours{#VALEUR})]})] +<th scope="col"><abbr title="[(#GET{lejour}|nom_jour|ucfirst)]">[(#GET{lejour}|nom_jour|substr{0,2}|ucfirst)]</abbr><br />[(#GET{lejour}|affdate{'j/n'})]</th> +</BOUCLE_Jours> +</tr></thead> +<B_Films> +<tbody> +[(#REM) Récupérer le liste des évenements entre la date de début et sur la durée choisie. + Ne prendre qu'un événement par article ] +<BOUCLE_Films(EVENEMENTS){id_rubrique?}{id_article?}{date_debut>=(#GET{date_debut}|affdate{'Y-m-d'})}{date_debut<(#GET{date_debut}|programmation_datedecalejours{(#ENV{duree,7})}|affdate{'Y-m-d'})}{fusion evenements.id_article}{par titre}> +<tr class="[(#COMPTEUR_BOUCLE|alterner{row_even,row_odd})]"> +<td>[(#ID_ARTICLE|<>{#ENV{id_article}}|?{<a href="[(#URL_ARTICLE{#ID_ARTICLE})]">})]#TITRE[(#ID_ARTICLE|<>{#ENV{id_article}}|?{</a>})]</td> +[(#REM) Lister les événements de l'article, jour par jour sur la période. ] +<BOUCLE_JoursFilm(ENUM){0,#ENV{duree,7}}> +[(#SET{lejour,[(#GET{date_debut}|programmation_datedecalejours{#VALEUR})]})] +<B_HorraireFilm><td> +<BOUCLE_HorraireFilm(EVENEMENTS){id_article=#_Films:ID_ARTICLE}{date_debut>=(#GET{lejour}|affdate{'Y-m-d'})}{date_debut<(#GET{lejour}|programmation_datedecalejours{1}|affdate{'Y-m-d'})}{par date_debut}{"<br />"}> +[(#DATE_DEBUT|affdate{'H:i'})] +</BOUCLE_HorraireFilm> +</td></B_HorraireFilm> +<td> </td> +<//B_HorraireFilm> +</BOUCLE_JoursFilm> +</tr> +</BOUCLE_Films> +</tbody> +</table> +</B_Films> +<tbody> +<tr class="row_even"> +<td colspan="[(#ENV{duree,7}|plus{1})]">Pas encore de programmation cette semaine.</td> +</tr> +</tbody> +</table> +<//B_Films> +[<div style="float:right;"> +<a href="(#SELF|parametre_url{date_debut,[(#GET{date_debut}|programmation_datedecalejours{-1}|affdate{'Y-m-d'})]})" class='ajax preload'>Semaine précédente</a>] | [<a href="(#SELF|parametre_url{date_debut,[(#GET{date_debut}|programmation_datedecalejours{+7}|affdate{'Y-m-d'})]})" class='ajax preload'>Semaine suivante</a> +</div>] \ No newline at end of file diff --git a/inclure/agenda_programmation_fonctions.php b/inclure/agenda_programmation_fonctions.php new file mode 100644 index 0000000000000000000000000000000000000000..ba3f651793bd207dc676f127676b3ee7200cce7a --- /dev/null +++ b/inclure/agenda_programmation_fonctions.php @@ -0,0 +1,15 @@ +<?php +function programmation_datedecalejours($date,$decalage) { + return date('Y-m-d H:i:s',mktime(affdate($date,"H"), affdate($date,"i"), affdate($date,"s"), affdate($date,"m"), affdate($date,"d")+$decalage, affdate($date,"Y"))); +} + +function programmation_debut($date, $jour_debut = 3) { + $jour_semaine = affdate($date,'w'); + if ($jour_semaine >= $jour_debut) { + $decalage = $jour_debut - $jour_semaine; + } else { + $decalage = $jour_debut - $jour_semaine - 7; + } + $date_debut = programmation_datedecalejours($date,$decalage); + return $date_debut; +} \ No newline at end of file diff --git a/noisettes/cartouchetitre/agenda_calendrier.html b/noisettes/cartouchetitre/agenda_calendrier.html new file mode 100644 index 0000000000000000000000000000000000000000..73287138e6ad1c3c30ea9c3486767aecf92bee3a --- /dev/null +++ b/noisettes/cartouchetitre/agenda_calendrier.html @@ -0,0 +1,30 @@ +<BOUCLE_rubrique_principal(RUBRIQUES) {id_rubrique}> +[(#ENV{'date_ev'}|!={''}|non) + [(#ENV{'month'}|oui) + [(#ENV{'year'}|oui) + #SET{'date', #ENV{'year'}|concat{'-'#ENV{'month'}}|concat{'-01 00:00:00'}} + #SET{'date_th', #ENV{'year'}|concat{'-'#ENV{'month'}}|concat{'-01'}} + ] + ] + [(#ENV{'month'}|non) + #SET{'date', #ENV{date}} + #SET{'date_th', #ENV{date}|affdate{'Y-m-d'} + ] +] +[(#ENV{'date_ev'}|!={''}|oui) + #SET{'date', #ENV{date_ev}|concat{' 00:00:00'}} + #SET{'date_th', #ENV{date_ev}} +] +[(#SET{titretop,[(#TITRE|attribut_html|sc_nettoyer_marqueur|texte_script)]})] +<nav id="miettesdepain"> + <h2 class="nocontent offscreen">Fil d'Ariane</h2> + <ul> + <li><a href="#URL_SITE_SPIP" title="<:soyezcreateurs:accueil_site|attribut_html:>"><:soyezcreateurs:accueil:></a></li> + <BOUCLE_plan(HIERARCHIE){id_rubrique}> + <li><a href="[(#URL_PAGE{agenda_calendrier}|parametre_url{'id_rubrique', #ID_RUBRIQUE}|parametre_url{'date_ev', [(#GET{date_th, [(#ENV{date})]}|annee)]'-[(#GET{date_th,[(#ENV{date})]}|mois)]-01'}|parametre_url{'id_mot', [(#ENV{id_mot,''}|urlencode)]})]"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]>[(#TITRE)]</a></li> + </BOUCLE_plan> + <li>[(#TITRE)]</li> + </ul> +</nav> +</BOUCLE_rubrique_principal> +#FILTRE{mini_html} \ No newline at end of file diff --git a/noisettes/cartouchetitre/agenda_calendrier_dyn.html b/noisettes/cartouchetitre/agenda_calendrier_dyn.html new file mode 100644 index 0000000000000000000000000000000000000000..9a044c2eed6a600fe61b5482f728475e68102406 --- /dev/null +++ b/noisettes/cartouchetitre/agenda_calendrier_dyn.html @@ -0,0 +1,29 @@ +<BOUCLE_rubrique_principal(RUBRIQUES) {id_rubrique}> +[(#ENV{'date_ev'}|!={''}|non) + [(#ENV{'month'}|oui) + [(#ENV{'year'}|oui) + #SET{'date', #ENV{'year'}|concat{'-'#ENV{'month'}}|concat{'-01 00:00:00'}} + #SET{'date_th', #ENV{'year'}|concat{'-'#ENV{'month'}}|concat{'-01'}} + ] + ] + [(#ENV{'month'}|non) + #SET{'date', #ENV{date}} + #SET{'date_th', #ENV{date}|affdate{'Y-m-d'} + ] +] +[(#ENV{'date_ev'}|!={''}|oui) + #SET{'date', #ENV{date_ev}|concat{' 00:00:00'}} + #SET{'date_th', #ENV{date_ev}} +] +<nav id="miettesdepain"> + <h2 class="nocontent offscreen">Fil d'Ariane</h2> + <ul> + <li><a href="#URL_SITE_SPIP" title="<:soyezcreateurs:accueil_site|attribut_html:>"><:soyezcreateurs:accueil:></a></li> + <BOUCLE_plan(HIERARCHIE){id_rubrique}> + <li><a href="[(#URL_PAGE{agenda_calendrier_dyn}|parametre_url{'id_rubrique', #ID_RUBRIQUE}|parametre_url{'date_ev', [(#ENV{date_ev, [(#ENV{date})]}|annee)]'-[(#ENV{date_ev,[(#ENV{date})]}|mois)]-01'}|parametre_url{'id_mot', [(#ENV{id_mot,''}|urlencode)]})]"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]>[(#TITRE)]</a></li> + </BOUCLE_plan> + <li>[(#TITRE)]</li> + </ul> +</nav> +</BOUCLE_rubrique_principal> +#FILTRE{mini_html} \ No newline at end of file diff --git a/noisettes/cartouchetitre/agenda_programmation.html b/noisettes/cartouchetitre/agenda_programmation.html new file mode 100644 index 0000000000000000000000000000000000000000..d700e584bdb07fa7949261477de611def497f7f4 --- /dev/null +++ b/noisettes/cartouchetitre/agenda_programmation.html @@ -0,0 +1,16 @@ +<BOUCLE_rubrique_principal(RUBRIQUES) {id_rubrique}> +[(#REM) Trouver, par rapport à la date du jour, la date de début de la période ] +[(#SET{date_debut,[(#ENV{date_debut,#DATE}|programmation_debut{#ENV{jour_debut}}|affdate{'Y-m-d'})]})] +[(#SET{periode,[(#GET{date_debut}|agenda_affdate_debut_fin{[(#GET{date_debut}|programmation_datedecalejours{[(#ENV{duree,7}|moins{1})]})],non, abbr}|typo)]})] +<nav id="miettesdepain"> + <h2 class="nocontent offscreen">Fil d'Ariane</h2> + <ul> + <li><a href="#URL_SITE_SPIP" title="<:soyezcreateurs:accueil_site|attribut_html:>"><:soyezcreateurs:accueil:></a></li> + <BOUCLE_plan(HIERARCHIE){id_rubrique}> + <li><a href="[(#URL_PAGE{agenda_programmation}|parametre_url{'id_rubrique', #ID_RUBRIQUE})]"[ title="(#DESCRIPTIF|supprimer_tags|attribut_html)"]>[(#TITRE)]</a></li> + </BOUCLE_plan> + <li>[(#TITRE)]</li> + </ul> +</nav> +</BOUCLE_rubrique_principal> +#FILTRE{mini_html} \ No newline at end of file