aboutsummaryrefslogtreecommitdiff
path: root/w/view/templates
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-10 21:43:24 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-10 21:43:24 +0100
commit2f363e8fa26ab849539e64ff7caa21bd164e8979 (patch)
tree238f2689e44bfc26329f970ced4c678b1ab6818d /w/view/templates
parent687b1f851abbb28750d2921d4f5beaac24b3249d (diff)
downloadwcms-2f363e8fa26ab849539e64ff7caa21bd164e8979.tar.gz
wcms-2f363e8fa26ab849539e64ff7caa21bd164e8979.zip
sidebars-html-inserts
Diffstat (limited to 'w/view/templates')
-rw-r--r--w/view/templates/edit.php27
-rw-r--r--w/view/templates/editleftbar.php (renamed from w/view/templates/editsidebar.php)34
-rw-r--r--w/view/templates/editrightbar.php20
-rw-r--r--w/view/templates/edittabs.php2
-rw-r--r--w/view/templates/edittopbar.php26
5 files changed, 78 insertions, 31 deletions
diff --git a/w/view/templates/edit.php b/w/view/templates/edit.php
index ee231cd..33d42f4 100644
--- a/w/view/templates/edit.php
+++ b/w/view/templates/edit.php
@@ -3,42 +3,33 @@
-
-<?php $this->start('customhead') ?>
- <script src="./rsc/js/app.js"></script>
-<?php $this->stop() ?>
-
-
-
-
-
-
<?php $this->start('page') ?>
+<style>.tabs textarea{font-size: <?= Config::fontsize() ?>px}</style>
+
<body>
+<section class="editor">
<?php $this->insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]) ?>
<?php $this->insert('edittopbar', ['art' => $art]) ?>
- <?php $this->insert('editsidebar', ['art' => $art]) ?>
-
-<style>textarea{font-size: <?= Config::fontsize() ?>px}</style>
+ <div id="workspace">
- <?php
- $tablist = ['section' => $art->md(), 'css' => $art->css(), 'header' => $art->header(), 'nav' => $art->nav(), 'aside' => $art->aside(), 'footer' => $art->footer(), 'html' => $art->html(), 'javascript' => $art->javascript()];
- $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface()])
- ?>
+ <?php $this->insert('editleftbar', ['art' => $art, 'tablist' => $tablist, 'artlist' => $artlist, 'showleftpanel' => $showleftpanel]) ?>
+ <?php $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface()]) ?>
+ <?php $this->insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel]) ?>
-
+ </div>
<input type="hidden" name="id" value="<?= $art->id() ?>">
</form>
+</section>
</body>
<?php $this->stop() ?> \ No newline at end of file
diff --git a/w/view/templates/editsidebar.php b/w/view/templates/editleftbar.php
index 99612dd..7533599 100644
--- a/w/view/templates/editsidebar.php
+++ b/w/view/templates/editleftbar.php
@@ -1,4 +1,7 @@
-<div class="sidebar">
+<div id="leftbar">
+ <input id="showleftpanel" name="workspace[showleftpanel]" value="1" class="toggle" type="checkbox" <?= $showleftpanel == true ? 'checked' : '' ?>>
+ <label for="showleftpanel" class="toogle">◧</label>
+ <div id="leftbarpanel" class="panel">
<details id="editinfo" open>
<summary>Infos</summary>
<fieldset>
@@ -21,7 +24,33 @@
<summary>Advanced</summary>
<fieldset>
<h3>Template options</h3>
- <p>NOT WORKING</p>
+ <ul>
+ <?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">';
+ ?>
+ <option value="" <?= $template === '' ? 'selected' : '' ?>>--no template--</option>
+ <?php
+ foreach ($artlist as $artid ) {
+
+ ?>
+ <option value="<?= $artid ?>" <?= $template === $artid ? 'selected' : '' ?>><?= $artid ?></option>
+ <?php
+ }
+ echo '</select>';
+ echo '</li>';
+ }
+
+
+ ?>
+ </ul>
</fieldset>
</details>
<details id="editcss" open>
@@ -36,5 +65,6 @@
</div>
</details>
+ </div>
</div> \ No newline at end of file
diff --git a/w/view/templates/editrightbar.php b/w/view/templates/editrightbar.php
new file mode 100644
index 0000000..92d5f81
--- /dev/null
+++ b/w/view/templates/editrightbar.php
@@ -0,0 +1,20 @@
+<div id="rightbar">
+ <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>
+ <?php
+ foreach ($artlist as $item ) {
+ ?>
+ <a href="?id=<?= $item ?>&aff=edit"><?= $item ?></a>
+ <input type="text" value="[<?= $item ?>](=<?= $item ?>)">
+ <?php
+ }
+
+ ?>
+ </details>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/w/view/templates/edittabs.php b/w/view/templates/edittabs.php
index c65a7c7..efb1650 100644
--- a/w/view/templates/edittabs.php
+++ b/w/view/templates/edittabs.php
@@ -10,7 +10,7 @@ foreach ($tablist as $key => $value) {
}
echo '<label for="tab' . $key . '">' . $key . '</label>';
echo '<div class="content">';
- echo '<textarea name="' . $key . '" id="' . $key . '" >' . $value . '</textarea>';
+ echo '<textarea name="' . $key . '" id="' . $key . '" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">' . $value . '</textarea>';
echo '</div>';
echo '</div>';
}
diff --git a/w/view/templates/edittopbar.php b/w/view/templates/edittopbar.php
index 9973335..20c2d8b 100644
--- a/w/view/templates/edittopbar.php
+++ b/w/view/templates/edittopbar.php
@@ -1,23 +1,29 @@
-<div id="submit">
- <!-- <input type="submit" name="action" value="home" accesskey="w" onclick="document.getElementById('artedit').submit();" form="artedit"> -->
+<div id="topbar">
+ <form id="delete" action="./" method="get">
+ <input type="hidden" name="id" value="<?= $art->id() ?>">
+ </form>
+
+ <form action="?id=<?= $art->id() ?>&action=update" method="post" id="update">
+
+ <span>
<input type="submit" name="action" value="update" accesskey="x" form="update">
- <!-- <input type="submit" name="action" value="display" accesskey="c" onclick="document.getElementById('artedit').submit();" form="artedit"> -->
-
+ </span>
- <form id="delete" action="./" method="get">
- <input type="hidden" name="id" value="<?= $art->id() ?>">
- <input type="submit" name="action" value="delete" form="delete">
- </form>
+ <span>
+ <input type="submit" name="action" value="delete" form="delete">
+ </span>
+ <span>
<a href="?id=<?= $art->id() ?>" target="_blank">👁</a>
<a href="?id=<?= $art->id() ?>&aff=log" target="_blank">¶</a>
+ </span>
<span id="headid"><?= $art->id() ?></span>
-
- <form action="?id=<?= $art->id() ?>&action=update" method="post" id="update">
+<span>
<label for="fontsize">Font-size</label>
<input type="number" name="fontsize" value="<?= Config::fontsize() ?>" id="fontsize">
+</span>
</div> \ No newline at end of file