diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-14 16:36:45 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-14 16:36:45 +0200 |
commit | 8ccc4ac00c974ba3659762e6c67f75ed82020e37 (patch) | |
tree | fc9a5b656ca13b34cb2eaac6e909b0b59ca839e8 /app/view | |
parent | ce3fcb72f2d5d154461a14183069bf87db1e5776 (diff) | |
download | wcms-8ccc4ac00c974ba3659762e6c67f75ed82020e37.tar.gz wcms-8ccc4ac00c974ba3659762e6c67f75ed82020e37.zip |
finish flashmessages implementation
+ clean css
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/admin.php | 395 | ||||
-rw-r--r-- | app/view/templates/edit.php | 2 | ||||
-rw-r--r-- | app/view/templates/home.php | 392 | ||||
-rw-r--r-- | app/view/templates/homemenu.php | 33 | ||||
-rw-r--r-- | app/view/templates/info.php | 2 | ||||
-rw-r--r-- | app/view/templates/layout.php | 14 | ||||
-rw-r--r-- | app/view/templates/media.php | 6 | ||||
-rw-r--r-- | app/view/templates/timeline.php | 4 | ||||
-rw-r--r-- | app/view/templates/user.php | 36 |
9 files changed, 431 insertions, 453 deletions
diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index 3ae8036..ab35bd0 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -3,298 +3,295 @@ <?php $this->start('page') ?> -<body> +<?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'admin', 'pagelist' => $pagelist]) ?> - <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'admin', 'pagelist' => $pagelist]) ?> +<main class="admin"> - <main class="admin"> + <nav class="admin"> - <nav class="admin"> + <div class="block"> + <h1>Administration</h1> - <div class="block"> - <h1>Administration</h1> + <div class="scroll"> + <ul> + <li><a href="#home-page">Home page</a></li> + <li><a href="#page-creation">Page creation</a></li> + <li><a href="#alert-pages">Alert Pages</a></li> + <li><a href="#render">Render</a></li> + <li><a href="#css">CSS</a></li> + <li><a href="#interface">Interface</a></li> + <li><a href="#tracking">Tracking</a></li> + </ul> - <div class="scroll"> - <ul> - <li><a href="#home-page">Home page</a></li> - <li><a href="#page-creation">Page creation</a></li> - <li><a href="#alert-pages">Alert Pages</a></li> - <li><a href="#render">Render</a></li> - <li><a href="#css">CSS</a></li> - <li><a href="#interface">Interface</a></li> - <li><a href="#tracking">Tracking</a></li> - </ul> - - <form action="<?= $this->url('adminupdate') ?>" method="post" id="admin"> - <input type="submit" value="Update configuration"> - </form> - </div> + <form action="<?= $this->url('adminupdate') ?>" method="post" id="admin"> + <input type="submit" value="Update configuration"> + </form> </div> - </nav> + </div> + </nav> - <section class="admin"> + <section class="admin"> - <div class="block"> + <div class="block"> - <h1>configuration</h1> + <h1>configuration</h1> - <div class="scroll"> + <div class="scroll"> - <h2 id="home-page">Home page</h2> + <h2 id="home-page">Home page</h2> - <p>Here you can set the home-page view for visitors.</p> + <p>Here you can set the home-page view for visitors.</p> - <div class="radio"> - <input type="radio" name="homepage" value="default" id="default" <?= Wcms\Config::homepage() === 'default' ? 'checked' : '' ?> form="admin"> - <label for="default">default</label> - </div> + <div class="radio"> + <input type="radio" name="homepage" value="default" id="default" <?= Wcms\Config::homepage() === 'default' ? 'checked' : '' ?> form="admin"> + <label for="default">default</label> + </div> - <div class="radio"> - <input type="radio" name="homepage" value="redirect" id="redirect" <?= Wcms\Config::homepage() === 'redirect' ? 'checked' : '' ?> form="admin"> - <label for="redirect">redirect to page</label> - </div> + <div class="radio"> + <input type="radio" name="homepage" value="redirect" id="redirect" <?= Wcms\Config::homepage() === 'redirect' ? 'checked' : '' ?> form="admin"> + <label for="redirect">redirect to page</label> + </div> - <select name="homeredirect" id="homeredirect" form="admin"> - <option value="" <?= Wcms\Config::homeredirect() === null ? 'selected' : '' ?>>--select page to redirect--</option> + <select name="homeredirect" id="homeredirect" form="admin"> + <option value="" <?= Wcms\Config::homeredirect() === null ? 'selected' : '' ?>>--select page to redirect--</option> - <?php - foreach ($pagelist as $page) { - ?> - <option value="<?= $page ?>" <?= Wcms\Config::homeredirect() === $page ? 'selected' : '' ?>><?= $page ?></option> - <?php - } + <?php + foreach ($pagelist as $page) { + ?> + <option value="<?= $page ?>" <?= Wcms\Config::homeredirect() === $page ? 'selected' : '' ?>><?= $page ?></option> + <?php + } - ?> - </select> + ?> + </select> - <h2 id="page-creation">Page creation</h2> + <h2 id="page-creation">Page creation</h2> - <p>What really happend when you create a new page</p> + <p>What really happend when you create a new page</p> - <label for="defaultprivacy">Default privacy</label> - <select name="defaultprivacy" id="defaultprivacy" form="admin"> - <option value="0" <?= Wcms\Config::defaultprivacy() == 0 ? 'selected' : '' ?>>public</option> - <option value="1" <?= Wcms\Config::defaultprivacy() == 1 ? 'selected' : '' ?>>private</option> - <option value="2" <?= Wcms\Config::defaultprivacy() == 2 ? 'selected' : '' ?>>not published</option> - </select> + <label for="defaultprivacy">Default privacy</label> + <select name="defaultprivacy" id="defaultprivacy" form="admin"> + <option value="0" <?= Wcms\Config::defaultprivacy() == 0 ? 'selected' : '' ?>>public</option> + <option value="1" <?= Wcms\Config::defaultprivacy() == 1 ? 'selected' : '' ?>>private</option> + <option value="2" <?= Wcms\Config::defaultprivacy() == 2 ? 'selected' : '' ?>>not published</option> + </select> - <label for="defaultbody">Edit default BODY element</label> - <textarea name="defaultbody" id="defaultbody" cols="30" rows="10" form="admin"><?= Wcms\Config::defaultbody() ?></textarea> + <label for="defaultbody">Edit default BODY element</label> + <textarea name="defaultbody" id="defaultbody" cols="30" rows="10" form="admin"><?= Wcms\Config::defaultbody() ?></textarea> - <h2 id="alert-pages">Alert pages</h2> + <h2 id="alert-pages">Alert pages</h2> - <p>Set the style and text to show when a page does not exist, or when a visitor don't have access to it.</p> + <p>Set the style and text to show when a page does not exist, or when a visitor don't have access to it.</p> - <h4>Common options</h4> + <h4>Common options</h4> - <label for="alerttitle">H1 Title</label> - <input type="text" name="alerttitle" id="alerttitle" value="<?= Wcms\Config::alerttitle() ?>" form="admin"> + <label for="alerttitle">H1 Title</label> + <input type="text" name="alerttitle" id="alerttitle" value="<?= Wcms\Config::alerttitle() ?>" form="admin"> - <label for="alertlink">Link to this page (for visitors)</label> - <select name="alertlink" id="alertlink" form="admin"> - <option value="" <?= empty(Wcms\Config::alertlink()) ? 'selected' : '' ?>>--No link--</option> - <?php - foreach ($pagelist as $page) { - ?> - <option value="<?= $page ?>" <?= Wcms\Config::alertlink() === $page ? 'selected' : '' ?>><?= $page ?></option> - <?php } - ?> - </select> - + <label for="alertlink">Link to this page (for visitors)</label> + <select name="alertlink" id="alertlink" form="admin"> + <option value="" <?= empty(Wcms\Config::alertlink()) ? 'selected' : '' ?>>--No link--</option> + <?php + foreach ($pagelist as $page) { + ?> + <option value="<?= $page ?>" <?= Wcms\Config::alertlink() === $page ? 'selected' : '' ?>><?= $page ?></option> + <?php } + ?> + </select> - <label for="alertlinktext">Link text</label> - <input type="text" name="alertlinktext" id="alertlinktext" value="<?= Wcms\Config::alertlinktext() ?>" form="admin"> + <label for="alertlinktext">Link text</label> + <input type="text" name="alertlinktext" id="alertlinktext" value="<?= Wcms\Config::alertlinktext() ?>" form="admin"> - <h4>Un-existing</h4> - <label for="existnot">Text to show when a page does not exist yet.</label> - <i>This will also be shown as a tooltip over links.</i> - <input type="text" name="existnot" id="existnot" value="<?= Wcms\Config::existnot() ?>" form="admin"> + <h4>Un-existing</h4> - <div class="checkbox"> - <input type="hidden" name="existnotpass" value="0" form="admin"> - <input type="checkbox" name="existnotpass" id="existnotpass" value="1" <?= Wcms\Config::existnotpass() ? 'checked' : '' ?> form="admin"> - <label for="existnotpass">Ask for password</label> - </div> + <label for="existnot">Text to show when a page does not exist yet.</label> + <i>This will also be shown as a tooltip over links.</i> + <input type="text" name="existnot" id="existnot" value="<?= Wcms\Config::existnot() ?>" form="admin"> - <h4>Private</h4> + <div class="checkbox"> + <input type="hidden" name="existnotpass" value="0" form="admin"> + <input type="checkbox" name="existnotpass" id="existnotpass" value="1" <?= Wcms\Config::existnotpass() ? 'checked' : '' ?> form="admin"> + <label for="existnotpass">Ask for password</label> + </div> - <label for="private">Text to show when a page is private.</label> - <input type="text" name="private" id="private" value="<?= Wcms\Config::private() ?>" form="admin"> + <h4>Private</h4> - <div class="checkbox"> - <input type="hidden" name="privatepass" value="0" form="admin"> - <input type="checkbox" name="privatepass" id="privatepass" value="1" <?= Wcms\Config::privatepass() ? 'checked' : '' ?> form="admin"> - <label for="privatepass">Ask for password</label> - </div> + <label for="private">Text to show when a page is private.</label> + <input type="text" name="private" id="private" value="<?= Wcms\Config::private() ?>" form="admin"> - <h4>Not published</h4> + <div class="checkbox"> + <input type="hidden" name="privatepass" value="0" form="admin"> + <input type="checkbox" name="privatepass" id="privatepass" value="1" <?= Wcms\Config::privatepass() ? 'checked' : '' ?> form="admin"> + <label for="privatepass">Ask for password</label> + </div> - <label for="notpublished">Text to show when a page is not published.</label> - <input type="text" name="notpublished" id="notpublished" value="<?= Wcms\Config::notpublished() ?>" form="admin"> + <h4>Not published</h4> - <div class="checkbox"> - <input type="hidden" name="notpublishedpass" value="0" form="admin"> - <input type="checkbox" name="notpublishedpass" id="notpublishedpass" value="1" <?= Wcms\Config::notpublishedpass() ? 'checked' : '' ?> form="admin"> - <label for="notpublishedpass">Ask for password</label> - </div> + <label for="notpublished">Text to show when a page is not published.</label> + <input type="text" name="notpublished" id="notpublished" value="<?= Wcms\Config::notpublished() ?>" form="admin"> - <h4>CSS</h4> + <div class="checkbox"> + <input type="hidden" name="notpublishedpass" value="0" form="admin"> + <input type="checkbox" name="notpublishedpass" id="notpublishedpass" value="1" <?= Wcms\Config::notpublishedpass() ? 'checked' : '' ?> form="admin"> + <label for="notpublishedpass">Ask for password</label> + </div> - <div class="checkbox"> - <input type="hidden" name="alertcss" value="0" form="admin"> - <input type="checkbox" name="alertcss" id="alertcss" value="1" <?= Wcms\Config::alertcss() ? 'checked' : '' ?> form="admin"> - <label for="alertcss">Use global.css for those page as well</label> - </div> + <h4>CSS</h4> - <p> - <i>You can use <code>body.alert</code> class to specify style.</i> - </p> + <div class="checkbox"> + <input type="hidden" name="alertcss" value="0" form="admin"> + <input type="checkbox" name="alertcss" id="alertcss" value="1" <?= Wcms\Config::alertcss() ? 'checked' : '' ?> form="admin"> + <label for="alertcss">Use global.css for those page as well</label> + </div> + <p> + <i>You can use <code>body.alert</code> class to specify style.</i> + </p> - <h2 id="render">Render</h2> - <div class="checkbox"> - <input type="hidden" name="reccursiverender" value="0" form="admin"> - <input type="checkbox" name="reccursiverender" id="reccursiverender" value="1" <?= Wcms\Config::reccursiverender() ? 'checked' : '' ?> form="admin"> - <label for="reccursiverender">Reccursive render</label> - </div> + <h2 id="render">Render</h2> + <div class="checkbox"> + <input type="hidden" name="reccursiverender" value="0" form="admin"> + <input type="checkbox" name="reccursiverender" id="reccursiverender" value="1" <?= Wcms\Config::reccursiverender() ? 'checked' : '' ?> form="admin"> + <label for="reccursiverender">Reccursive render</label> + </div> - <h4>Links</h4> - <div class="checkbox"> - <input type="hidden" name="externallinkblank" value="0" form="admin"> - <input type="checkbox" name="externallinkblank" id="externallinkblank" value="1" <?= Wcms\Config::externallinkblank() ? 'checked' : '' ?> form="admin"> - <label for="externallinkblank">Open external links in new tab</label> - </div> + <h4>Links</h4> - <div class="checkbox"> - <input type="hidden" name="internallinkblank" value="0" form="admin"> - <input type="checkbox" name="internallinkblank" id="internallinkblank" value="1" <?= Wcms\Config::internallinkblank() ? 'checked' : '' ?> form="admin"> - <label for="internallinkblank">Open internal links in new tab</label> - </div> + <div class="checkbox"> + <input type="hidden" name="externallinkblank" value="0" form="admin"> + <input type="checkbox" name="externallinkblank" id="externallinkblank" value="1" <?= Wcms\Config::externallinkblank() ? 'checked' : '' ?> form="admin"> + <label for="externallinkblank">Open external links in new tab</label> + </div> - <i>(This modifications need re-rendering)</i> + <div class="checkbox"> + <input type="hidden" name="internallinkblank" value="0" form="admin"> + <input type="checkbox" name="internallinkblank" id="internallinkblank" value="1" <?= Wcms\Config::internallinkblank() ? 'checked' : '' ?> form="admin"> + <label for="internallinkblank">Open internal links in new tab</label> + </div> + <i>(This modifications need re-rendering)</i> - <h2 id="css">CSS</h2> - <label for="globalcss">Edit global css that will apply to every pages</label> - <textarea name="globalcss" id="globalcss" cols="30" rows="30" form="admin"><?= $globalcss ?></textarea> + <h2 id="css">CSS</h2> - <label for="defaultfavicon">Default favicon</label> - <select name="defaultfavicon" id="defaultfavicon" form="admin"> - <option value="">--no favicon--</option> - <?php - foreach ($faviconlist as $favicon) { - ?> - <option value="<?= $favicon ?>" <?= Wcms\Config::defaultfavicon() === $favicon ? 'selected' : '' ?>><?= $favicon ?></option> - <?php - } - ?> - </select> + <label for="globalcss">Edit global css that will apply to every pages</label> + <textarea name="globalcss" id="globalcss" cols="30" rows="30" form="admin"><?= $globalcss ?></textarea> - <label for="defaultthumbnail">Default thumbnail</label> - <select name="defaultthumbnail" id="defaultthumbnail" form="admin"> - <option value="">--no thumbnail--</option> - <?php - foreach ($thumbnaillist as $thumbnail) { - ?> - <option value="<?= $thumbnail ?>" <?= Wcms\Config::defaultthumbnail() === $thumbnail ? 'selected' : '' ?>><?= $thumbnail ?></option> - <?php } ?> - </select> + <label for="defaultfavicon">Default favicon</label> + <select name="defaultfavicon" id="defaultfavicon" form="admin"> + <option value="">--no favicon--</option> + <?php + foreach ($faviconlist as $favicon) { + ?> + <option value="<?= $favicon ?>" <?= Wcms\Config::defaultfavicon() === $favicon ? 'selected' : '' ?>><?= $favicon ?></option> + <?php + } + ?> + </select> - <h2 id="interface">Interface</h2> + <label for="defaultthumbnail">Default thumbnail</label> + <select name="defaultthumbnail" id="defaultthumbnail" form="admin"> + <option value="">--no thumbnail--</option> + <?php + foreach ($thumbnaillist as $thumbnail) { + ?> + <option value="<?= $thumbnail ?>" <?= Wcms\Config::defaultthumbnail() === $thumbnail ? 'selected' : '' ?>><?= $thumbnail ?></option> + <?php } ?> + </select> - <p>Set interface Style</p> + <h2 id="interface">Interface</h2> - <select name="interfacecss" id="interfacecss" form="admin"> - <option value="null">--default interface style---</option> - <?php - foreach ($interfacecsslist as $interfacecss) { - ?> - <option value="<?= $interfacecss ?>" <?= $interfacecss === Wcms\Config::interfacecss() ? 'selected' : '' ?>><?= $interfacecss ?></option> - <?php - } - ?> - </select> + <p>Set interface Style</p> + <select name="interfacecss" id="interfacecss" form="admin"> + <option value="null">--default interface style---</option> + <?php + foreach ($interfacecsslist as $interfacecss) { + ?> + <option value="<?= $interfacecss ?>" <?= $interfacecss === Wcms\Config::interfacecss() ? 'selected' : '' ?>><?= $interfacecss ?></option> + <?php + } + ?> + </select> - <h2 id="tracking">Tracking</h2> - <label for="analytics">Google analytics Tracking ID</label> - <input type="text" name="analytics" id="analytics" value="<?= Wcms\Config::analytics() ?>" form="admin"> + <h2 id="tracking">Tracking</h2> - <i>(Need rendering to work)</i> + <label for="analytics">Google analytics Tracking ID</label> + <input type="text" name="analytics" id="analytics" value="<?= Wcms\Config::analytics() ?>" form="admin"> + <i>(Need rendering to work)</i> - </div> </div> + </div> - </section> - <section id="databases"> - <div class="block"> - <h1>Databases</h1> - <div class="scroll"> + </section> - <form action="<?= $this->url('admindatabase') ?>" method="post"> + <section id="databases"> + <div class="block"> + <h1>Databases</h1> + <div class="scroll"> + <form action="<?= $this->url('admindatabase') ?>" method="post"> + + + <table id="dirlsit"> + <tr><th>using</th><th>databases</th><th>pages</th></tr> - <table id="dirlsit"> - <tr><th>using</th><th>databases</th><th>pages</th></tr> - - <?php basictree($pagesdbtree, 'pages', 0, '', DIRECTORY_SEPARATOR . Wcms\Config::pagetable()); ?> - </table> + <?php basictree($pagesdbtree, 'pages', 0, '', DIRECTORY_SEPARATOR . Wcms\Config::pagetable()); ?> + </table> - <input type="hidden" name="action" value="select"> - <input type="submit" value="select" name="change database"> + <input type="hidden" name="action" value="select"> + <input type="submit" value="select" name="change database"> - </form> + </form> - <h4>Duplicate Database</h4> + <h4>Duplicate Database</h4> - <form action="<?= $this->url('admindatabase') ?>" method="post"> + <form action="<?= $this->url('admindatabase') ?>" method="post"> - <label for="dbsrc">Database to duplicate</label> - <select name="dbsrc" id="dbsrc"> - <?php - foreach ($pagesdblist as $db) { - ?> - <option value="<?= $db ?>" <?= $db === Wcms\Config::pagetable() ? 'selected' : '' ?>><?= $db ?></option> - <?php - } + <label for="dbsrc">Database to duplicate</label> + <select name="dbsrc" id="dbsrc"> + <?php + foreach ($pagesdblist as $db) { ?> - </select> + <option value="<?= $db ?>" <?= $db === Wcms\Config::pagetable() ? 'selected' : '' ?>><?= $db ?></option> + <?php + } + ?> + </select> - <label for="duplicate">New name</label> - <input type="text" name="dbtarget" id="duplicate" value="" required> - <input type="submit" name="action" value="duplicate"> - </form> + <label for="duplicate">New name</label> + <input type="text" name="dbtarget" id="duplicate" value="" required> + <input type="submit" name="action" value="duplicate"> + </form> - </div> </div> - </section> + </div> + </section> - </main> -</body> +</main> <?php $this->stop('page') ?>
\ No newline at end of file diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index a27171a..22dda20 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -7,7 +7,6 @@ <style>.tabs textarea{font-size: <?= Wcms\Config::fontsize() ?>px}</style> -<body> <main class="editor"> <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit', 'pagelist' => $pagelist, 'pageid' => $page->id()]) ?> @@ -32,6 +31,5 @@ let pagetitle = '<?= $page->title() ?>'; </script> <script src="<?= Wcms\Model::jspath() ?>edit.bundle.js"></script> -</body> <?php $this->stop('page') ?>
\ No newline at end of file diff --git a/app/view/templates/home.php b/app/view/templates/home.php index d6d1f51..387ef0c 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -6,243 +6,239 @@ <?php $this->start('page') ?> -<body> - <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'home', 'pagelist' => $pagelist]) ?> +<?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'home', 'pagelist' => $pagelist]) ?> - <?php if ($user->iseditor()) { ?> +<?php if ($user->iseditor()) { ?> - <?php - $optlist = $optlist ?? null; - $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist, 'faviconlist' => $faviconlist, 'thumbnaillist' => $thumbnaillist, 'editorlist' => $editorlist, 'colors' => $colors]); - ?> +<?php + $optlist = $optlist ?? null; + $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist, 'faviconlist' => $faviconlist, 'thumbnaillist' => $thumbnaillist, 'editorlist' => $editorlist, 'colors' => $colors]); +?> - <main class="home"> +<main class="home"> - <?php $this->insert('homeopt', ['opt' => $opt, 'user' => $user, 'display' => $display]) ?> + <?php $this->insert('homeopt', ['opt' => $opt, 'user' => $user, 'display' => $display]) ?> - <section class="pages"> + <section class="pages"> - <div class="block"> + <div class="block"> - <h2 class="hidephone">Pages (<?= count($pagelistopt) ?>) <span class="right"><a href="?display=list" <?= $display === 'list' ? 'style="color: white"' : '' ?> >list</a> / <a href="?display=map" <?= $display === 'map' ? 'style="color: white"' : '' ?> >map</a></span> </h2> + <h2 class="hidephone">Pages (<?= count($pagelistopt) ?>) <span class="right"><a href="?display=list" <?= $display === 'list' ? 'style="color: white"' : '' ?> >list</a> / <a href="?display=map" <?= $display === 'map' ? 'style="color: white"' : '' ?> >map</a></span> </h2> - <?php if($display === 'map') { ?> + <?php if($display === 'map') { ?> - <!-- ___________________ M A P _________________________ --> + <!-- ___________________ M A P _________________________ --> - <div id="deepsearchbar"> - <form action="" method="get"> - <input type="hidden" name="display" value="map"> - <input type="checkbox" name="showorphans" value="1" id="showorphans" <?= $showorphans ? 'checked' : '' ?>> - <label for="showorphans">show orphans pages</label> - <input type="checkbox" name="showredirection" value="1" id="showredirection" <?= $showredirection ? 'checked' : '' ?>> - <label for="showredirection">show redirections</label> - <select name="layout" id="layout"> - <?= options(Wcms\Model::MAP_LAYOUTS, $layout) ?> - </select> - <label for="layout">graph layout</label> - <input type="submit" value="update"> - </form> - </div> - - <div id="graph"></div> - - <script> - var data = <?= $json ?>; - console.log(data); - </script> - - <script src="<?= Wcms\Model::jspath() ?>map.bundle.js"></script> - - <?php } else { ?> - - <!-- ___________________ D E E P _________________________ --> - - <div id="deepsearchbar" class="hidephone"> - <form action="<?= $this->url('home') ?>" method="get"> - <input type="text" name="search" value="<?= $deepsearch ?>" id="deepsearch" placeholder="deep search"> - <input type="checkbox" name="id" id="deepid" value="1" <?= $searchopt['id'] ? 'checked' : '' ?>> - <label for="deepid">id</label> - <input type="checkbox" name="title" id="deeptitle" value="1" <?= $searchopt['title'] ? 'checked' : '' ?>> - <label for="deeptitle">title</label> - <input type="checkbox" name="description" id="deepdescription" value="1" <?= $searchopt['description'] ? 'checked' : '' ?>> - <label for="deepdescription">description</label> - <input type="checkbox" name="content" id="deepcontent" value="1" <?= $searchopt['content'] ? 'checked' : '' ?>> - <label for="deepcontent" title="Markdown content : MAIN, HEADER, NAV, ASIDE, FOOTER">content</label> - <input type="checkbox" name="other" id="deepother" value="1" <?= $searchopt['other'] ? 'checked' : '' ?>> - <label for="deepother" title="Structure content : BODY, CSS, Javascript">other</label> - <input type="checkbox" name="case" id="deepcase" value="1" <?= $searchopt['casesensitive'] ? 'checked' : '' ?>> - <label for="deepcase" title="Case sensitive or not">case sensitive</label> - <input type="submit" value="search"> - </form> - </div> - - - <!-- ___________________ T A B L E _______________________ --> + <div id="deepsearchbar"> + <form action="" method="get"> + <input type="hidden" name="display" value="map"> + <input type="checkbox" name="showorphans" value="1" id="showorphans" <?= $showorphans ? 'checked' : '' ?>> + <label for="showorphans">show orphans pages</label> + <input type="checkbox" name="showredirection" value="1" id="showredirection" <?= $showredirection ? 'checked' : '' ?>> + <label for="showredirection">show redirections</label> + <select name="layout" id="layout"> + <?= options(Wcms\Model::MAP_LAYOUTS, $layout) ?> + </select> + <label for="layout">graph layout</label> + <input type="submit" value="update"> + </form> + </div> + <div id="graph"></div> + + <script> + var data = <?= $json ?>; + console.log(data); + </script> + + <script src="<?= Wcms\Model::jspath() ?>map.bundle.js"></script> + + <?php } else { ?> + + <!-- ___________________ D E E P _________________________ --> + + <div id="deepsearchbar" class="hidephone"> + <form action="<?= $this->url('home') ?>" method="get"> + <input type="text" name="search" value="<?= $deepsearch ?>" id="deepsearch" placeholder="deep search"> + <input type="checkbox" name="id" id="deepid" value="1" <?= $searchopt['id'] ? 'checked' : '' ?>> + <label for="deepid">id</label> + <input type="checkbox" name="title" id="deeptitle" value="1" <?= $searchopt['title'] ? 'checked' : '' ?>> + <label for="deeptitle">title</label> + <input type="checkbox" name="description" id="deepdescription" value="1" <?= $searchopt['description'] ? 'checked' : '' ?>> + <label for="deepdescription">description</label> + <input type="checkbox" name="content" id="deepcontent" value="1" <?= $searchopt['content'] ? 'checked' : '' ?>> + <label for="deepcontent" title="Markdown content : MAIN, HEADER, NAV, ASIDE, FOOTER">content</label> + <input type="checkbox" name="other" id="deepother" value="1" <?= $searchopt['other'] ? 'checked' : '' ?>> + <label for="deepother" title="Structure content : BODY, CSS, Javascript">other</label> + <input type="checkbox" name="case" id="deepcase" value="1" <?= $searchopt['casesensitive'] ? 'checked' : '' ?>> + <label for="deepcase" title="Case sensitive or not">case sensitive</label> + <input type="submit" value="search"> + </form> + </div> - <div class="scroll"> - <table id="home2table"> - <thead> - <tr> - <?php if($user->issupereditor()) { ?><th id="checkall" class="hidephone">x</th> <?php } ?> - <?php if($columns['favicon']) { ?> - <th class="favicon"><a href="<?= $opt->sortbyorder('favicon') ?>">ico</a></th> - <?php } ?> - <th class="id"><a href="<?= $opt->sortbyorder('id') ?>">id</a></th> - <th>edit</th> - <th>see</th> - <th class="delete" title="delete page">del</th> - <?php if ($user->issupereditor()) { ?> - <th class="download hidephone" title="download page as json">dl</th> - <?php } + <!-- ___________________ T A B L E _______________________ --> + + + <div class="scroll"> + + <table id="home2table"> + <thead> + <tr> + <?php if($user->issupereditor()) { ?><th id="checkall" class="hidephone">x</th> <?php } ?> + <?php if($columns['favicon']) { ?> + <th class="favicon"><a href="<?= $opt->sortbyorder('favicon') ?>">ico</a></th> + <?php } ?> + <th class="id"><a href="<?= $opt->sortbyorder('id') ?>">id</a></th> + <th>edit</th> + <th>see</th> + <th class="delete" title="delete page">del</th> + <?php if ($user->issupereditor()) { ?> + <th class="download hidephone" title="download page as json">dl</th> + <?php } + if ($columns['tag']) { ?> + <th class="tag"><a href="<?= $opt->sortbyorder('tag') ?>">tag</a></th> + <?php } + if ($columns['title']) { ?> + <th class="title"><a href="<?= $opt->sortbyorder('title') ?>">title</a></th> + <?php } + if ($columns['description']) { ?> + <th class="summary">summary</th> + <?php } + if ($columns['linkto']) { ?> + <th class="linkto"><a href="<?= $opt->sortbyorder('linkto') ?>">linkto</a></th> + <?php } + if ($columns['datemodif']) { ?> + <th class="datemodif"><a href="<?= $opt->sortbyorder('datemodif') ?>">last modification</a></th> + <?php } + if ($columns['datecreation']) { ?> + <th class="datecreation"><a href="<?= $opt->sortbyorder('datecreation') ?>">date of creation</a></th> + <?php } + if ($columns['date']) { ?> + <th class="date"><a href="<?= $opt->sortbyorder('date') ?>">date</a></th> + <?php } + if ($columns['secure']) { ?> + <th class="secure"><a href="<?= $opt->sortbyorder('secure') ?>">privacy</a></th> + <?php } + if ($columns['authors']) { ?> + <th class="authors"><a href="<?= $opt->sortbyorder('authors') ?>">authors</a></th> + <?php } + if ($columns['visitcount']) { ?> + <th class="visitcount"><a href="<?= $opt->sortbyorder('visitcount') ?>">visit</a></th> + <?php } + if ($columns['editcount']) { ?> + <th class="editcount"><a href="<?= $opt->sortbyorder('editcount') ?>">edit</a></th> + <?php } + if ($columns['affcount']) { ?> + <th class="affcount"><a href="<?= $opt->sortbyorder('affcount') ?>">aff</a></th> + <?php } ?> + </tr> + </thead> + <tbody> + <?php foreach ($pagelistopt as $item) { ?> + <tr> + <?php if($user->issupereditor()) { ?><td class="hidephone"><input type="checkbox" name="pagesid[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>" form="multi"></td><?php } ?> + <?php if($columns['favicon']) { ?> + <td class="favicon"><img class="favicon" src="<?= Wcms\Model::faviconpath() . $item->favicon() ?>" alt="<?= $item->favicon() ?>" title="<?= $item->favicon() ?>"></td> + <?php } ?> + <td class="id"><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td> + <td><?php if($user->issupereditor() || in_array($user->id(), $item->authors())) { ?><a href="<?= $this->upage('pageedit', $item->id()) ?>"><img src="<?= Wcms\Model::iconpath() ?>edit.png" class="icon"></a><?php } ?></td> + <td><a href="<?= $this->upage('pageread/', $item->id()) ?>" target="_blank"><img src="<?= Wcms\Model::iconpath() ?>read.png" class="icon"></a></td> + <td class="delete"><?php if($user->issupereditor() || $item->authors() === [$user->id()]) { ?><a href="<?= $this->upage('pagedelete', $item->id()) ?>">✖</a><?php } ?></td> + <?php if ($user->issupereditor()) { ?> + <td class="hidephone"><a href="<?= $this->upage('pagedownload', $item->id()) ?>" download><img src="<?= Wcms\Model::iconpath() ?>download.png" class="icon"></a></td> + <?php } if ($columns['tag']) { ?> - <th class="tag"><a href="<?= $opt->sortbyorder('tag') ?>">tag</a></th> - <?php } + <td class="tag"><?= $opt->taglinks($item->tag('array')) ?></td> + <?php } if ($columns['title']) { ?> - <th class="title"><a href="<?= $opt->sortbyorder('title') ?>">title</a></th> - <?php } + <td class="title" title="<?= $item->title() ?>"><label for="id_<?= $item->id() ?>"><?= $item->title() ?></label></td> + <?php } if ($columns['description']) { ?> - <th class="summary">summary</th> - <?php } + <td class="summary" title="<?= $item->description() ?>"><?= $item->description('short') ?></td> + <?php } if ($columns['linkto']) { ?> - <th class="linkto"><a href="<?= $opt->sortbyorder('linkto') ?>">linkto</a></th> - <?php } + <td class="linkto"><?= $opt->linktolink($item->linkto('array')) ?></td> + <?php } if ($columns['datemodif']) { ?> - <th class="datemodif"><a href="<?= $opt->sortbyorder('datemodif') ?>">last modification</a></th> - <?php } + <td class="datemodif" <?= $item->datemodif('dmy') ?> <?= $item->datemodif('ptime') ?>><time datetime="<?= $item->datemodif('string') ?>" title="<?= $item->datemodif('dmy') . ' ' . $item->datemodif('ptime') ?>"><?= $item->datemodif('hrdi') ?></time></td> + <?php } if ($columns['datecreation']) { ?> - <th class="datecreation"><a href="<?= $opt->sortbyorder('datecreation') ?>">date of creation</a></th> - <?php } + <td class="datecreation" <?= $item->datecreation('dmy') ?> <?= $item->datecreation('ptime') ?>><time datetime="<?= $item->datecreation('string') ?>" title="<?= $item->datecreation('dmy') . ' ' . $item->datecreation('ptime') ?>"><?= $item->datecreation('hrdi') ?></time></td> + <?php } if ($columns['date']) { ?> - <th class="date"><a href="<?= $opt->sortbyorder('date') ?>">date</a></th> - <?php } + <td class="date" <?= $item->date('dmy') ?> <?= $item->date('ptime') ?>><time datetime="<?= $item->date('string') ?>" title="<?= $item->date('dmy') . ' ' . $item->date('ptime') ?>"><?= $item->date('dmy') ?></time></td> + <?php } if ($columns['secure']) { ?> - <th class="secure"><a href="<?= $opt->sortbyorder('secure') ?>">privacy</a></th> - <?php } + <td class="secure"><?= $opt->securelink($item->secure('int') , $item->secure('string')) ?></td> + <?php } if ($columns['authors']) { ?> - <th class="authors"><a href="<?= $opt->sortbyorder('authors') ?>">authors</a></th> - <?php } + <td class="authors"><?= $opt->authorlinks($item->authors('array')) ?></td> + <?php } if ($columns['visitcount']) { ?> - <th class="visitcount"><a href="<?= $opt->sortbyorder('visitcount') ?>">visit</a></th> - <?php } + <td class="visitcount"><?= $item->visitcount() ?></td> + <?php } if ($columns['editcount']) { ?> - <th class="editcount"><a href="<?= $opt->sortbyorder('editcount') ?>">edit</a></th> - <?php } + <td class="editcount"><?= $item->editcount() ?></td> + <?php } if ($columns['affcount']) { ?> - <th class="affcount"><a href="<?= $opt->sortbyorder('affcount') ?>">aff</a></th> - <?php } ?> - </tr> - </thead> - <tbody> - <?php foreach ($pagelistopt as $item) { ?> - <tr> - <?php if($user->issupereditor()) { ?><td class="hidephone"><input type="checkbox" name="pagesid[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>" form="multi"></td><?php } ?> - <?php if($columns['favicon']) { ?> - <td class="favicon"><img class="favicon" src="<?= Wcms\Model::faviconpath() . $item->favicon() ?>" alt="<?= $item->favicon() ?>" title="<?= $item->favicon() ?>"></td> - <?php } ?> - <td class="id"><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td> - <td><?php if($user->issupereditor() || in_array($user->id(), $item->authors())) { ?><a href="<?= $this->upage('pageedit', $item->id()) ?>"><img src="<?= Wcms\Model::iconpath() ?>edit.png" class="icon"></a><?php } ?></td> - <td><a href="<?= $this->upage('pageread/', $item->id()) ?>" target="_blank"><img src="<?= Wcms\Model::iconpath() ?>read.png" class="icon"></a></td> - <td class="delete"><?php if($user->issupereditor() || $item->authors() === [$user->id()]) { ?><a href="<?= $this->upage('pagedelete', $item->id()) ?>">✖</a><?php } ?></td> - <?php if ($user->issupereditor()) { ?> - <td class="hidephone"><a href="<?= $this->upage('pagedownload', $item->id()) ?>" download><img src="<?= Wcms\Model::iconpath() ?>download.png" class="icon"></a></td> - <?php } - if ($columns['tag']) { ?> - <td class="tag"><?= $opt->taglinks($item->tag('array')) ?></td> - <?php } - if ($columns['title']) { ?> - <td class="title" title="<?= $item->title() ?>"><label for="id_<?= $item->id() ?>"><?= $item->title() ?></label></td> - <?php } - if ($columns['description']) { ?> - <td class="summary" title="<?= $item->description() ?>"><?= $item->description('short') ?></td> - <?php } - if ($columns['linkto']) { ?> - <td class="linkto"><?= $opt->linktolink($item->linkto('array')) ?></td> - <?php } - if ($columns['datemodif']) { ?> - <td class="datemodif" <?= $item->datemodif('dmy') ?> <?= $item->datemodif('ptime') ?>><time datetime="<?= $item->datemodif('string') ?>" title="<?= $item->datemodif('dmy') . ' ' . $item->datemodif('ptime') ?>"><?= $item->datemodif('hrdi') ?></time></td> - <?php } - if ($columns['datecreation']) { ?> - <td class="datecreation" <?= $item->datecreation('dmy') ?> <?= $item->datecreation('ptime') ?>><time datetime="<?= $item->datecreation('string') ?>" title="<?= $item->datecreation('dmy') . ' ' . $item->datecreation('ptime') ?>"><?= $item->datecreation('hrdi') ?></time></td> - <?php } - if ($columns['date']) { ?> - <td class="date" <?= $item->date('dmy') ?> <?= $item->date('ptime') ?>><time datetime="<?= $item->date('string') ?>" title="<?= $item->date('dmy') . ' ' . $item->date('ptime') ?>"><?= $item->date('dmy') ?></time></td> - <?php } - if ($columns['secure']) { ?> - <td class="secure"><?= $opt->securelink($item->secure('int') , $item->secure('string')) ?></td> - <?php } - if ($columns['authors']) { ?> - <td class="authors"><?= $opt->authorlinks($item->authors('array')) ?></td> - <?php } - if ($columns['visitcount']) { ?> - <td class="visitcount"><?= $item->visitcount() ?></td> - <?php } - if ($columns['editcount']) { ?> - <td class="editcount"><?= $item->editcount() ?></td> - <?php } - if ($columns['affcount']) { ?> - <td class="affcount"><?= $item->affcount() ?></td> - <?php } ?> - </tr> - - <?php } ?> - </tbody> - </table> - </div> - - <?php } ?> - - </div> + <td class="affcount"><?= $item->affcount() ?></td> + <?php } ?> + </tr> - </section> - - - <?php if($user->display()['bookmark'] && (!empty(Wcms\Config::bookmark()) || !empty($user->bookmark()))) { ?> - - <section class="hidephone" id="bookmark"> - <div class="block"> - <h2>Bookmarks</h2> - <div class="scroll"> - <strong>Public</strong> - <ul> - <?php foreach (Wcms\Config::bookmark() as $id => $query) { ?> - <li> - <a href="<?= $query ?>"><?= $id ?></a> - </li> - <?php } ?> - </ul> - <strong><?= $user->id() ?></strong> - <ul> - <?php foreach ($user->bookmark() as $id => $query) { ?> - <li> - <a href="<?= $query ?>"><?= $id ?></a> - </li> - <?php } ?> - </ul> - </section> + <?php } ?> + </tbody> + </table> </div> - </nav> - <?php } ?> + <?php } ?> + + </div> + + </section> + + + <?php if($user->display()['bookmark'] && (!empty(Wcms\Config::bookmark()) || !empty($user->bookmark()))) { ?> + + <section class="hidephone" id="bookmark"> + <div class="block"> + <h2>Bookmarks</h2> + <div class="scroll"> + <strong>Public</strong> + <ul> + <?php foreach (Wcms\Config::bookmark() as $id => $query) { ?> + <li> + <a href="<?= $query ?>"><?= $id ?></a> + </li> + <?php } ?> + </ul> + <strong><?= $user->id() ?></strong> + <ul> + <?php foreach ($user->bookmark() as $id => $query) { ?> + <li> + <a href="<?= $query ?>"><?= $id ?></a> + </li> + <?php } ?> + </ul> + </section> + </div> + </nav> - </main> - - <?php $this->insert('footer', ['footer' => $footer]) ?> + <?php } ?> - <script src="<?= Wcms\Model::jspath() ?>home.bundle.js"></script> +</main> - <?php } ?> +<?php $this->insert('footer', ['footer' => $footer]) ?> -</body> +<script src="<?= Wcms\Model::jspath() ?>home.bundle.js"></script> +<?php } ?> <?php $this->stop() ?>
\ No newline at end of file diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 9d28ffa..ff39f1c 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -7,7 +7,7 @@ <div class="submenu"> <h2>Import page as file</h2> <form action="<?= $this->url('pageupload') ?>" method="post" enctype="multipart/form-data"> - <input type="file" name="pagefile" id="pagefile" accept=".json"> + <input type="file" name="pagefile" id="pagefile" accept=".json" required> <label for="pagefile">JSON Page file</label> <input type="hidden" name="erase" value="0"> <input type="hidden" name="datecreation" value="0"> @@ -38,13 +38,7 @@ <div class="submenu"> <i>Edit selected pages</i> <form action="<?= $this->url('multi') ?>" method="post" id="multi"> - <h2>Render</h2> - <input type="submit" name="action" value="render"> - <h2>Delete</h2> - <input type="hidden" name="confirmdelete" value="0"> - <input type="checkbox" name="confirmdelete" id="confirmdelete" value="1"> - <label for="confirmdelete">confirm</label> - <input type="submit" name="action" value="delete"> + <h2>Edit Meta infos</h2> <input type="text" name="datas[title]" id="title"> <label for="title">title</label> @@ -181,6 +175,15 @@ </br> <input type="submit" name="action" value="edit"> + <h2>Render</h2> + <input type="submit" name="action" value="render"> + + <h2>Delete</h2> + <input type="hidden" name="confirmdelete" value="0"> + <input type="checkbox" name="confirmdelete" id="confirmdelete" value="1"> + <label for="confirmdelete">confirm</label> + <input type="submit" name="action" value="delete"> + </form> </div> </details> @@ -195,7 +198,7 @@ <details class="hidephone" id="selection" <?= !empty($optlist) ? 'open' : '' ?>> - <summary>Filters</summary> + <summary>Filter</summary> <div class="submenu"> <h2>Get LIST code</h2> <i>Generate code to display a list of pages</i> @@ -309,18 +312,6 @@ <details class="hidephone" id="display"> <summary>Display</summary> <div class="submenu"> - <h2>Worksapce</h2> - <form action=""> - <ul> - <?php foreach ($user->display() as $id => $setting) { ?> - <li> - <input type="checkbox" name="display[<?= $id ?>]" id="display_<?= $id ?>" value="true" <?= $setting ? 'checked' : '' ?>> - <label for="display_<?= $id ?>"><?= $id ?></label> - </li> - <?php } ?> - </ul> - <input type="submit" value="update display"> - </form> <h2>Columns</h2> <form action="<?= $this->url('homecolumns') ?>" method="post"> <ul> diff --git a/app/view/templates/info.php b/app/view/templates/info.php index 0e722a6..e77fbe3 100644 --- a/app/view/templates/info.php +++ b/app/view/templates/info.php @@ -3,7 +3,6 @@ <?php $this->start('page') ?> -<body> <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'info', 'pagelist' => $pagelist]) ?> @@ -76,6 +75,5 @@ </section> </main> -</body> <?php $this->stop('page') ?>
\ No newline at end of file diff --git a/app/view/templates/layout.php b/app/view/templates/layout.php index c96c61f..7b8ef13 100644 --- a/app/view/templates/layout.php +++ b/app/view/templates/layout.php @@ -38,19 +38,23 @@ <?php if (!empty($flashmessages) && is_array($flashmessages)) { ?> - <div class="flashmessage"> +<a href="#flashmessage"> + <div class="flashmessage" id="flashmessage"> <ul> <?php foreach ($flashmessages as $flashmessage ) { ?> <li class="alert alert-<?= $flashmessage['type'] ?>"> <?= $flashmessage['content'] ?> </li> - <?php } ?> - </ul> - </div> + <?php } ?> + </ul> + </div> + </a> <?php } ?> +<body> + <?= $this->section('page') ?> +</body> -<?= $this->section('page') ?> </html>
\ No newline at end of file diff --git a/app/view/templates/media.php b/app/view/templates/media.php index 9f56116..9901b8e 100644 --- a/app/view/templates/media.php +++ b/app/view/templates/media.php @@ -7,11 +7,10 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css' <?php $this->start('page') ?> -<body> - <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'media', 'pagelist' => $pagelist]) ?> +<?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'media', 'pagelist' => $pagelist]) ?> - <?php $this->insert('mediamenu', ['user' => $user, 'pathlist' => $pathlist, 'mediaopt' => $mediaopt]) ?> +<?php $this->insert('mediamenu', ['user' => $user, 'pathlist' => $pathlist, 'mediaopt' => $mediaopt]) ?> <main class="media"> @@ -116,6 +115,5 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css' <script src="<?= Wcms\Model::jspath() ?>media.bundle.js"></script> -</body> <?php $this->stop('page') ?>
\ No newline at end of file diff --git a/app/view/templates/timeline.php b/app/view/templates/timeline.php index f06180e..e3c6438 100644 --- a/app/view/templates/timeline.php +++ b/app/view/templates/timeline.php @@ -6,9 +6,8 @@ <?php $this->start('page') ?> -<body> - <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'timeline', 'pagelist' => $pagelist]) ?> +<?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'timeline', 'pagelist' => $pagelist]) ?> <?php if($user->iseditor()) { ?> @@ -97,7 +96,6 @@ foreach ($groupedeventlist as $eventuser) { </section> -</body> diff --git a/app/view/templates/user.php b/app/view/templates/user.php index f77699d..faa44aa 100644 --- a/app/view/templates/user.php +++ b/app/view/templates/user.php @@ -7,14 +7,12 @@ $this->layout('layout', ['title' => 'user', 'stylesheets' => [$css . 'home.css'] <?php $this->start('page') ?> -<body> - - <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'user', 'pagelist' => $pagelist]) ?> +<?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'user', 'pagelist' => $pagelist]) ?> <main class="user"> - <section id="pref"> + <section id="user"> <div class="block"> @@ -34,25 +32,26 @@ $this->layout('layout', ['title' => 'user', 'stylesheets' => [$css . 'home.css'] <h2>Preferences</h2> + <div id="preferences"> - <form action="<?= $this->url('userpref') ?>" method="post"> + <form action="<?= $this->url('userpref') ?>" method="post"> - <p> - <input type="number" name="cookie" value="<?= $getuser->cookie() ?>" id="cookie" min="0" max="365"> - <label for="cookie">Cookie conservation time <i>(In days)</i></label> - <p>When you tick the <em>remember-me</em> checkbox during login, you can choose how much time <strong>W</strong> will remember you.</p> + <input type="number" name="cookie" value="<?= $getuser->cookie() ?>" id="cookie" min="0" max="<?= Model::MAX_COOKIE_CONSERVATION ?>"> + <label for="cookie">Cookie conservation time <i>(In days)</i></label> + <p>When you tick the <em>remember-me</em> checkbox during login, you can choose how much time <strong>W</strong> will remember you.</p> - <input type="password" name="password" id="password" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" maxlength="<?= Wcms\Model::PASSWORD_MAX_LENGTH ?>"> - <label for="password">New password</label> - - <input type="hidden" name="passwordhash" value="1"> + <input type="password" name="password" id="password" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" maxlength="<?= Wcms\Model::PASSWORD_MAX_LENGTH ?>"> + <label for="password">New password</label> + + <input type="hidden" name="passwordhash" value="1"> - </br> - <input type="submit" value="update"> - </p> - - </form> + <p>Password have to be between <?= Wcms\Model::PASSWORD_MIN_LENGTH ?> and <?= Wcms\Model::PASSWORD_MAX_LENGTH ?> characters long.</p> + + <input type="submit" value="update preferences"> + + </form> + </div> @@ -215,6 +214,5 @@ $this->layout('layout', ['title' => 'user', 'stylesheets' => [$css . 'home.css'] </main> -</body> <?php $this->stop('page') ?>
\ No newline at end of file |