css pour le debug
[mtweb] / mw / app / out / default / views / admin / config.php
1 <h2>Configuration</h2>
2
3 <form name="config_form" action="<?php echo $this->url("admin/config"); ?>" method="post">
4
5   <fieldset>
6     <legend>Configuration générale</legend>
7     <ul>
8       <li>
9         <label for="site_name">nom du site</label>
10         <div class="form_input">
11           <input type="text" name="site_name" id="site_name" value="<?php echo $this->out["config"]["site_name"]; ?>" />
12         </div>
13       </li>
14       <li>
15         <label for="description">description</label>
16         <div class="form_input">
17           <textarea cols="50" rows="5" name="description" id="description"><?php echo $this->out["config"]["description"]; ?></textarea>
18         </div>
19       </li>
20       <li>
21         <label for="contact_form">formulaire de contact</label>
22         <div class="form_input">
23           <input type="checkbox" name="contact_form" id="contact_form"<?php echo $this->out["config"]["contact_form"] ? " checked=\"checked\"" : ""; ?> />
24         </div>
25       </li>
26       <li id="email_li"<?php echo $this->out["config"]["contact_form"] ? "" : " style=\"display:none;\""; ?>>
27         <label for="email">email</label>
28         <div class="form_input">
29           <input type="text" name="email" id="email" value="<?php echo $this->out["config"]["email"]; ?>" /><br />
30           <input type="checkbox" name="captcha" id="captcha"<?php echo $this->out["config"]["captcha"] ? " checked=\"checked\"" : ""; ?> /> anti-spam
31         </div>
32       </li>
33       <li>
34         <label for="max_list">taille maximum des listes</label>
35         <div class="form_input">
36           <span class="info">nombre d'&eacute;l&eacute;ments &agrave; afficher dans une liste avant de paginer :</span>
37           <input type="text" name="max_list" id="max_list" value="<?php echo $this->out["config"]["max_list"]; ?>" />
38         </div>
39       </li>
40     </ul>
41   </fieldset>
42
43   <?php if($this->out["out_pathes"]) : ?>
44   <fieldset>
45     <legend>Affichage du site</legend>
46     <ul>
47       <li>
48         <label for="out">template</label>
49         <?php
50   
51           $template = $this->config("out");
52           $FOUND = false;
53           foreach($this->out["out_pathes"] as $out_path) { if($template == $out_path) { $FOUND = true; break; } }
54           if(!$FOUND) $template = $this->config("default_out");
55         
56         ?>
57         <div class="form_input">
58           <select name="out" id="out">
59             <?php foreach($this->out["out_pathes"] as $out_path) : ?>
60             <option value="<?php echo $out_path; ?>"<?php echo $template == $out_path ? " selected=\"selected\"" : ""; ?>><?php echo $out_path; ?></option>
61             <?php endforeach; ?>
62           </select>
63         </div>
64       </li>
65       <?php foreach($this->out["out_config"] as $key => $config) : if($config["type"] == "checkbox") : ?>
66       <li>
67         <label for="<?php echo "out_".$key; ?>">&nbsp;</label>
68         <div class="form_input">
69           <input type="checkbox" name="<?php echo "out_".$key; ?>" id="<?php echo "out_".$key; ?>"<?php echo (isset($this->out["config"]["out_".$key]) ? $this->out["config"]["out_".$key] : $config["default"]) ? " checked=\"checked\"" : ""; ?> />
70           <?php echo $config["text"]; ?>
71         </div>
72       </li>
73       <?php endif; endforeach; ?>
74       <li>
75         <div class="form_buttons">
76           <input type="submit" value="Enregistrer" />
77         </div>
78       </li>
79     </ul>
80   </fieldset>
81   <?php endif; ?>
82
83 </form>