1 <?php require $this->out_file("views/tinymce.init.js.php"); $data = $this->data(); ?>
3 <h2>Modifier une piste</h2>
5 <script type="text/javascript">
10 $index_derivation = 1;
11 foreach($this->out["piste"]["derivations"] as $id_derivation => $derivation) :
12 if($id_derivation >= $index_derivation) $index_derivation = $id_derivation + 1;
15 derivations[<?php echo $id_derivation ?>] = true;
17 var index_derivation = <?php echo $index_derivation ?>;
18 var is_reference = <?php echo $this->out["piste"]["reference"] ? "true" : "false" ?>;
23 <li><a href="<?php echo $this->url("users/pistes") ?>">Retour à la liste des pistes</a></li>
26 <?php if($this->out["groupes"]["total"] > 0) : ?>
28 <form name="piste_form" action="<?php echo $this->url("users/pistes/edit", array("id" => $_GET[$this->param("id")])) ?>" method="post" enctype="multipart/form-data">
30 <input type="hidden" name="date_inscription" value="<?php echo $this->out["piste"]["date_inscription"] ?>" />
35 <label for="id_groupe"> </label>
36 <div class="form_input">
37 <ul class="source_groupes">
38 <?php foreach($this->out["piste"]["groupes"] as $id_groupe => $groupe) : ?>
39 <li class="source_groupe" id="source_groupe_<?php echo $id_groupe; ?>">
40 <span class="author"><?php echo $groupe["nom"]; ?></span>
41 <span class="access"><?php echo $this->out["sources_access"][$groupe["id_groupe_status"]]["intitule"]; ?></span>
50 <?php if($this->out["piste"]["permissions"]["admin"]) : ?>
52 <li><a href="<?php echo $this->url("users/pistes/groupes", array("id" => $this->out["piste"]["id"])) ?>">Editer les groupes de la piste</a></li>
59 <div id="morceau_select">
60 <label for="morceau">morceau</label>
61 <div class="form_input">
62 <select name="morceau" id="morceau">
63 <option value="0"<?php echo $this->out["piste"]["morceau"] == "0" ? " selected=\"selected\"" : "" ?>>hors morceau</option>
64 <?php foreach($this->out["morceaux"] as $id_morceau => $morceau) : ?>
65 <option value="<?php echo $id_morceau ?>"<?php echo $this->out["piste"]["morceau"] == $id_morceau ? " selected=\"selected\"" : "" ?>><?php echo $morceau["titre"] ?></option>
73 <ul class="admin_form_head">
75 <label for="is_derivation">cette piste est une dérivation</label>
76 <div class="form_input">
77 <input type="checkbox" id="is_derivation" name="is_derivation"<?php echo $this->out["piste"]["derivations"] ? " checked=\"checked\"" : "" ?> />
82 <ul class="admin_form_content" id="derivation_input"<?php echo $this->out["piste"]["derivations"] ? "" : " style=\"display:none;\"" ?>>
86 <div id="derivations_list" class="form_values">
88 <div id="derivations_items">
91 foreach($this->out["piste"]["derivations"] as $id_derivation => $derivation)
95 ( "maj_url" => $this->url("users/pistes/maj_xml", array("id" => $this->out["piste"]["id"], "derivation" => $id_derivation, "xml" => "derivation")),
96 "name" => "derivation",
97 "label" => "dérive de » ",
99 "id" => $id_derivation
102 $this->set_out("xml_form_source", $derivation);
103 require $this->out_file("views/content/sources/xml_form.php");
110 <li><a class="add" href="#" onclick="add_derivation('', false, '', false); return false;">Ajouter une source de dérivation</a></li>
119 <ul class="admin_form_head">
121 <label for="is_reference">cette piste est une référence</label>
122 <div class="form_input">
123 <input type="checkbox" id="is_reference" name="is_reference"<?php echo $this->out["piste"]["reference"] ? " checked=\"checked\"" : "" ?> />
128 <ul class="admin_form_content" id="reference_form" class="form"<?php echo $this->out["piste"]["reference"] ? "" : " style=\"display: none\"" ?>>
130 <li id="reference_input">
138 ( $this->out["piste"]["reference"] && $this->config("cache_actif") ?
139 $this->url("users/pistes/maj_xml", array("id" => $this->out["piste"]["id"], "xml" => "reference"))
142 "name" => "reference",
143 "label" => "référence » ",
144 "can_delete" => false
147 $this->set_out("xml_form_source", $this->out["piste"]["reference"]);
148 require $this->out_file("views/content/sources/xml_form.php");
156 <ul id="original_form" class="form"<?php echo $this->out["piste"]["reference"] ? " style=\"display: none\"" : "" ?>>
159 <label for="titre">titre</label>
160 <div class="form_input">
161 <input type="text" class="long_text" name="titre" id="titre" value="<?php echo $this->out["piste"]["titre"] ?>" />
166 <label for="image">icone</label>
167 <div class="form_input">
168 <?php if(isset($this->out["piste"]["image"])) : ?>
169 <img class="logo" src="<?php echo $this->out["piste"]["image_uri"] ?>" /><br /><br />
170 <input type="checkbox" name="del_image" /> effacer l'icone<br /><br />
172 <input type="file" name="image" />
177 <label for="licence">licence</label>
178 <div class="form_input">
179 <select name="licence" id="licence">
180 <?php foreach($this->out["licences"]["list"] as $id_licence => $licence) : ?>
181 <option value="<?php echo $id_licence ?>"<?php echo $this->out["piste"]["licence"]["id"] == $id_licence ? "selected=\"selected\"" : "" ?>><?php echo $licence["nom"] ?></option>
188 <label for="date_creation">date de création</label>
189 <div class="form_input">
193 ( $this->out["piste"]["date_creation"] ?
194 explode("-", $this->out["piste"]["date_creation"])
195 : array(0 => date("Y"), 1 => date("m"), 2 => date("d"))
200 <select name="jour_date_creation">
201 <?php for($j = 1; $j <=31; $j++) : ?>
202 <option value="<?php echo $j ?>"<?php echo $date_creation[2] == $j ? " selected=\"selected\"" : ""?>><?php echo $j ?></option>
206 <select name="mois_date_creation">
207 <?php for($m = 1; $m <=12; $m++) : ?>
208 <option value="<?php echo $m ?>"<?php echo $date_creation[1] == $m ? " selected=\"selected\"" : ""?>><?php echo $m ?></option>
212 <input type="text" size="4" name="annee_date_creation" value="<?php echo $date_creation[0] ?>">
217 <h3><label>Fichiers</label> <a href="#" onclick="add_document(); return false;">Ajouter un fichier</a></h3>
223 <?php if($this->out["piste"]) : foreach($this->out["piste"]["documents"] as $id_document => $document) : ?>
225 <div class="document" id="document_<?php echo $id_document ?>">
226 <div class="delete"><a href="#" onclick="del_document('<?php echo $id_document ?>'); return false;">Enlever ce fichier</a></div>
227 <label for="document_nom_<?php echo $id_document ?>">nom</label>
228 <input type="text" class="long_text" name="document_nom_<?php echo $id_document ?>" id="document_nom_<?php echo $id_document ?>" value="<?php echo $document["nom"] ?>" />
229 <div class="clear"><!-- --></div>
230 <label for="document_url_<?php echo $id_document ?>">url</label>
231 <input type="text" size="48" name="document_url_<?php echo $id_document ?>" id="document_url_<?php echo $id_document ?>" value="<?php echo $document["url"] ?>" />
233 <script type="text/javascript">if(last_document_id <= <?php echo $id_document ?>) last_document_id = <?php echo $id_document ?> + 1; </script>
235 <?php endforeach; endif; ?>
241 <label for="description">description</label>
244 <textarea class="tinymce" cols="70" rows="10" name="description" id="description"><?php echo isset($this->out["piste"]["description"]) ? $this->out["piste"]["description"] : "" ?></textarea>
251 <div class="form_buttons">
252 <input type="submit" value="Enregistrer" />
261 <p>Vous ne gérez aucun groupe pour le moment.</p>
262 <p>Pour ajouter une piste, vous devez d'abord <a href="<?php echo $this->url("users/groupes/add") ?>">créer un groupe</a>.</p>