aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/class/modelhome.php2
-rw-r--r--app/class/optlist.php12
-rw-r--r--app/view/templates/home.php50
-rw-r--r--app/view/templates/homemenu.php50
4 files changed, 63 insertions, 51 deletions
diff --git a/app/class/modelhome.php b/app/class/modelhome.php
index c30da44..1154e78 100644
--- a/app/class/modelhome.php
+++ b/app/class/modelhome.php
@@ -11,7 +11,7 @@ class Modelhome extends Modelart
{
$opt = new Opt(Art2::classvarlist());
- $opt->setcol(['id', 'tag', 'linkfrom', 'linkto', 'description', 'title', 'datemodif', 'datecreation', 'date', 'secure', 'visitcount']);
+ $opt->setcol(['id', 'tag', 'linkfrom', 'linkto', 'description', 'title', 'datemodif', 'datecreation', 'date', 'secure', 'visitcount', 'editcount', 'affcount']);
$opt->settaglist($table);
$opt->setauthorlist($table);
$opt->submit();
diff --git a/app/class/optlist.php b/app/class/optlist.php
index 11e6f72..1fed661 100644
--- a/app/class/optlist.php
+++ b/app/class/optlist.php
@@ -2,6 +2,7 @@
class Optlist extends Opt
{
+ protected $title = 1;
protected $description = 0;
protected $thumbnail = 0;
protected $date = 0;
@@ -32,6 +33,11 @@ class Optlist extends Opt
// _______________________________________ G E T _____________________________________
+ public function title()
+ {
+ return $this->title;
+ }
+
public function description()
{
return $this->description;
@@ -58,9 +64,13 @@ class Optlist extends Opt
}
-
// _______________________________________ S E T _____________________________________
+ public function settitle($title)
+ {
+ $this->title = intval($title);
+ }
+
public function setdescription($description)
{
$this->description = intval($description);
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">