From 50e367e56b367259a2e6fb29621c97e9b0fc9c5e Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 18 Aug 2019 03:33:11 +0200 Subject: interface home update --- app/class/controllerhome.php | 12 +- app/view/templates/backtopbar.php | 3 +- app/view/templates/home.php | 366 ++++++++++++++++++-------------------- app/view/templates/homemenu.php | 49 +++++ app/view/templates/homeopt.php | 292 +++++++++++++++--------------- 5 files changed, 377 insertions(+), 345 deletions(-) create mode 100644 app/view/templates/homemenu.php (limited to 'app') diff --git a/app/class/controllerhome.php b/app/class/controllerhome.php index e177272..5a6d839 100644 --- a/app/class/controllerhome.php +++ b/app/class/controllerhome.php @@ -62,7 +62,17 @@ class Controllerhome extends Controller public function search() { if(isset($_POST['id']) && !empty($_POST['id'])) { - $this->routedirect('artread/', ['art' => $_POST['id']]); + if(isset($_POST['action'])) { + switch ($_POST['action']) { + case 'read': + $this->routedirect('artread/', ['art' => $_POST['id']]); + break; + + case 'edit': + $this->routedirect('artedit', ['art' => $_POST['id']]); + break; + } + } } else { $this->routedirect('home'); } diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index 91ccd89..8e15d14 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -3,7 +3,8 @@
- + +iseditor() ? '' : '' ?>
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index bf00301..f2d2668 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -10,196 +10,182 @@ insert('backtopbar', ['user' => $user, 'tab' => 'home']) ?> -iseditor()) { ?> - -
- - - - - - - - insert('homeopt', ['opt' => $opt, 'user' => $user]) ?> - -
- -
- -

Pages ()

- - -
- Import W JSON page file - Upload page file as json -
- - - - -
- - -
- - -
- - -
- - -
- -
-
- -
> - Generate list - Generate code to display a list of pages -
- - - - description() ? 'checked' : '' ?>> - -
- - thumbnail() ? 'checked' : '' ?>> - -
- - date() ? 'checked' : '' ?>> - -
- - author() ? 'checked' : '' ?>> - -
- - -
- - ' . $optlist->getcode() . ''; - } - - ?> -
- - - -
- -
- - - - -
- - - - - - - - - - - issupereditor()) { ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - issupereditor()) { ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
xideditseedeldltagtitlesummarytofromlast modificationdate of creationdateprivacyvisiteditaff
tag('sort') ?>title() ?>description('short') ?>linkto('sort') ?>linkfrom('sort') ?>datemodif('hrdi') ?>datecreation('hrdi') ?>date('dmy') ?>secure('string') ?>visitcount() ?>editcount() ?>affcount() ?>
-
-
-
-
- - - -insert('footer', ['footer' => $footer]) ?> + iseditor()) { ?> + + + + insert('homemenu', ['user' => $user]) ?> + + +
+ + + insert('homeopt', ['opt' => $opt, 'user' => $user]) ?> + +
+ +
+ +

Pages ()

+ + +
> + Generate list + Generate code to display a list of pages +
+ + + + description() ? 'checked' : '' ?>> + +
+ + thumbnail() ? 'checked' : '' ?>> + +
+ + date() ? 'checked' : '' ?>> + +
+ + author() ? 'checked' : '' ?>> + +
+ + +
+ + ' . $optlist->getcode() . ''; + } + + ?> +
+ + + +
+ +
+ + +
+ + + + + + + + + + issupereditor()) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + issupereditor()) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xideditseedeldltagtitlesummarytofromlast modificationdate of creationdateprivacyvisiteditaff
tag('sort') ?>title() ?>description('short') ?>linkto('sort') ?>linkfrom('sort') ?>datemodif('hrdi') ?>datecreation('hrdi') ?>date('dmy') ?>secure('string') ?>visitcount() ?>editcount() ?>affcount() ?>
+
+ +
+ +
+
+ + insert('footer', ['footer' => $footer]) ?> + + diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php new file mode 100644 index 0000000..2dd486c --- /dev/null +++ b/app/view/templates/homemenu.php @@ -0,0 +1,49 @@ + \ No newline at end of file diff --git a/app/view/templates/homeopt.php b/app/view/templates/homeopt.php index 8b1b7d7..27d5625 100644 --- a/app/view/templates/homeopt.php +++ b/app/view/templates/homeopt.php @@ -1,154 +1,140 @@ -
-

Options

-
- -⬅ - -
- -
Sort - -
-order() == '1' ? "checked" : "" ?>/> -
-order() == '-1' ? "checked" : "" ?>/> - -
- -
Privacy
    -
  • secure() == 4 ? "checked" : "" ?>/>
  • -
  • secure() == 2 ? "checked" : "" ?>/>
  • -
  • secure() == 1 ? "checked" : "" ?>/>
  • -
  • secure() == 0 ? "checked" : "" ?>/>
  • -
- -
Tag - -
    - -tagcompare() == "OR" ? "checked" : "" ?> > -tagcompare() == "AND" ? "checked" : "" ?>> - -taglist() as $tagfilter => $count) { - - if ($count > $limit && $in == false) { - echo '
    >' . $limit . ''; - $in = true; - } - if ($count == $limit && $in == true && $out == false) { - echo '
    ' . $limit . ''; - $out = true; - } - - if (in_array($tagfilter, $opt->tagfilter())) { - - echo '
  • '; - } else { - echo '
  • '; - } -} -if ($in = true || $out = true) { - echo '
    '; -} -?> - -
- -
- -
- Author(s) - -
    - -authorcompare() == "OR" ? "checked" : "" ?> > -authorcompare() == "AND" ? "checked" : "" ?>> - -authorlist() as $authorfilter => $count) { - - if ($count > $limit && $in == false) { - echo '
    >' . $limit . ''; - $in = true; - } - if ($count == $limit && $in == true && $out == false) { - echo '
    ' . $limit . ''; - $out = true; - } - - if (in_array($authorfilter, $opt->authorfilter())) { - - echo '
  • '; - } else { - echo '
  • '; - } -} -if ($in = true || $out = true) { - echo '
    '; -} -?> - -
+
- - invert() == 1) { - echo ''; - } else { - echo ''; - } - echo '
- - - -⬅ - -isadmin()) { ?> - - - -

Columns

- -
- -
    - - -
  • - columns()) ? 'checked' : '' ?>> - -
  • - - -
- - - -
- - - -
+ \ No newline at end of file -- cgit v1.2.3