diff options
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/admin.php | 20 | ||||
-rw-r--r-- | app/view/templates/alert.php | 12 | ||||
-rw-r--r-- | app/view/templates/backtopbar.php | 2 | ||||
-rw-r--r-- | app/view/templates/confirmdelete.php | 17 | ||||
-rw-r--r-- | app/view/templates/connect.php | 6 | ||||
-rw-r--r-- | app/view/templates/edit.php | 14 | ||||
-rw-r--r-- | app/view/templates/editleftbar.php | 70 | ||||
-rw-r--r-- | app/view/templates/editrightbar.php | 16 | ||||
-rw-r--r-- | app/view/templates/edittopbar.php | 10 | ||||
-rw-r--r-- | app/view/templates/home.php | 8 | ||||
-rw-r--r-- | app/view/templates/homemenu.php | 2 | ||||
-rw-r--r-- | app/view/templates/navart.php | 129 | ||||
-rw-r--r-- | app/view/templates/updatemerge.php | 2 |
13 files changed, 89 insertions, 219 deletions
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 @@ <option value="" <?= Config::homeredirect() === null ? 'selected' : '' ?>>--select page to redirect--</option> <?php - foreach ($artlist as $art) { + foreach ($pagelist as $page) { ?> - <option value="<?= $art ?>" <?= Config::homeredirect() === $art ? 'selected' : '' ?>><?= $art ?></option> + <option value="<?= $page ?>" <?= Config::homeredirect() === $page ? 'selected' : '' ?>><?= $page ?></option> <?php } @@ -76,19 +76,19 @@ - <label for="defaultart">Or, create new page BODY based on an already existing one</label> - <select name="defaultart" id="defaultart"> - <option value="" <?= Config::defaultart() === '' || !$defaultartexist ? 'selected' : '' ?>>--use default BODY element--</option> + <label for="defaultpage">Or, create new page BODY based on an already existing one</label> + <select name="defaultpage" id="defaultpage"> + <option value="" <?= Config::defaultpage() === '' || !$defaultpageexist ? 'selected' : '' ?>>--use default BODY element--</option> <?php - foreach ($artlist as $art) { + foreach ($pagelist as $page) { ?> - <option value="<?= $art ?>" <?= Config::defaultart() === $art ? 'selected' : '' ?>><?= $art ?></option> + <option value="<?= $page ?>" <?= Config::defaultpage() === $page ? 'selected' : '' ?>><?= $page ?></option> <?php } ?> </select> <?php - if (empty(!$defaultartexist || Config::defaultart())) { + if (empty(!$defaultpageexist || Config::defaultpage())) { ?> <label for="defaultbody">Edit default BODY element</label> <textarea name="defaultbody" id="defaultbody" cols="30" rows="10"><?= Config::defaultbody() ?></textarea> @@ -114,9 +114,9 @@ <select name="alertlink" id="alertlink"> <option value="" <?= empty(Config::alertlink()) ? 'selected' : '' ?>>--No link--</option> <?php - foreach ($artlist as $art) { + foreach ($pagelist as $page) { ?> - <option value="<?= $art ?>" <?= Config::alertlink() === $art ? 'selected' : '' ?>><?= $art ?></option> + <option value="<?= $page ?>" <?= Config::alertlink() === $page ? 'selected' : '' ?>><?= $page ?></option> <?php } ?> </select> 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 = '<p> <form action="' . $this->url('log') .'" method="post"> <input type="password" name="pass" id="loginpass" placeholder="password"> - <input type="hidden" name="route" value="artread/"> - <input type="hidden" name="id" value="' . $art->id() . '"> + <input type="hidden" name="route" value="pageread/"> + <input type="hidden" name="id" value="' . $page->id() . '"> <input type="submit" name="log" value="login" id="button"> </form> </p>'; - if(!$artexist) { + if(!$pageexist) { if(!empty(Config::existnot())) { echo '<h2>' . Config::existnot() . '</h2>'; } @@ -53,7 +53,7 @@ $this->stop(); - switch ($art->secure()) { + switch ($page->secure()) { case 1: if(!empty(Config::private())) { echo '<h2>' . Config::private() . '</h2>'; @@ -78,11 +78,11 @@ $this->stop(); if ($canedit) { ?> - <p><a href="<?= $this->uart('artadd', $art->id()) ?>">⭐ Create</a></p> + <p><a href="<?= $this->upage('pageadd', $page->id()) ?>">⭐ Create</a></p> <?php } elseif(!empty(Config::alertlink())) { ?> - <p><a href="<?= $this->uart('artread/', Config::alertlink()) ?>"><?= empty(Config::alertlinktext()) ? Config::alertlink() : Config::alertlinktext() ?></a></p> + <p><a href="<?= $this->upage('pageread/', Config::alertlink()) ?>"><?= empty(Config::alertlinktext()) ? Config::alertlink() : Config::alertlinktext() ?></a></p> <?php } diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index 76ec90f..d10d5da 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -66,7 +66,7 @@ if($user->isadmin()) { <form action="<?= $this->url('log') ?>" method="post" id="connect"> <input type="submit" name="log" value="logout" > <?php if($tab === 'edit') { ?> - <input type="hidden" name="route" value="artread/"> + <input type="hidden" name="route" value="pageread/"> <input type="hidden" name="id" value="<?= $pageid ?>"> <?php } ?> 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 @@ <?php $this->start('page') ?> -<?php $this->insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]) ?> <div> <h1>Delete</h1> <ul> -<li>Id : <?= $art->id() ?></li> -<li>Title : <?= $art->title() ?></li> -<li>Article(s) linked to this one : <?= $art->linkto('sort') ?></li> -<li>Article(s) linked from this one : <?= $art->linkfrom('sort') ?></li> -<li>Number of edits : <?= $art->editcount() ?></li> +<li>Id : <?= $page->id() ?></li> +<li>Title : <?= $page->title() ?></li> +<li>Article(s) linked to this one : <?= $page->linkto('sort') ?></li> +<li>Article(s) linked from this one : <?= $page->linkfrom('sort') ?></li> +<li>Number of edits : <?= $page->editcount() ?></li> </ul> -<?php if (!empty($art->linkto())) { ?> +<?php if (!empty($page->linkto())) { ?> <h2>Article linked to :</h2> <ul> -<?php foreach ($art->linkto('array') as $linkto) { +<?php foreach ($page->linkto('array') as $linkto) { echo '<li><a href="./?id=' . $linkto . '">' . $linkto . '</a></li>'; } ?> </ul> @@ -34,7 +33,7 @@ </div> -<form action="<?= $this->uart('artdelete', $art->id()) ?>" method="post"> +<form action="<?= $this->upage('pagedelete', $page->id()) ?>" method="post"> <input type="hidden" name="deleteconfirm" value="true"> <input type="submit" value="confirm delete"> </form> 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 @@ <form action="<?= $this->url('log') ?>" method="post"> <input type="hidden" name="route" value="<?= $route ?>"> <?php -if(in_array($route, ['artedit', 'artread', 'artread/', 'artadd'])) { +if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) { echo '<input type="hidden" name="id" value="'. $id .'">'; } ?> @@ -34,8 +34,8 @@ if(in_array($route, ['artedit', 'artread', 'artread/', 'artadd'])) { <?php } ?> <?php -if(in_array($route, ['artedit', 'artread', 'artread/', 'artadd'])) { - echo '<p><a href="' . $this->uart('artread/', $id) . '">back to page read view</a></p>'; +if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) { + echo '<p><a href="' . $this->upage('pageread/', $id) . '">back to page read view</a></p>'; } ?> 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 @@ -<?php $this->layout('layout', ['title' => '✏ '.$art->title(), 'css' => $css . 'edit.css', 'favicon' => $art->favicon()]) ?> +<?php $this->layout('layout', ['title' => '✏ '.$page->title(), 'css' => $css . 'edit.css', 'favicon' => $page->favicon()]) ?> @@ -10,16 +10,16 @@ <body> <main class="editor"> - <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit', 'pagelist' => $pagelist, 'pageid' => $art->id()]) ?> + <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit', 'pagelist' => $pagelist, 'pageid' => $page->id()]) ?> - <?php $this->insert('edittopbar', ['art' => $art, 'user' => $user]) ?> + <?php $this->insert('edittopbar', ['page' => $page, 'user' => $user]) ?> <div id="workspace"> - <?php $this->insert('editleftbar', ['art' => $art, 'tablist' => $tablist, 'artlist' => $artlist, 'showleftpanel' => $showleftpanel, 'faviconlist' => $faviconlist]) ?> - <?php $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface(), 'templates' => $art->template()]) ?> - <?php $this->insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel, 'templates' => $art->template(), 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'editorlist' => $editorlist, 'user' => $user]) ?> + <?php $this->insert('editleftbar', ['page' => $page, 'tablist' => $tablist, 'pagelist' => $pagelist, 'showleftpanel' => $showleftpanel, 'faviconlist' => $faviconlist]) ?> + <?php $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $page->interface(), 'templates' => $page->template()]) ?> + <?php $this->insert('editrightbar', ['page' => $page, 'pagelist' => $pagelist, 'showrightpanel' => $showrightpanel, 'templates' => $page->template(), 'tagpagelist' => $tagpagelist, 'lasteditedpagelist' => $lasteditedpagelist, 'editorlist' => $editorlist, 'user' => $user]) ?> </div> @@ -28,7 +28,7 @@ </main> <script> - const artid = '<?= $art->id() ?>'; + const pageid = '<?= $page->id() ?>'; </script> <script src="<?= Model::jspath() ?>edit.js"></script> </body> 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 @@ <label for="showleftpanel" class="toogle">◧</label> <div id="leftbarpanel" class="panel"> - <input type="hidden" name="thisdatemodif" value="<?= $art->datemodif('string') ?>"> + <input type="hidden" name="thisdatemodif" value="<?= $page->datemodif('string') ?>"> <details id="editinfo" open> <summary>Infos</summary> <fieldset> <label for="title">title :</label> - <input type="text" name="title" id="title" value="<?= $art->title(); ?>"> + <input type="text" name="title" id="title" value="<?= $page->title(); ?>"> <label for="description">Description :</label> - <input type="text" name="description" id="description" value="<?= $art->description(); ?>"> + <input type="text" name="description" id="description" value="<?= $page->description(); ?>"> <label for="tag">Tag(s) :</label> - <input type="text" name="tag" id="tag" value="<?= $art->tag('string'); ?>"> + <input type="text" name="tag" id="tag" value="<?= $page->tag('string'); ?>"> <label for="secure">Privacy level :</label> <select name="secure" id="secure"> - <option value="0" <?= $art->secure() == 0 ? 'selected' : '' ?>>public</option> - <option value="1" <?= $art->secure() == 1 ? 'selected' : '' ?>>private</option> - <option value="2" <?= $art->secure() == 2 ? 'selected' : '' ?>>not published</option> + <option value="0" <?= $page->secure() == 0 ? 'selected' : '' ?>>public</option> + <option value="1" <?= $page->secure() == 1 ? 'selected' : '' ?>>private</option> + <option value="2" <?= $page->secure() == 2 ? 'selected' : '' ?>>not published</option> </select> <label for="date">Date</label> - <input type="date" name="pdate" value="<?= $art->date('pdate') ?>" id="date"> + <input type="date" name="pdate" value="<?= $page->date('pdate') ?>" id="date"> <label for="time">Time</label> - <input type="time" name="ptime" value="<?= $art->date('ptime') ?>" id="time"> + <input type="time" name="ptime" value="<?= $page->date('ptime') ?>" id="time"> <label for="favicon">Favicon</label> <select name="favicon" id="favicon"> <?php - if(!empty($art->templatecss()) && $art->template()['cssfavicon']) { + if(!empty($page->templatecss()) && $page->template()['cssfavicon']) { ?> - <option value="<?= $art->favicon() ?>">--using template favicon--</option> + <option value="<?= $page->favicon() ?>">--using template favicon--</option> <?php } else { echo '<option value="">--no favicon--</option>'; foreach ($faviconlist as $favicon) { ?> - <option value="<?= $favicon ?>" <?= $art->favicon() === $favicon ? 'selected' : '' ?>><?= $favicon ?></option> + <option value="<?= $favicon ?>" <?= $page->favicon() === $favicon ? 'selected' : '' ?>><?= $favicon ?></option> <?php } } @@ -46,7 +46,7 @@ <div id="thumbnail"> <label for="thumbnail">Thumbnail</label> <input type="file" id="thumbnail" name="thumbnail" accept=".jpg, .JPG, .jpeg, .JPEG"> - <img src="<?= Model::thumbnailpath() ?><?= $art->id() ?>.jpg" alt="no-thumbnail"> + <img src="<?= Model::thumbnailpath() ?><?= $page->id() ?>.jpg" alt="no-thumbnail"> </div> @@ -61,16 +61,16 @@ - <details <?= !empty($art->templatebody()) || !empty($art->templatecss()) || !empty($art->templatejavascript()) ? 'open' : '' ?>> + <details <?= !empty($page->templatebody()) || !empty($page->templatecss()) || !empty($page->templatejavascript()) ? 'open' : '' ?>> <summary>Template</summary> <fieldset> <label for="templatebody">BODY template</label> <select name="templatebody" id="templatebody"> - <option value="" <?= empty($art->templatebody()) ? 'selected' : '' ?>>--no template--</option> + <option value="" <?= empty($page->templatebody()) ? 'selected' : '' ?>>--no template--</option> <?php - foreach ($artlist as $template) { + foreach ($pagelist as $template) { ?> - <option value="<?= $template ?>" <?= $art->templatebody() === $template ? 'selected' : '' ?>><?= $template ?></option> + <option value="<?= $template ?>" <?= $page->templatebody() === $template ? 'selected' : '' ?>><?= $template ?></option> <?php } ?> @@ -79,39 +79,39 @@ <label for="templatecss">CSS template</label> <select name="templatecss" id="templatecss"> - <option value="" <?= empty($art->templatecss()) ? 'selected' : '' ?>>--no template--</option> + <option value="" <?= empty($page->templatecss()) ? 'selected' : '' ?>>--no template--</option> <?php - foreach ($artlist as $template) { + foreach ($pagelist as $template) { ?> - <option value="<?= $template ?>" <?= $art->templatecss() === $template ? 'selected' : '' ?>><?= $template ?></option> + <option value="<?= $template ?>" <?= $page->templatecss() === $template ? 'selected' : '' ?>><?= $template ?></option> <?php } ?> </select> <?php - if(!empty($art->templatecss())) { + if(!empty($page->templatecss())) { ?> <div class="subtemplate"> - <input type="checkbox" name="templateoptions[]" id="oreccursivecss" value="reccursivecss" <?= in_array('reccursivecss', $art->templateoptions()) ? 'checked' : '' ?>> + <input type="checkbox" name="templateoptions[]" id="oreccursivecss" value="reccursivecss" <?= in_array('reccursivecss', $page->templateoptions()) ? 'checked' : '' ?>> <label for="oreccursivecss">Reccursive template</label> </div> <div class="subtemplate"> - <input type="checkbox" name="templateoptions[]" id="oquickcss" value="quickcss" <?= in_array('quickcss', $art->templateoptions()) ? 'checked' : '' ?>> + <input type="checkbox" name="templateoptions[]" id="oquickcss" value="quickcss" <?= in_array('quickcss', $page->templateoptions()) ? 'checked' : '' ?>> <label for="oquickcss">Quickcss</label> </div> <div class="subtemplate"> - <input type="checkbox" name="templateoptions[]" id="oexternalcss" value="externalcss" <?= in_array('externalcss', $art->templateoptions()) ? 'checked' : '' ?>> + <input type="checkbox" name="templateoptions[]" id="oexternalcss" value="externalcss" <?= in_array('externalcss', $page->templateoptions()) ? 'checked' : '' ?>> <label for="oexternalcss">External CSS</label> </div> <div class="subtemplate"> - <input type="checkbox" name="templateoptions[]" id="ofavicon" value="favicon" <?= in_array('favicon', $art->templateoptions()) ? 'checked' : '' ?>> + <input type="checkbox" name="templateoptions[]" id="ofavicon" value="favicon" <?= in_array('favicon', $page->templateoptions()) ? 'checked' : '' ?>> <label for="ofavicon">Favicon</label> </div> <?php } else { - foreach($art->templateoptions() as $option) { + foreach($page->templateoptions() as $option) { if($option != 'externaljavascript') { echo '<input type="hidden" name="templateoptions[]" value="'.$option.'">'; } @@ -123,11 +123,11 @@ <label for="templatejavascript">Javascript template</label> <select name="templatejavascript" id="templatejavascript"> - <option value="" <?= empty($art->templatejavascript()) ? 'selected' : '' ?>>--no template--</option> + <option value="" <?= empty($page->templatejavascript()) ? 'selected' : '' ?>>--no template--</option> <?php - foreach ($artlist as $template) { + foreach ($pagelist as $template) { ?> - <option value="<?= $template ?>" <?= $art->templatejavascript() === $template ? 'selected' : '' ?>><?= $template ?></option> + <option value="<?= $template ?>" <?= $page->templatejavascript() === $template ? 'selected' : '' ?>><?= $template ?></option> <?php } ?> @@ -135,15 +135,15 @@ <?php - if(!empty($art->templatejavascript())) { + if(!empty($page->templatejavascript())) { ?> <div class="subtemplate"> - <input type="checkbox" name="templateoptions[]" value="externaljavascript" id="oexternaljs" <?= in_array('externaljavascript', $art->templateoptions()) ? 'checked' : '' ?>> + <input type="checkbox" name="templateoptions[]" value="externaljavascript" id="oexternaljs" <?= in_array('externaljavascript', $page->templateoptions()) ? 'checked' : '' ?>> <label for="oexternaljs">external js</label> </div> <?php } else { - if(in_array('externaljavascript', $art->templateoptions())) { + if(in_array('externaljavascript', $page->templateoptions())) { echo '<input type="hidden" name="templateoptions[]" value="externaljavascript">'; } @@ -152,7 +152,7 @@ </fieldset> </details> - <details id="advanced" <?= !empty($art->externalcss()) || !empty($art->customhead()) ? 'open' : '' ?>> + <details id="advanced" <?= !empty($page->externalcss()) || !empty($page->customhead()) ? 'open' : '' ?>> <summary>Advanced</summary> @@ -163,7 +163,7 @@ <label for="externalcss">External CSS</label> <input type="text" name="externalcss[]" id="externalcss" placeholder="add external adress"> <?php - foreach ($art->externalcss() as $css) { + foreach ($page->externalcss() as $css) { ?> <div class="checkexternal"> <input type="checkbox" name="externalcss[]" id="<?= $css ?>" value="<?= $css ?>" checked> @@ -174,7 +174,7 @@ ?> <label for="customhead">Custom head</label> - <textarea name="customhead" wrap="off" spellcheck="false" rows="<?= $art->customhead('int') ?>"><?= $art->customhead() ?></textarea> + <textarea name="customhead" wrap="off" spellcheck="false" rows="<?= $page->customhead('int') ?>"><?= $page->customhead() ?></textarea> </fieldset> 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 @@ <summary>Last edited</summary> <ul> <?php - foreach ($lasteditedartlist as $id) { + foreach ($lasteditedpagelist as $id) { ?> - <li><a href="<?= $this->uart('artedit', $id) ?>"><?= $id === $art->id() ? '➤' : '✎' ?> <?= $id ?></a></li> + <li><a href="<?= $this->upage('pageedit', $id) ?>"><?= $id === $page->id() ? '➤' : '✎' ?> <?= $id ?></a></li> <?php } @@ -23,7 +23,7 @@ <details id="tags" open> <summary>Tags</summary> <?php - foreach ($tagartlist as $tag => $idlist) { + foreach ($tagpagelist as $tag => $idlist) { if(count($idlist) > 1) { ?> <strong><?= $tag ?></strong> @@ -31,11 +31,11 @@ echo '<ul>'; foreach ($idlist as $id) { - if($id === $art->id()) { + if($id === $page->id()) { echo '<li>➤ '.$id.'</li>'; } else { ?> - <li><a href="<?= $this->uart('artedit', $id) ?>">✎ <?= $id ?></a></li> + <li><a href="<?= $this->upage('pageedit', $id) ?>">✎ <?= $id ?></a></li> <?php } } @@ -54,7 +54,7 @@ foreach ($templates as $template => $id) { if(!empty($id) && !is_bool($id)) { ?> - <li><?= $template ?> : <?= $id ?> <a href="<?= $this->uart('artedit', $id) ?>">✎</a></li> + <li><?= $template ?> : <?= $id ?> <a href="<?= $this->upage('pageedit', $id) ?>">✎</a></li> <?php } } @@ -74,7 +74,7 @@ <select name="authors[]" id="authors"> <option value="" selected>--add author--</option> <?php - $notyetauthorlist = array_diff($editorlist, $art->authors()); + $notyetauthorlist = array_diff($editorlist, $page->authors()); foreach ($notyetauthorlist as $author) { echo '<option value="'.$author.'" >'.$author.'</option>'; } @@ -83,7 +83,7 @@ </select> <?php - $alreadyauthorlist = array_intersect($editorlist, $art->authors()); + $alreadyauthorlist = array_intersect($editorlist, $page->authors()); foreach ($alreadyauthorlist as $author) { ?> <div class="checkexternal"> 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 @@ - <form action="<?= $this->uart('artupdate', $art->id()) ?>" method="post" id="update" enctype="multipart/form-data"> + <form action="<?= $this->upage('pageupdate', $page->id()) ?>" method="post" id="update" enctype="multippage/form-data"> <div id="editmenu"> @@ -17,8 +17,8 @@ - <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" ><img src="<?= Model::iconpath() ?>read.png" class="icon">display</a> - <span id="headid"><?= $art->id() ?></span> + <a href="<?= $this->upage('pageread/', $page->id()) ?>" target="_blank" ><img src="<?= Model::iconpath() ?>read.png" class="icon">display</a> + <span id="headid"><?= $page->id() ?></span> </span> <span id="fontsize"> @@ -28,12 +28,12 @@ </span> <span id="download"> - <a href="<?= $this->uart('artdownload', $art->id()) ?>"><img src="<?= Model::iconpath() ?>download.png" class="icon"><span class="text">download</span></a> + <a href="<?= $this->upage('pagedownload', $page->id()) ?>"><img src="<?= Model::iconpath() ?>download.png" class="icon"><span class="text">download</span></a> </span> <span id="delete"> - <a href="<?= $this->uart('artconfirmdelete', $art->id()) ?>"><span class="symbol">✖</span><span class="text">delete</span></a> + <a href="<?= $this->upage('pageconfirmdelete', $page->id()) ?>"><span class="symbol">✖</span><span class="text">delete</span></a> </span> </div> 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 @@ <tr> <td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>"></td> <td><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td> - <td><a href="<?= $this->uart('artedit', $item->id()) ?>"><img src="<?= Model::iconpath() ?>edit.png" class="icon"></a></td> - <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank"><img src="<?= Model::iconpath() ?>read.png" class="icon"></a></td> - <td class="delete"><a href="<?= $this->uart('artdelete', $item->id()) ?>">✖</a></td> + <td><a href="<?= $this->upage('pageedit', $item->id()) ?>"><img src="<?= Model::iconpath() ?>edit.png" class="icon"></a></td> + <td><a href="<?= $this->upage('pageread/', $item->id()) ?>" target="_blank"><img src="<?= Model::iconpath() ?>read.png" class="icon"></a></td> + <td class="delete"><a href="<?= $this->upage('pagedelete', $item->id()) ?>">✖</a></td> <?php if ($user->issupereditor()) { ?> - <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download><img src="<?= Model::iconpath() ?>download.png" class="icon"></a></td> + <td><a href="<?= $this->upage('pagedownload', $item->id()) ?>" download><img src="<?= Model::iconpath() ?>download.png" class="icon"></a></td> <?php } if ($columns['tag']) { ?> <td class="tag"><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td> 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 @@ <summary>File</summary> <div class="submenu"> <h2>Import page as file</h2> - <form action="<?= $this->url('artupload') ?>" method="post" enctype="multipart/form-data"> + <form action="<?= $this->url('pageupload') ?>" method="post" enctype="multipart/form-data"> <input type="file" name="pagefile" id="pagefile" accept=".json"> <label for="pagefile">JSON Page file</label> <input type="hidden" name="erase" value="0"> diff --git a/app/view/templates/navart.php b/app/view/templates/navart.php deleted file mode 100644 index 0e690c2..0000000 --- a/app/view/templates/navart.php +++ /dev/null @@ -1,129 +0,0 @@ -<style> -.wqn, .wqn *, .wqn:hover *, .wqn *:hover{ - all:initial; - -} -.wqn { - position: fixed; - top: 0; - right: 0; - z-index: 10; - background-color: var(--color1); -} - -.wqn div#dropwqn { - background-color: lightgrey; - text-align: right; - font-family: monospace; -} - -.wqn li.drop{ - display: block; - text-align: right; -} - -.wqn li.drop a.button:hover, .wqn li.drop input[type="submit"]:hover { - color: white; -} - -.wqn li.drop a.button, .wqn li.drop input[type="submit"] { - cursor: pointer; - font-family: monospace; - font-size: 15px; -} - -.wqn li.drop a.button, .wqn li.drop input[type="submit"] { - cursor: pointer; - font-family: monospace; - font-size: 15px; -} - -.wqn div#dropwqn { - display: none; -} - -.wqn input#loginpass { - width: 70px; - background-color: white; -} - -.wqn:hover div#dropwqn { - display: block; -} - -</style> - - -<div class="wqn" > -<div style="opacity: 0.5; text-align: right; display: block;">✎</div> - <div id="dropwqn"> - - <ul> - <li class="drop"> - <span class="button" style="font-family: monospace; background-color: #7b97b9;" ><?= $user->id() ?> (<?= $user->level() ?>)</span> - </li> - <li class="drop"> - <a class="button" href="<?= $this->url('home') ?>">home</a> - </li> - - -<?php if($user->isvisitor()) { ?> - - <li class="drop"> - <form action="<?= $this->url('log') ?>" method="post"> - <input type="password" name="pass" id="loginpass" placeholder="password"> - <input type="hidden" name="route" value="artread/"> - <input type="hidden" name="id" value="<?= $art->id() ?>"> - <input type="submit" name="log" value="login" id="button"> - </form> - </li> - -<?php } else { ?> - - <li class="drop"> - <form action="<?= $this->url('log') ?>" method="post"> - <input type="hidden" name="id" value="<?= $art->id() ?>"> - <input type="hidden" name="route" value="artread/"> - <input type="submit" name="log" value="logout" id="button"> - </form> - </li> - -<?php } ?> - - -<?php if($canedit && $artexist) { ?> - - <li class="drop"> - <a class="button" href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank">display</a> - </li> - <li class="drop"> - <a class="button" href="<?= $this->uart('artedit', $art->id()) ?>" >edit</a> - </li> - <li class="drop"> - <a class="button" href="<?= $this->uart('artrender', $art->id()) ?>" >render</a> - </li> - -<?php } ?> - - -<?php if ($user->iseditor()) { ?> - - <li class="drop"> - <a class="button" href="<?= $this->url('media') ?>" >Media</a> - </li> - -<?php } ?> - -<?php if($user->isadmin()) { ?> - - <li class="drop"> - <a class="button" href="<?= $this->url('admin') ?>" >Admin</a> - </li> - -<?php } ?> - - - - - </div> -</div>
\ No newline at end of file diff --git a/app/view/templates/updatemerge.php b/app/view/templates/updatemerge.php index f9d29bf..09476fa 100644 --- a/app/view/templates/updatemerge.php +++ b/app/view/templates/updatemerge.php @@ -3,7 +3,7 @@ foreach ($diff as $element) { echo '<h2>' . $element . '</h2>'; - echo '<textarea style="width: 100%; max-width: 600px; height: 300px;">' . $mergeart->$element() . '</textarea>'; + echo '<textarea style="width: 100%; max-width: 600px; height: 300px;">' . $mergepage->$element() . '</textarea>'; } ?>
\ No newline at end of file |