diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-09-25 20:26:38 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-09-25 20:26:38 +0200 |
commit | cab6c37b88830a0b3b6dcbdcb40c240b334c3b8f (patch) | |
tree | 93ec7489326c938fd24071c8e853015fd4141c27 /app | |
parent | e08d6358e5e9d849a3fd4ea3abd36ea8644325ff (diff) | |
download | wcms-cab6c37b88830a0b3b6dcbdcb40c240b334c3b8f.tar.gz wcms-cab6c37b88830a0b3b6dcbdcb40c240b334c3b8f.zip |
add time for optlist filter
Diffstat (limited to 'app')
-rw-r--r-- | app/class/modelrender.php | 3 | ||||
-rw-r--r-- | app/class/optlist.php | 11 | ||||
-rw-r--r-- | app/view/templates/homemenu.php | 4 |
3 files changed, 18 insertions, 0 deletions
diff --git a/app/class/modelrender.php b/app/class/modelrender.php index f76a922..d0be54c 100644 --- a/app/class/modelrender.php +++ b/app/class/modelrender.php @@ -618,6 +618,9 @@ class Modelrender extends Modelart if($optlist->date()) { $content .= '<code>' . $page->date('pdate') . '</code>' . PHP_EOL; } + if($optlist->time()) { + $content .= '<code>' . $page->date('ptime') . '</code>' . PHP_EOL; + } if($optlist->author()) { $content .= $page->authors('string') . PHP_EOL; } diff --git a/app/class/optlist.php b/app/class/optlist.php index 1fed661..e21e421 100644 --- a/app/class/optlist.php +++ b/app/class/optlist.php @@ -6,6 +6,7 @@ class Optlist extends Opt protected $description = 0; protected $thumbnail = 0; protected $date = 0; + protected $time = 0; protected $author = 0; protected $style = 0; @@ -53,6 +54,11 @@ class Optlist extends Opt return $this->date; } + public function time() + { + return $this->time; + } + public function author() { return $this->author; @@ -86,6 +92,11 @@ class Optlist extends Opt $this->date = intval($date); } + public function settime($time) + { + $this->time = intval($time); + } + public function setauthor($author) { $this->author = intval($author); diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 0d705d1..aa57779 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -128,6 +128,10 @@ <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="time" value="0"> + <input type="checkbox" name="time" id="list_time" value="1" <?= !empty($optlist) && $optlist->time() ? 'checked' : '' ?>> + <label for="list_time">Show time</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> |