module config et role webmaster
[mtweb] / mw / app / out / default / views / config / templates / index.php
diff --git a/mw/app/out/default/views/config/templates/index.php b/mw/app/out/default/views/config/templates/index.php
new file mode 100644 (file)
index 0000000..b81e5ad
--- /dev/null
@@ -0,0 +1,49 @@
+<h2>Template</h2>
+
+<?php if($this->out["out_pathes"]) : ?>
+
+<form name="config_form" action="<?php echo $this->url("config/templates"); ?>" method="post">
+
+  <fieldset>
+    <ul>
+      <li>
+        <label for="out">template</label>
+        <?php
+  
+          $template = $this->config("out");
+          $FOUND = false;
+          foreach($this->out["out_pathes"] as $out_path) { if($template == $out_path) { $FOUND = true; break; } }
+          if(!$FOUND) $template = $this->config("default_out");
+        
+        ?>
+        <div class="form_input">
+          <select name="out" id="out">
+            <?php foreach($this->out["out_pathes"] as $out_path) : ?>
+            <option value="<?php echo $out_path; ?>"<?php echo $template == $out_path ? " selected=\"selected\"" : ""; ?>><?php echo $out_path; ?></option>
+            <?php endforeach; ?>
+          </select>
+        </div>
+      </li>
+      <?php if($this->out["out_config"]) : ?>
+      <li>
+        <label>&nbsp;</label>
+        <div class="form_input">
+          Ce template a des <a href="<?php echo $this->url("config/templates/options"); ?>">options</a>
+        </div>
+      </li>
+      <?php endif; ?>
+      <li>
+        <div class="form_buttons">
+          <input type="submit" value="Enregistrer" />
+        </div>
+      </li>
+    </ul>
+  </fieldset>
+
+</form>
+
+<?php else : ?>
+
+<p>Aucun template</p>
+
+<?php endif; ?>