nouveau module "models" dans l'environnement
[mtweb] / mw / app / out / default / views / config / templates / index.php
1 <h2>Template</h2>
2
3 <?php if($this->out["templates"]) : ?>
4
5 <form name="config_form" action="<?php echo $this->url("config/templates"); ?>" method="post">
6
7   <fieldset>
8     <ul>
9       <li>
10         <label for="out">template</label>
11         <?php
12   
13           $current_out_path = $this->config("out");
14           $FOUND = false;
15           foreach($this->out["templates"] as $out_path => $template) { if($current_out_path == $out_path) { $FOUND = true; break; } }
16           if(!$FOUND) $current_out_path = $this->config("default_out");
17         
18         ?>
19         <div class="form_input">
20           <select name="out" id="out">
21             <?php
22
23               foreach($this->out["templates"] as $out_path => $template) :
24                 $template_name = $template->get_template_info("name");
25                 if(!$template_name) $template_name = $out_path;
26
27             ?>
28             <option value="<?php echo $out_path; ?>"<?php echo $current_out_path == $out_path ? " selected=\"selected\"" : ""; ?>><?php echo $template_name; ?></option>
29             <?php endforeach; ?>
30           </select>
31         </div>
32       </li>
33       <?php if($this->out["out_config"]) : ?>
34       <li>
35         <label>&nbsp;</label>
36         <div class="form_input">
37           Ce template a des <a href="<?php echo $this->url("config/templates/options"); ?>">options</a>
38         </div>
39       </li>
40       <?php endif; ?>
41       <li>
42         <div class="form_buttons">
43           <input type="submit" value="Enregistrer" />
44         </div>
45       </li>
46     </ul>
47   </fieldset>
48
49 </form>
50
51 <?php else : ?>
52
53 <p>Aucun template</p>
54
55 <?php endif; ?>