aboutsummaryrefslogtreecommitdiff
path: root/app/view
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-12-04 13:55:04 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-12-04 13:55:04 +0100
commit13acdbd444b0ae26e83ab8cf62d60a7f59268545 (patch)
tree9186bda4bffa9751c5e93da2d09d762f40cc0adc /app/view
parentd0ef17169701f90a9dab5f50e3eb61954653cae2 (diff)
downloadwcms-13acdbd444b0ae26e83ab8cf62d60a7f59268545.tar.gz
wcms-13acdbd444b0ae26e83ab8cf62d60a7f59268545.zip
admin panel
Diffstat (limited to 'app/view')
-rw-r--r--app/view/templates/admin.php78
-rw-r--r--app/view/templates/backtopbar.php (renamed from app/view/templates/hometopbar.php)13
-rw-r--r--app/view/templates/font.php6
-rw-r--r--app/view/templates/home.php5
4 files changed, 97 insertions, 5 deletions
diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php
new file mode 100644
index 0000000..54bbedd
--- /dev/null
+++ b/app/view/templates/admin.php
@@ -0,0 +1,78 @@
+<?php $this->layout('layout', ['title' => 'admin', 'css' => $css . 'home.css']) ?>
+
+
+<?php $this->start('page') ?>
+
+<body>
+
+ <?php $this->insert('backtopbar', ['user' => $user]) ?>
+
+
+<section class="admin">
+
+ <form action="<?= $this->url('adminupdate') ?>" method="post">
+
+ <h2>Passwords</h2>
+ <label for="admin">Admin password</label>
+ <input type="password" name="admin" id="admin" value="<?= Config::admin() ?>">
+ <label for="editor">Editor password</label>
+ <input type="password" name="editor" id="editor" value="<?= Config::editor() ?>">
+
+ <h2>Page creation</h2>
+ <label for="defaultart">Create new page based on an already existing one</label>
+ <select name="defaultart" id="defaultart">
+ <option value="" <?= Config::defaultart() === '' || !$defaultartexist ? 'selected' : '' ?>>--use default BODY element--</option>
+ <?php
+ foreach ($artlist as $art) {
+ ?>
+ <option value="<?= $art ?>" <?= Config::defaultart() === $art ? 'selected' : '' ?>><?= $art ?></option>
+ <?php }
+ ?>
+ </select>
+
+ <?php
+ if(empty(!$defaultartexist || Config::defaultart())) {
+ ?>
+ <label for="defaultbody">Or edit default BODY element</label>
+ <textarea name="defaultbody" id="defaultbody" cols="30" rows="10"><?= Config::defaultbody() ?></textarea>
+ <?php
+ }
+ ?>
+
+
+ <h2>Editing</h2>
+
+ <label for="existnot">Tooltip hover internal link when page does not exist yet</label>
+ <input type="text" name="existnot" id="existnot" value="<?= Config::existnot() ?>">
+
+ <label for="showeditmenu">Show editor menu in top right corner of pages</label>
+ <input type="checkbox" name="showeditmenu" id="showeditmenu" <?= Config::showeditmenu() === true ? 'checked' : '' ?>>
+
+ <?php
+ if(Config::showeditmenu() === true) {
+ ?>
+ <label for="editsymbol">Symbol</label>
+ <select name="editsymbol" id="editsymbol">
+ <?php
+ foreach (Model::EDIT_SYMBOLS as $symbol) {
+ ?>
+ <option value="<?= $symbol ?>" <?= Config::editsymbol() === $symbol ? 'selected' : '' ?>><?= $symbol ?></option>
+ <?php
+ }
+ ?>
+ </select>
+ <?php
+ }
+ ?>
+
+ <input type="submit" value="submit">
+
+ </form>
+
+
+
+
+</section>
+</body>
+
+<?php $this->stop('page') ?> \ No newline at end of file
diff --git a/app/view/templates/hometopbar.php b/app/view/templates/backtopbar.php
index ff0b5f8..1f4a246 100644
--- a/app/view/templates/hometopbar.php
+++ b/app/view/templates/backtopbar.php
@@ -25,12 +25,21 @@ User level : <?= $user->level() ?>
<span>
-| <a href="">media</a>
-| <a href="">admin</a>
+<a href="<?= $this->url('home') ?>">home</a>
+<?php
+if($user->isadmin()) {
+?>
+<a href="<?= $this->url('font') ?>">font</a>
+<a href="<?= $this->url('admin') ?>">admin</a>
+<?php
+}
+?>
</span>
+
+
<?php } ?>
</div> \ No newline at end of file
diff --git a/app/view/templates/font.php b/app/view/templates/font.php
index e294031..1bd64a2 100644
--- a/app/view/templates/font.php
+++ b/app/view/templates/font.php
@@ -1,9 +1,13 @@
-<?php $this->layout('layout', ['title' => 'font', 'css' => $css . 'font.css']) ?>
+<?php $this->layout('layout', ['title' => 'font', 'css' => $css . 'home.css']) ?>
<?php $this->start('page') ?>
<body>
+
+ <?php $this->insert('backtopbar', ['user' => $user]) ?>
+
+
<section class="font">
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index 0d09238..24e378b 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -8,7 +8,7 @@
<body>
- <?php $this->insert('hometopbar', ['user' => $user]) ?>
+ <?php $this->insert('backtopbar', ['user' => $user]) ?>
<?php if($user->iseditor()) { ?>
@@ -28,7 +28,7 @@
<div id="main">
<h2>Articles</h2>
-<form action="./" method="post">
+<form action="/massedit" method="post">
<div id="massedit">
@@ -40,6 +40,7 @@
<option value="erasetag">erase all tags</option>
<option value="erasetemplate">erase template</option>
<option value="delete">delete</option>
+ <option value="render">render</option>
</select>
<input type="submit" name="massaction" value="do" onclick="confirmSubmit(event, 'Are you sure')" >