[1] | 1 | <h2>Nouveau bloc</h2> |
---|
| 2 | <div class="bloc_content"> |
---|
| 3 | |
---|
| 4 | <form name="box_form" action="<?= $env->url(array("e" => "set_boxes", "action" => "add_box")) ?>" method="post"> |
---|
| 5 | <input type="hidden" name="preview" value="0" /> |
---|
| 6 | <table class="admin"> |
---|
| 7 | <tr> |
---|
| 8 | <th>intitulé</th> |
---|
| 9 | <td><input type="text" name="titre" style="width: 500px" value="<?= $_POST["titre"] ?>"></td> |
---|
| 10 | </tr> |
---|
| 11 | <tr> |
---|
| 12 | <th>public</th> |
---|
| 13 | <td> |
---|
| 14 | <div class="info">cochez cette case pour rendre le bloc public</div> |
---|
| 15 | <input type="checkbox" name="public" <?= |
---|
| 16 | isset($_POST["public"]) ? ($_POST["public"] ? "checked" : "") : "checked" ?>> |
---|
| 17 | </td> |
---|
| 18 | </tr> |
---|
| 19 | <tr> |
---|
| 20 | <th>nom</th> |
---|
| 21 | <td> |
---|
| 22 | <div class="info"> |
---|
| 23 | Vous pouvez préciser un nom pour le bloc.<br /> |
---|
| 24 | Ce nom pourra servir de référence dans un template. |
---|
| 25 | </div> |
---|
| 26 | <input type="text" name="nom" style="width: 500px" value="<?= $_POST["nom"] ?>"> |
---|
| 27 | </td> |
---|
| 28 | </tr> |
---|
| 29 | <?php if($env->out["emplacements"]) : ?> |
---|
| 30 | <tr> |
---|
| 31 | <th>emplacement</th> |
---|
| 32 | <td> |
---|
| 33 | <select name="emplacement"> |
---|
| 34 | <option value="">Aucun</option> |
---|
| 35 | <?php foreach($env->out["emplacements"] as $id_emplacement => $emplacement) : ?> |
---|
| 36 | <option value="<?= $id_emplacement ?>"<?= $_POST["emplacement"] == $id_emplacement ? " selected" : "" ?>> |
---|
| 37 | <?= $emplacement["intitule"] ?> |
---|
| 38 | </option> |
---|
| 39 | <?php endforeach; ?> |
---|
| 40 | </select> |
---|
| 41 | </td> |
---|
| 42 | </tr> |
---|
| 43 | <?php endif; ?> |
---|
| 44 | <tr> |
---|
| 45 | <th>fichier</th> |
---|
| 46 | <td> |
---|
| 47 | <select name="fichier"> |
---|
| 48 | <option value="">Aucun</option> |
---|
| 49 | <?php foreach($env->out["box_files"] as $box_file) : ?> |
---|
| 50 | <option value="<?= $box_file ?>" |
---|
| 51 | <?= $box_file == $_POST["fichier"] ? " selected" : "" |
---|
| 52 | ?>><?= $box_file ?></option> |
---|
| 53 | <?php endforeach; ?> |
---|
| 54 | </select> |
---|
| 55 | <div class="info"> |
---|
| 56 | Vous pouvez préciser un fichier pour le contenu du bloc.<br /> |
---|
| 57 | Vous pouvez ajouter des fichiers de bloc par FTP dans le dossier <strong>boxes</strong> |
---|
| 58 | du template.<br /> |
---|
| 59 | <strong>note</strong> : si vous précisez un fichier, le contenu ci-dessous ne sera pas affiché. |
---|
| 60 | </div> |
---|
| 61 | </td> |
---|
| 62 | </tr> |
---|
| 63 | <tr> |
---|
| 64 | <th>contenu</th> |
---|
| 65 | <td> |
---|
| 66 | <textarea name="contenu" id="contenu" style="width: 500px; height: 300px;"><?= $_POST["contenu"] ?></textarea> |
---|
| 67 | <script type="text/javascript" src="<?= $env->path("tinymce") ?>jscripts/tiny_mce/tiny_mce.js"></script> |
---|
| 68 | <script type="text/javascript"> |
---|
| 69 | tinyMCE.init |
---|
| 70 | ( { mode: "exact", |
---|
| 71 | elements : "contenu", |
---|
| 72 | theme : "advanced", |
---|
| 73 | plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", |
---|
| 74 | theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontsizeselect", |
---|
| 75 | theme_advanced_buttons2 : "bullist,numlist,|blockquote,|,link,unlink,anchor,image,cleanup,help,|,hr,charmap,|,forecolor,backcolor", |
---|
| 76 | theme_advanced_buttons3 : null, |
---|
| 77 | theme_advanced_toolbar_location : "top", |
---|
| 78 | theme_advanced_toolbar_align : "left", |
---|
| 79 | theme_advanced_statusbar_location : "bottom", |
---|
| 80 | theme_advanced_resizing : true, |
---|
| 81 | content_css : "<?= $env->out_file("css/tiny_mce.css") ?>" |
---|
| 82 | } |
---|
| 83 | ); |
---|
| 84 | </script> |
---|
| 85 | </td> |
---|
| 86 | </tr> |
---|
| 87 | <tr> |
---|
| 88 | <td align="center" colspan="2"><input type="submit" value="Enregistrer" /></td> |
---|
| 89 | </tr> |
---|
| 90 | </table> |
---|
| 91 | </form> |
---|
| 92 | |
---|
| 93 | </div> |
---|