diff options
Diffstat (limited to 'w/view/templates/read.php')
-rw-r--r-- | w/view/templates/read.php | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/w/view/templates/read.php b/w/view/templates/read.php index 4964a47..35b1e7d 100644 --- a/w/view/templates/read.php +++ b/w/view/templates/read.php @@ -1,6 +1,22 @@ -<?php $this->layout('layout', ['title' => $art->title(), 'description' => $art->description()]) ?> +<?php $this->layout('readerlayout') ?> +<?php +$this->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]); +} + + + +$this->stop(); +?> @@ -16,22 +32,26 @@ - <?php $this->insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]) ?> + <?php + if ($readernav) { + $this->insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]); + } + ?> <?php - if($artexist) { + if ($artexist) { - if($display) { - $this->insert('readart', ['art' => $art]); + if ($canread) { + echo $body; } else { - echo '<h1>You dont have enought rights to see this article</h1>'; + echo '<h1>'.$alertprivate.'</h1>'; } } else { - echo '<h1>This article does not exist yet</h1>'; + echo '<h1>' . $alertnotexist . '</h1>'; if ($cancreate) { $this->insert('readcreate', ['id' => $art->id()]); } |