diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-12-04 20:39:48 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-12-04 20:39:48 +0100 |
commit | 42e89ac398bdf2a98167b0b71123c98e297b2130 (patch) | |
tree | 623c5e42d9b40a7372f17c070e2b39f52dc44ed1 /app/view/templates | |
parent | dd14929505e3fd0bc1710ed757b501d3ec1f6ca1 (diff) | |
download | wcms-42e89ac398bdf2a98167b0b71123c98e297b2130.tar.gz wcms-42e89ac398bdf2a98167b0b71123c98e297b2130.zip |
editor right bar
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/admin.php | 14 | ||||
-rw-r--r-- | app/view/templates/backtopbar.php | 22 | ||||
-rw-r--r-- | app/view/templates/confirmdelete.php | 2 | ||||
-rw-r--r-- | app/view/templates/edit.php | 4 | ||||
-rw-r--r-- | app/view/templates/editleftbar.php | 78 | ||||
-rw-r--r-- | app/view/templates/editrightbar.php | 60 | ||||
-rw-r--r-- | app/view/templates/edittabs.php | 2 | ||||
-rw-r--r-- | app/view/templates/font.php | 10 |
8 files changed, 148 insertions, 44 deletions
diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index d913186..7f94833 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -12,6 +12,9 @@ <form action="<?= $this->url('adminupdate') ?>" method="post"> + <input type="submit" value="Update configuration"> + + <h2>Passwords</h2> <label for="admin">Admin password</label> <input type="password" name="admin" id="admin" value="<?= Config::admin() ?>"> @@ -19,7 +22,7 @@ <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> + <label for="defaultart">Create new page BODY based on an already existing one</label> <select name="defaultart" id="defaultart"> <option value="" <?= Config::defaultart() === '' || !$defaultartexist ? 'selected' : '' ?>>--use default BODY element--</option> <?php @@ -33,7 +36,7 @@ <?php if(empty(!$defaultartexist || Config::defaultart())) { ?> - <label for="defaultbody">Or edit default BODY element</label> + <label for="defaultbody">Edit default BODY element</label> <textarea name="defaultbody" id="defaultbody" cols="30" rows="10"><?= Config::defaultbody() ?></textarea> <?php } @@ -65,7 +68,12 @@ } ?> - <input type="submit" value="submit"> + <h2>CSS</h2> + + <label for="globalcss">Edit global css that will apply to every pages</label> + <textarea name="globalcss" id="globalcss" cols="30" rows="10"><?= $globalcss ?></textarea> + + <input type="submit" value="Update configuration"> </form> diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index 1f4a246..a06c304 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -1,29 +1,38 @@ <div id="topbar"> +<span id="user"> + <?php if($user->isvisitor()) { ?> -<form action="<?= $this->url('log') ?>" method="post"> +<form action="<?= $this->url('log') ?>" method="post" id="connect"> <input type="password" name="pass" id="loginpass" placeholder="password"> <input type="submit" name="log" value="login"> </form> -<?php } else { ?> +<?php } else { ?> -<form action="<?= $this->url('log') ?>" method="post"> +<span> +User level : <?= $user->level() ?> +</span> + + +<form action="<?= $this->url('log') ?>" method="post" id="connect"> <input type="submit" name="log" value="logout"> </form> -<span> -User level : <?= $user->level() ?> + + </span> + + + <?php } ?> <?php if($user->iseditor()) { ?> - <span> <a href="<?= $this->url('home') ?>">home</a> <?php @@ -34,6 +43,7 @@ if($user->isadmin()) { <?php } ?> +| <i><a href="https://github.com/vincent-peugnet/wcms" target="_blank">github↝</a></i> </span> diff --git a/app/view/templates/confirmdelete.php b/app/view/templates/confirmdelete.php index e05f6da..7d8f62a 100644 --- a/app/view/templates/confirmdelete.php +++ b/app/view/templates/confirmdelete.php @@ -11,7 +11,7 @@ <h1>Delete</h1> <ul> -<li>Id : <?= $art->title() ?></li> +<li>Id : <?= $art->id() ?></li> <li>Title : <?= $art->title() ?></li> <li>Article(s) linked to this one : <?= $art->linkto('sort') ?></li> <li>Article(s) linked from this one : <?= $art->linkfrom('sort') ?></li> diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 8071964..346d5bb 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -19,8 +19,8 @@ <div id="workspace"> <?php $this->insert('editleftbar', ['art' => $art, 'tablist' => $tablist, 'artlist' => $artlist, 'showleftpanel' => $showleftpanel]) ?> - <?php $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface(), 'template' => $art->template()]) ?> - <?php $this->insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel, 'fonts' => $fonts]) ?> + <?php $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface(), 'templates' => $art->template()]) ?> + <?php $this->insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel, 'templates' => $art->template(), 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist]) ?> </div> diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index 2f184af..73468bf 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -24,37 +24,73 @@ <input type="time" name="ptime" value="<?= $art->date('ptime') ?>" id="time"> </fieldset> </details> - <details> + <details open> <summary>Advanced</summary> <fieldset> <h3>Template options</h3> - <ul> + <label for="templatebody">BODY template</label> + <select name="templatebody" id="templatebody"> + <option value="" <?= empty($art->templatebody()) ? 'selected' : '' ?>>--no template--</option> + <?php + foreach ($artlist as $template) { + ?> + <option value="<?= $template ?>" <?= $art->templatebody() === $template ? 'selected' : '' ?>><?= $template ?></option> + <?php + } + ?> + </select> + + + <label for="templatecss">CSS template</label> + <select name="templatecss" id="templatecss"> + <option value="" <?= empty($art->templatecss()) ? 'selected' : '' ?>>--no template--</option> + <?php + foreach ($artlist as $template) { + ?> + <option value="<?= $template ?>" <?= $art->templatecss() === $template ? 'selected' : '' ?>><?= $template ?></option> + <?php + } + ?> + </select> + <?php - foreach ($tablist as $element => $value) { - if(isset($art->template()[$element])) { - $template = $art->template()[$element]; - } else { - $template = ''; - } - echo '<li>'; - echo '<label for="'.$element.'template">'.$element.'</label>'; - echo '<select name="template['.$element.']" id="'.$element.'template">'; + if(!empty($art->templatecss())) { ?> - <option value="" <?= $template === '' ? 'selected' : '' ?>>--no template--</option> + <div class="subtemplate"> + <input type="checkbox" name="iquickcss" id="iquickcss"> + <label for="iquickcss">Quickcss</label> + </div> + <div class="subtemplate"> + <input type="checkbox" name="iexternalcss" id="iexternalcss"> + <label for="iexternalcss">External CSS</label> + </div> + <div class="subtemplate"> + <input type="checkbox" name="iicon" id="iicon"> + <label for="iicon">Page Icon</label> + </div> <?php - foreach ($artlist as $artid ) { - - ?> - <option value="<?= $artid ?>" <?= $template === $artid ? 'selected' : '' ?>><?= $artid ?></option> - <?php - } - echo '</select>'; - echo '</li>'; } + ?> + + <label for="templatejavascript">Javascript template</label> + <select name="templatejavascript" id="templatejavascript"> + <option value="" <?= empty($art->templatejavascript()) ? 'selected' : '' ?>>--no template--</option> + <?php + foreach ($artlist as $template) { + ?> + <option value="<?= $template ?>" <?= $art->templatejavascript() === $template ? 'selected' : '' ?>><?= $template ?></option> + <?php + } ?> - </ul> + </select> + <div class="subtemplate"> + <input type="checkbox" name="iexternaljs" id="iexternaljs"> + <label for="iexternaljs">external js</label> + </div> + + </fieldset> </details> <details id="editcss" open> diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php index fa249ef..9572678 100644 --- a/app/view/templates/editrightbar.php +++ b/app/view/templates/editrightbar.php @@ -2,26 +2,66 @@ <input id="showrightpanel" name="workspace[showrightpanel]" value="1" class="toggle" type="checkbox" <?= $showrightpanel == true ? 'checked' : '' ?>> <label for="showrightpanel" class="toogle">◧</label> <div id="rightbarpanel" class="panel"> - <details id="linkassist" open> - <summary>Links</summary> + + + <details id="lastedited" open> + <summary>Last edited</summary> + <ul> + <?php + foreach ($lasteditedartlist as $id) { + ?> + <li><a href="<?= $this->uart('artedit', $id) ?>"><?= $id === $art->id() ? '★' : '✎' ?> <?= $id ?></a></li> <?php - foreach ($artlist as $item ) { + } + + ?> + </ul> + + </details> + + + <details id="tags" open> + <summary>Tags</summary> + <?php + foreach ($tagartlist as $tag => $idlist) { + if(count($idlist) > 1) { ?> - <a href="<?= $this->uart('artedit', $item) ?>" target="_blank"><?= $item ?></a> + <strong><?= $tag ?></strong> <?php + + echo '<ul>'; + foreach ($idlist as $id) { + if($id === $art->id()) { + echo '<li>★ '.$id.'</li>'; + } else { + ?> + <li><a href="<?= $this->uart('artedit', $id) ?>">✎ <?= $id ?></a></li> + <?php + } + } + } + echo '</ul>'; } ?> + </details> - <details id="fonts" open> - <summary>Fonts</summary> - <select multiple> + + <details id="tempaltes" open> + <summary>Templates</summary> + <ul> <?php - foreach ($fonts as $font ) { - echo '<option value="'.$font.'">'.$font.'</option>'; + foreach ($templates as $template => $id) { + if(!empty($id)) { + ?> + <li><?= $template ?> : <?= $id ?> <a href="<?= $this->uart('artedit', $id) ?>">✎</a></li> + <?php + } } + ?> - </select> + </ul> + </details> </div> diff --git a/app/view/templates/edittabs.php b/app/view/templates/edittabs.php index 6e1562a..0829c48 100644 --- a/app/view/templates/edittabs.php +++ b/app/view/templates/edittabs.php @@ -7,7 +7,7 @@ foreach ($tablist as $key => $value) { <input name="interface" type="radio" value="<?= $key ?>" id="tab<?= $key ?>" class="checkboxtab" <?= $key == $opentab ? 'checked' : '' ?> > - <label for="tab<?= $key ?>" <?= empty($template[$key]) ? '' : 'title="template : '.$template[$key].'" ' ?> class="<?= empty($template[$key]) ? '' : 'template' ?> <?= empty($value) ? '' : 'edited' ?>"><?= $key ?> </label> + <label for="tab<?= $key ?>" <?= empty($templates[$key]) ? '' : 'title="template : '.$templates[$key].'" ' ?> class="<?= empty($templates[$key]) ? '' : 'template' ?> <?= empty($value) ? '' : 'edited' ?>"><?= $key ?> </label> <?php diff --git a/app/view/templates/font.php b/app/view/templates/font.php index 1bd64a2..6e55686 100644 --- a/app/view/templates/font.php +++ b/app/view/templates/font.php @@ -11,9 +11,17 @@ <section class="font"> +<h1>Fonts</h1> + + +<div> <a href="<?= $this->url('fontrender') ?>">⚡ Render</a> +</div> +<div> <a href="<?= $fontfile ?>" target="_blank">👓 View font CSS file</a> +</div> +<h2>Add Font</h2> <form action="<?= $this->url('fontadd') ?>" method="post" enctype="multipart/form-data"> <label for="font">Font file <i>(<?= $fonttypes ?>)</i></label> @@ -24,6 +32,8 @@ </form> +<h2>Font stock</h2> + <table id="fontlist"> <tr> <th>font</th> |