From 93c827446737252c36d6d9daee7e2e7a55eb911b Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 9 Aug 2019 15:58:37 +0200 Subject: New Feature : Alert pages have more options --- app/view/templates/admin.php | 367 ++++++++++++++++++++++++++----------------- app/view/templates/alert.php | 104 ++++++++++++ app/view/templates/read.php | 56 ++----- 3 files changed, 333 insertions(+), 194 deletions(-) create mode 100644 app/view/templates/alert.php (limited to 'app/view') diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index c1d7ff4..98027dc 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -8,237 +8,310 @@ insert('backtopbar', ['user' => $user, 'tab' => 'admin']) ?> -
+
-
+
-
+ -
+
-

Administration

+

Administration

- -
+ +
-
+
-

Home page

+

Home page

-

Here you can set the home-page view for visitors.

+

Here you can set the home-page view for visitors.

-
- > - -
+
+ > + +
-
- > - -
+
+ > + +
-
- > - -
+
+ > + +
- + - - - + + - + ?> + -
+
-
+
-

Page creation

+

Page creation

- - +

What really happend when you create a new page

+ + - - - - - - + + -
+ + + + -
+
+
-

Editing

- - +

Alert pages

+

Common options

-

Render

+ + -
- - > - -
+ + -

Links

- -
- - > - -
-
- - > - -
+ + - (This modifications need re-rendering) -

Edit quick menu

-
- - > - -
+

Un-existing

- - - - + + This will also be shown as a tooltip over links. + -
+
+ + > + +
+

Private

+ + +
+ + > + +
+

Not published

-
+ + -

CSS

+
+ + > + +
- - +

CSS

- - +
+ + > + +
-
+

+ You can use body.alert class to specify style. +

+
+ + +
+ +

Render

+
+ + > + +
+

Links

+
+ + > + +
-
+
+ + > + +
-

Interface

+ (This modifications need re-rendering) -

Set interface Style

+

Edit quick menu

- + > + + + + + + - + } + ?> + +
+ + + + + +
+ +

CSS

+ + + + + + + +
+ + + + + + + +
+ +

Interface

+ +

Set interface Style

+ + -
+
-
+
-

Tracking

+

Tracking

- - + + - (Need rendering to work) + (Need rendering to work) -
+
-
- -
+
+ +
-
+ -
+
-
+
stop('page') ?> \ No newline at end of file diff --git a/app/view/templates/alert.php b/app/view/templates/alert.php new file mode 100644 index 0000000..ff29e30 --- /dev/null +++ b/app/view/templates/alert.php @@ -0,0 +1,104 @@ +layout('readerlayout') ?> + +start('head'); +?> + + + ' : '' ?> + + + +stop(); +?> + + + +start('page') ?> + + + +
+ + insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist, 'canedit' => $canedit]); + } + + ?> + + + + + ' . Config::alerttitle() . '' : '' ?> + + +
+ + + + +
+

'; + + + if(!$artexist) { + if(!empty(Config::existnot())) { + echo '

' . Config::existnot() . '

'; + } + if(Config::existnotpass() && !$canedit) { + echo $form; + } + } else { + + + + switch ($art->secure()) { + case 1: + if(!empty(Config::private())) { + echo '

' . Config::private() . '

'; + } + if(Config::privatepass()) { + echo $form; + } + break; + + case 2: + if(!empty(Config::notpublished())) { + echo '

' . Config::notpublished() . '

'; + } + if(Config::notpublishedpass()) { + echo $form; + } + break; + } + } + + + + if ($canedit) { + ?> +

⭐ Create

+ +

+ + + + +
+ + + + +stop() ?> \ No newline at end of file diff --git a/app/view/templates/read.php b/app/view/templates/read.php index f8201cc..54b137e 100644 --- a/app/view/templates/read.php +++ b/app/view/templates/read.php @@ -3,69 +3,31 @@ start('head'); -if ($artexist) { - if ($canread) { - echo $head; - } else { - $this->insert('arthead', ['title' => $art->title(), 'description' => $art->description()]); - } -} else { - $this->insert('arthead', ['title' => $art->id(), 'description' => $alertnotexist]); -} - - +echo $head; $this->stop(); ?> - - - - - - start('page') ?> - - - + - insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist, 'canedit' => $canedit]); - } - ?> - - insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist, 'canedit' => $canedit]); + } - if ($canread) { - echo $body; - } else { - echo '

'.$alertprivate.'

'; - } - } else { - if(!empty(Config::existnot())) { - echo '

' . Config::existnot() . '

'; - } - if ($user->iseditor()) { - ?> - ⭐ Create - - ?> - - + stop() ?> \ No newline at end of file -- cgit v1.2.3