From 0968351067f99e8afc882d4237902642e608e6f5 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 18 Oct 2019 15:50:34 +0200 Subject: Big naming Clean-up Art -> Page --- app/view/templates/admin.php | 20 +++--- app/view/templates/alert.php | 12 ++-- app/view/templates/backtopbar.php | 2 +- app/view/templates/confirmdelete.php | 17 +++-- app/view/templates/connect.php | 6 +- app/view/templates/edit.php | 14 ++-- app/view/templates/editleftbar.php | 70 +++++++++---------- app/view/templates/editrightbar.php | 16 ++--- app/view/templates/edittopbar.php | 10 +-- app/view/templates/home.php | 8 +-- app/view/templates/homemenu.php | 2 +- app/view/templates/navart.php | 129 ----------------------------------- app/view/templates/updatemerge.php | 2 +- 13 files changed, 89 insertions(+), 219 deletions(-) delete mode 100644 app/view/templates/navart.php (limited to 'app/view') diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index c1f3b73..46e5045 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -47,9 +47,9 @@ - + Or, create new page BODY based on an already existing one - + - + @@ -114,9 +114,9 @@ diff --git a/app/view/templates/alert.php b/app/view/templates/alert.php index 24f77ed..c4a54b1 100644 --- a/app/view/templates/alert.php +++ b/app/view/templates/alert.php @@ -35,14 +35,14 @@ $this->stop(); $form = '

- - + +

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

' . Config::existnot() . '

'; } @@ -53,7 +53,7 @@ $this->stop(); - switch ($art->secure()) { + switch ($page->secure()) { case 1: if(!empty(Config::private())) { echo '

' . Config::private() . '

'; @@ -78,11 +78,11 @@ $this->stop(); if ($canedit) { ?> -

⭐ Create

+

⭐ Create

-

+

isadmin()) {
- + diff --git a/app/view/templates/confirmdelete.php b/app/view/templates/confirmdelete.php index 7d8f62a..133f32b 100644 --- a/app/view/templates/confirmdelete.php +++ b/app/view/templates/confirmdelete.php @@ -4,26 +4,25 @@ start('page') ?> -insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]) ?>

Delete

    -
  • Id : id() ?>
  • -
  • Title : title() ?>
  • -
  • Article(s) linked to this one : linkto('sort') ?>
  • -
  • Article(s) linked from this one : linkfrom('sort') ?>
  • -
  • Number of edits : editcount() ?>
  • +
  • Id : id() ?>
  • +
  • Title : title() ?>
  • +
  • Article(s) linked to this one : linkto('sort') ?>
  • +
  • Article(s) linked from this one : linkfrom('sort') ?>
  • +
  • Number of edits : editcount() ?>
