From c5f895b72fe86a3316b10e696b40ca505064d46e Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 26 May 2019 23:06:08 +0200 Subject: [PATCH] Updated search function, include view button, improves for small devices --- bl-kernel/admin/views/content.php | 32 ++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php index 48223a72..575dbac7 100644 --- a/bl-kernel/admin/views/content.php +++ b/bl-kernel/admin/views/content.php @@ -61,8 +61,13 @@ function table($type) { '.$L->g('Title').' - '.$L->g('URL').' - '.$L->g('Actions').' + '; + + if ($type=='published' || $type=='static' || $type=='sticky') { + echo ''.$L->g('URL').''; + } + + echo ' '.$L->g('Actions').' @@ -85,11 +90,14 @@ function table($type) { '; + if ($type=='published' || $type=='static' || $type=='sticky') { $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key(); echo ''.$friendlyURL.''; + } - echo ''.PHP_EOL; - echo ''.$L->g('Edit').''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.$L->g('View').''.PHP_EOL; + echo ''.$L->g('Edit').''.PHP_EOL; if (count($page->children())==0) { echo ''.$L->g('Delete').''.PHP_EOL; } @@ -111,11 +119,14 @@ function table($type) { '; + if ($type=='published' || $type=='static' || $type=='sticky') { $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key(); echo ''.$friendlyURL.''; + } - echo ''.PHP_EOL; - echo ''.$L->g('Edit').''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.$L->g('View').''.PHP_EOL; + echo ''.$L->g('Edit').''.PHP_EOL; echo ''.$L->g('Delete').''.PHP_EOL; echo ''; @@ -143,11 +154,14 @@ function table($type) { '; + if ($type=='published' || $type=='static' || $type=='sticky') { $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key(); echo ''.$friendlyURL.''; + } - echo ''.PHP_EOL; - echo ''.$L->g('Edit').''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.$L->g('View').''.PHP_EOL; + echo ''.$L->g('Edit').''.PHP_EOL; if (count($page->children())==0) { echo ''.$L->g('Delete').''.PHP_EOL; } @@ -256,7 +270,7 @@ function table($type) { var title = searchArray[item]['title']; html = '
'; html += '
'+title+'
'; - html += ''; + html += ''; html += '
'; return html; }