diff --git a/article-dist.html b/article-dist.html index 1bdcfd517ae1cd0cd29e1117e0e80603a41636bf..78b4e4a97e8c5f4bd5813f7c5129241a077e1138 100644 --- a/article-dist.html +++ b/article-dist.html @@ -186,6 +186,8 @@ </B_articles_rubrique> + #FORMULAIRE_SIGNATURE + </div> @@ -200,6 +202,33 @@ <br> +<!-- Signatures petition --> + +<BOUCLE_signatures_decompte(SIGNATURES) {id_article}></BOUCLE_signatures_decompte> +[<div class="signatures-titre">(#TOTAL_BOUCLE) signatures à cette pétition</div> + +<table class="signatures"> +<thead class="structure"> +<tr> + <td>Date</td> + <td>Nom et site Web</td> + <td>Message</td> +</tr> +</thead> +<tbody>] +<//B_signatures_decompte> +<BOUCLE_signatures(SIGNATURES) {id_article} {par date} {inverse} {0,30}> +<tr> + <td class="signature-date">[(#DATE|affdate_court)]</td> + <td class="signature-nom">#NOM[<br><a href="#URL_SITE">(#NOM_SITE)</a>]</td> + [<td class="signature-message">(#MESSAGE)</td>] +</tr> +</BOUCLE_signatures> +</tbody> +</table> +</B_signatures> + + <!-- Forums --> [<div class="forum-repondre"><B><A HREF="forum.php3?(#PARAMETRES_FORUM)">Répondre à cet article</A></B></div>] diff --git a/habillage.css b/habillage.css index 100877767269b4bb75efd4b9184aa686a69ea243..8ef9aae99b59f9e3da8c71e7c1830e88a6eb3403 100755 --- a/habillage.css +++ b/habillage.css @@ -332,6 +332,47 @@ ul ul ul ul ul .forum-chapo { } +/* + * Habillage des petitions + */ + +.signatures { + margin-left: 0px; + margin-right: 0px; + margin-top: 1em; + margin-bottom: 1em; + width: 100%; +} +.signatures td { + -moz-border-radius: 0.4em; +} +.signatures-titre { + clear: right; + font-weight: bold; + font-size: 120%; + text-align: center; + padding: 0.5em; + margin: 0px; +} +.signature-date { + white-space: nowrap; + background: #e4f0f0; + padding: 0.5em; +} +.signature-nom { + font-weight: bold; + background: #ecf4f4; + padding: 0.2em; + text-align: center; +} +.signature-message { + font-size: 85%; + background: #f4f8f8; + padding: 0.4em; + text-align: justify; +} + + /* * Formulaires */ diff --git a/inc-formulaires.php3 b/inc-formulaires.php3 index 944a2440d7c55baf2a67217ef787c380d46bc8e8..7235bc7bb3ce14063ab999b6c93ad924bcb944f0 100644 --- a/inc-formulaires.php3 +++ b/inc-formulaires.php3 @@ -45,8 +45,8 @@ function formulaire_signature($id_article) { include_ecrire("inc_texte.php3"); include_ecrire("inc_filtres.php3"); - include_ecrire("inc_mail.php3"); + echo "<div class='formulaire'>"; echo "<a name='sp$id_article'></a>\n"; if ($val_confirm) { @@ -114,7 +114,9 @@ function formulaire_signature($id_article) { } else if ($nom_email AND $adresse_email) { if ($GLOBALS['db_ok']) { - $query_petition = "SELECT * FROM spip_petitions WHERE id_article=$id_article"; + include_ecrire("inc_mail.php3"); + + $query_petition = "SELECT * FROM spip_petitions WHERE id_article=$id_article"; $result_petition = spip_query($query_petition); while($row = spip_fetch_array($result_petition)) { @@ -125,7 +127,7 @@ function formulaire_signature($id_article) { $message_petition = $row['message']; $texte_petition = $row['texte']; } - + if (strlen($nom_email) < 2) { $reponse_signature .= erreur("Veuillez indiquer votre nom."); $refus = "oui"; @@ -150,7 +152,7 @@ function formulaire_signature($id_article) { $reponse_signature .= erreur("Votre adresse email n'est pas valide."); $refus = "oui"; } - + if ($site_obli == "oui") { if (!$nom_site) { $reponse_signature .= erreur("Veuillez indiquer le nom de votre site."); @@ -241,28 +243,28 @@ function formulaire_signature($id_article) { echo propre($texte_petition); - echo "<P><div class=\"spip_encadrer\"><B>Votre nom ou pseudo</B><BR>(your name or pseudo)<BR>"; + echo "<p><fieldset><B>Votre nom ou pseudo</B><BR>(your name or pseudo)<BR>"; echo "<input type=\"text\" class=\"forml\" name=\"nom_email\" value=\"\" size=\"20\">"; - echo "<P><B>Votre adresse email</B><BR>(your email address)<BR>"; - echo "<input type=\"text\" class=\"forml\" name=\"adresse_email\" value=\"vous@fournisseur.com\" size=\"20\"></div>"; + echo "<p><B>Votre adresse email</B><BR>(your email address)<BR>"; + echo "<input type=\"text\" class=\"forml\" name=\"adresse_email\" value=\"\" size=\"20\"></fieldset>"; - echo "<P><div class=\"spip_encadrer\">"; + echo "<P><fieldset>"; if ($site_obli != "oui") { echo "<B>Si vous avez un site Web, vous pouvez l'indiquer ci-dessous</B><br>(if you own a website...)<p>"; } - echo "<B>Nom de votre site</B><BR>(name of your website)<BR>"; + echo "<B>Nom de votre site Web</B><BR>(name of your website)<BR>"; echo "<input type=\"text\" class=\"forml\" name=\"nom_site\" value=\"\" size=\"20\">"; - echo "<P><B>Adresse de votre site</B><BR>(URL of your website)<BR>"; - echo "<input type=\"text\" class=\"forml\" name=\"url_site\" value=\"http://\" size=\"20\"></div>"; + echo "<p><B>Adresse de votre site</B><BR>(URL of your website)<BR>"; + echo "<input type=\"text\" class=\"forml\" name=\"url_site\" value=\"http://\" size=\"20\"></fieldset>"; if ($message_petition == "oui") { - echo "<p><div class=\"spip_encadrer\">"; + echo "<p><fieldset>"; echo "<B>Un message, un commentaire ?</B><BR>(a message, any comment?)<BR>"; echo "<textarea name=\"message\" rows=\"3\" class=\"forml\" cols=\"20\" wrap='soft'>"; - echo "</textarea></div><p>\n"; + echo "</textarea></fieldset><p>\n"; } else { echo "<input type=\"hidden\" name=\"message\" value=\"\">"; @@ -272,7 +274,7 @@ function formulaire_signature($id_article) { echo "</DIV></FORM>\n"; } } - + echo "</div>\n"; } diff --git a/spip_style.css b/spip_style.css index 741cd00f2f18a7141535739a2eb78bb77acbf6db..78e628c0d5813cebff8d00268f340b0aefc7d8e9 100644 --- a/spip_style.css +++ b/spip_style.css @@ -80,4 +80,4 @@ i.spip { } color: red; } -.spip_surligne { background-color: #FFFF66; } \ No newline at end of file +.spip_surligne { background-color: #FFFF66; }