-linkto())) { ?> +linkto())) { ?>

Article linked to :

    -linkto('array') as $linkto) { +linkto('array') as $linkto) { echo '
  • ' . $linkto . '
  • '; } ?>
@@ -34,7 +33,7 @@
- +
diff --git a/app/view/templates/connect.php b/app/view/templates/connect.php index 82c01ec..dca4303 100644 --- a/app/view/templates/connect.php +++ b/app/view/templates/connect.php @@ -14,7 +14,7 @@
'; } ?> @@ -34,8 +34,8 @@ if(in_array($route, ['artedit', 'artread', 'artread/', 'artadd'])) { back to page read view

'; +if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) { + echo '

back to page read view

'; } ?> diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 7cebcc7..4c7fc61 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -1,4 +1,4 @@ -layout('layout', ['title' => '✏ '.$art->title(), 'css' => $css . 'edit.css', 'favicon' => $art->favicon()]) ?> +layout('layout', ['title' => '✏ '.$page->title(), 'css' => $css . 'edit.css', 'favicon' => $page->favicon()]) ?> @@ -10,16 +10,16 @@
- insert('backtopbar', ['user' => $user, 'tab' => 'edit', 'pagelist' => $pagelist, 'pageid' => $art->id()]) ?> + insert('backtopbar', ['user' => $user, 'tab' => 'edit', 'pagelist' => $pagelist, 'pageid' => $page->id()]) ?> - insert('edittopbar', ['art' => $art, 'user' => $user]) ?> + insert('edittopbar', ['page' => $page, 'user' => $user]) ?>
- insert('editleftbar', ['art' => $art, 'tablist' => $tablist, 'artlist' => $artlist, 'showleftpanel' => $showleftpanel, 'faviconlist' => $faviconlist]) ?> - insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface(), 'templates' => $art->template()]) ?> - insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel, 'templates' => $art->template(), 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'editorlist' => $editorlist, 'user' => $user]) ?> + insert('editleftbar', ['page' => $page, 'tablist' => $tablist, 'pagelist' => $pagelist, 'showleftpanel' => $showleftpanel, 'faviconlist' => $faviconlist]) ?> + insert('edittabs', ['tablist' => $tablist, 'opentab' => $page->interface(), 'templates' => $page->template()]) ?> + insert('editrightbar', ['page' => $page, 'pagelist' => $pagelist, 'showrightpanel' => $showrightpanel, 'templates' => $page->template(), 'tagpagelist' => $tagpagelist, 'lasteditedpagelist' => $lasteditedpagelist, 'editorlist' => $editorlist, 'user' => $user]) ?>
@@ -28,7 +28,7 @@
diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index bd3fd15..d169473 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -3,40 +3,40 @@
- +
Infos
- + - + - + - + - + - no-thumbnail + no-thumbnail
@@ -61,16 +61,16 @@ -
templatebody()) || !empty($art->templatecss()) || !empty($art->templatejavascript()) ? 'open' : '' ?>> +
templatebody()) || !empty($page->templatecss()) || !empty($page->templatejavascript()) ? 'open' : '' ?>> Template
- + - + templatecss())) { + if(!empty($page->templatecss())) { ?>
- templateoptions()) ? 'checked' : '' ?>> + templateoptions()) ? 'checked' : '' ?>>
- templateoptions()) ? 'checked' : '' ?>> + templateoptions()) ? 'checked' : '' ?>>
- templateoptions()) ? 'checked' : '' ?>> + templateoptions()) ? 'checked' : '' ?>>
- templateoptions()) ? 'checked' : '' ?>> + templateoptions()) ? 'checked' : '' ?>>
templateoptions() as $option) { + foreach($page->templateoptions() as $option) { if($option != 'externaljavascript') { echo ''; } @@ -123,11 +123,11 @@ templateoptions()) ? 'checked' : '' ?>> + templateoptions()) ? 'checked' : '' ?>> templateoptions())) { + if(in_array('externaljavascript', $page->templateoptions())) { echo ''; } @@ -152,7 +152,7 @@
-
externalcss()) || !empty($art->customhead()) ? 'open' : '' ?>> +
externalcss()) || !empty($page->customhead()) ? 'open' : '' ?>> Advanced @@ -163,7 +163,7 @@ externalcss() as $css) { + foreach ($page->externalcss() as $css) { ?>
@@ -174,7 +174,7 @@ ?> - + diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php index 15cef7f..b0518ad 100644 --- a/app/view/templates/editrightbar.php +++ b/app/view/templates/editrightbar.php @@ -8,9 +8,9 @@ Last edited
    -
  • id() ? '➤' : '✎' ?>
  • +
  • id() ? '➤' : '✎' ?>
  • Tags $idlist) { + foreach ($tagpagelist as $tag => $idlist) { if(count($idlist) > 1) { ?> @@ -31,11 +31,11 @@ echo '
      '; foreach ($idlist as $id) { - if($id === $art->id()) { + if($id === $page->id()) { echo '
    • ➤ '.$id.'
    • '; } else { ?> -
    • +
    • $id) { if(!empty($id) && !is_bool($id)) { ?> -
    • :
    • +
    • :
    • authors()); + $notyetauthorlist = array_diff($editorlist, $page->authors()); foreach ($notyetauthorlist as $author) { echo ''; } @@ -83,7 +83,7 @@ authors()); + $alreadyauthorlist = array_intersect($editorlist, $page->authors()); foreach ($alreadyauthorlist as $author) { ?>
      diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php index 04331b4..8d158d6 100644 --- a/app/view/templates/edittopbar.php +++ b/app/view/templates/edittopbar.php @@ -2,7 +2,7 @@ - +
      @@ -17,8 +17,8 @@ - display - id() ?> + display + id() ?> @@ -28,12 +28,12 @@ - download + download - delete + delete
      diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 17d0a22..f767b13 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -87,11 +87,11 @@ - - - + + + issupereditor()) { ?> - + tag('sort') ?> diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 8716c17..f807f7c 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -6,7 +6,7 @@ File