From 5d4c554ba8b91b63dc29bb2cda5d0fbdcc8acfc4 Mon Sep 17 00:00:00 2001 From: "real3t@gmail.com" <> Date: Sun, 15 Oct 2017 20:31:14 +0000 Subject: [PATCH] =?UTF-8?q?Fil=20d'Ariane=20en=20position=20haute=20pour?= =?UTF-8?q?=20:=20*=20D'autres=20pages=20d'Agenda=20(dont=20une=20agenda?= =?UTF-8?q?=5Fprogrammation=20non=20termin=C3=A9e,=20un=20probl=C3=A8me=20?= =?UTF-8?q?avec=20ENUM=20qui=20date=20d'une=20version=20pour=20SPIP=202.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 5 +++ agenda_calendrier.html | 13 ++---- agenda_calendrier_dyn.html | 13 ++---- agenda_programmation.html | 14 ++---- inclure/agenda_programmation.html | 44 +++++++++++++++++++ inclure/agenda_programmation_fonctions.php | 15 +++++++ .../cartouchetitre/agenda_calendrier.html | 30 +++++++++++++ .../cartouchetitre/agenda_calendrier_dyn.html | 29 ++++++++++++ .../cartouchetitre/agenda_programmation.html | 16 +++++++ 9 files changed, 149 insertions(+), 30 deletions(-) create mode 100644 inclure/agenda_programmation.html create mode 100644 inclure/agenda_programmation_fonctions.php create mode 100644 noisettes/cartouchetitre/agenda_calendrier.html create mode 100644 noisettes/cartouchetitre/agenda_calendrier_dyn.html create mode 100644 noisettes/cartouchetitre/agenda_programmation.html diff --git a/.gitattributes b/.gitattributes index b03ad8da..36f95299 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 eb4396d8..2f3020ed 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 c439beff..54066b03 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 6d93e03f..83fc73e6 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 00000000..10f28470 --- /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 00000000..ba3f6517 --- /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 00000000..73287138 --- /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 00000000..9a044c2e --- /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 00000000..d700e584 --- /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 -- GitLab