aboutsummaryrefslogtreecommitdiff
path: root/app/view
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-08-21 15:25:53 +0200
committervincent-peugnet <v.peugnet@free.fr>2019-08-21 15:25:53 +0200
commit59e670424ef9d7769e4252fe0f83e42d39a5c9b4 (patch)
tree478df7f249f0977f0ffeccfa958e8e66cfe17780 /app/view
parent470ff90cfa4fa50a25e428454465da37aff0aa40 (diff)
downloadwcms-59e670424ef9d7769e4252fe0f83e42d39a5c9b4.tar.gz
wcms-59e670424ef9d7769e4252fe0f83e42d39a5c9b4.zip
Fix : get list code moved to selection
Diffstat (limited to 'app/view')
-rw-r--r--app/view/templates/home.php50
-rw-r--r--app/view/templates/homemenu.php50
2 files changed, 51 insertions, 49 deletions
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index 867baee..820d185 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -14,7 +14,10 @@
- <?php $this->insert('homemenu', ['user' => $user, 'opt' => $opt]) ?>
+ <?php
+ $optlist = $optlist ?? null;
+ $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist]);
+ ?>
<main class="home">
@@ -28,51 +31,6 @@
<h2>Pages (<?= count($table2) ?>)</h2>
-
- <details id="list" class="hidephone" <?= isset($optlist) ? 'open' : '' ?>>
- <summary>Generate list</summary>
- <i>Generate code to display a list of pages</i>
- <form action="<?= $this->url('homequery') ?>" method="post">
- <input type="hidden" name="query" value="1">
-
- <input type="hidden" name="description" value="0">
- <input type="checkbox" name="description" id="list_description" value="1" <?= isset($optlist) && $optlist->description() ? 'checked' : '' ?>>
- <label for="list_description">Show description</label>
- </br>
- <input type="hidden" name="thumbnail" value="0">
- <input type="checkbox" name="thumbnail" id="list_thumbnail" value="1" <?= isset($optlist) && $optlist->thumbnail() ? 'checked' : '' ?>>
- <label for="list_thumbnail">Show thumbnail</label>
- </br>
- <input type="hidden" name="date" value="0">
- <input type="checkbox" name="date" id="list_date" value="1" <?= isset($optlist) && $optlist->date() ? 'checked' : '' ?>>
- <label for="list_date">Show date</label>
- </br>
- <input type="hidden" name="author" value="0">
- <input type="checkbox" name="author" id="list_author" value="1" <?= isset($optlist) && $optlist->author() ? 'checked' : '' ?>>
- <label for="list_author">Show author(s)</label>
- </br>
- <select name="style" id="list_style">
- <option value="0">list</option>
- <option value="1" <?= isset($optlist) && $optlist->style() == 1 ? 'selected' : '' ?>>div</option>
- </select>
- <input type="submit" value="generate">
- </form>
-
- <?php
- if (isset($optlist)) {
- echo '<code>' . $optlist->getcode() . '</code>';
- }
-
- ?>
- </details>
-
-
-
- <form action="/massedit" method="post">
-
- </form>
-
-
<div class="scroll">
<table id="home2table">
diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php
index 1003f7d..0a22513 100644
--- a/app/view/templates/homemenu.php
+++ b/app/view/templates/homemenu.php
@@ -61,18 +61,62 @@
</div>
</details>
- <details class="hidephone" id="actions">
- <summary>Actions</summary>
+
+
+
+
+
+ <details class="hidephone" id="selection" <?= !empty($optlist) ? 'open' : '' ?>>
+ <summary>Selection</summary>
<div class="submenu">
<h2>Rendering</h2>
<form action="<?= $this->url('homerenderall') ?>" method="post">
- Render all pages
+ Render selected pages
</br>
<input type="submit" value="renderall">
</form>
+ <h2>Get LIST code</h2>
+ <i>Generate code to display a list of pages</i>
+ <form action="<?= $this->url('homequery') ?>" method="post">
+ <input type="hidden" name="query" value="1">
+
+ <input type="hidden" name="title" value="0">
+ <input type="checkbox" name="title" id="list_title" value="1" <?= !empty($optlist) && !$optlist->title() ? '' : 'checked' ?>>
+ <label for="list_title">Show title</label>
+ </br>
+ <input type="hidden" name="description" value="0">
+ <input type="checkbox" name="description" id="list_description" value="1" <?= !empty($optlist) && $optlist->description() ? 'checked' : '' ?>>
+ <label for="list_description">Show description</label>
+ </br>
+ <input type="hidden" name="thumbnail" value="0">
+ <input type="checkbox" name="thumbnail" id="list_thumbnail" value="1" <?= !empty($optlist) && $optlist->thumbnail() ? 'checked' : '' ?>>
+ <label for="list_thumbnail">Show thumbnail</label>
+ </br>
+ <input type="hidden" name="date" value="0">
+ <input type="checkbox" name="date" id="list_date" value="1" <?= !empty($optlist) && $optlist->date() ? 'checked' : '' ?>>
+ <label for="list_date">Show date</label>
+ </br>
+ <input type="hidden" name="author" value="0">
+ <input type="checkbox" name="author" id="list_author" value="1" <?= !empty($optlist) && $optlist->author() ? 'checked' : '' ?>>
+ <label for="list_author">Show author(s)</label>
+ </br>
+ <select name="style" id="list_style">
+ <option value="0">list</option>
+ <option value="1" <?= !empty($optlist) && $optlist->style() == 1 ? 'selected' : '' ?>>div</option>
+ </select>
+ <input type="submit" value="generate">
+ </form>
+ <?php if(!empty($optlist)) { ?>
+ <code><?= $optlist->getcode() ?></code>
+ <?php } ?>
</div>
</details>
+
+
+
+
+
<details class="hidephone" id="bookmarks">
<summary>Bookmarks</summary>
<div class="submenu">