diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-08-09 15:58:37 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-08-09 15:58:37 +0200 |
commit | 93c827446737252c36d6d9daee7e2e7a55eb911b (patch) | |
tree | c3c602a65e971b0953ff9c6d98cbb2b017964b12 /app/view/templates/admin.php | |
parent | 95ada5c09026882f384a4a386916b1b2decbfce9 (diff) | |
download | wcms-93c827446737252c36d6d9daee7e2e7a55eb911b.tar.gz wcms-93c827446737252c36d6d9daee7e2e7a55eb911b.zip |
New Feature : Alert pages have more options
Diffstat (limited to 'app/view/templates/admin.php')
-rw-r--r-- | app/view/templates/admin.php | 367 |
1 files changed, 220 insertions, 147 deletions
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 @@ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'admin']) ?> -<main class="admin"> + <main class="admin"> - <section> + <section> - <form action="<?= $this->url('adminupdate') ?>" method="post"> + <form action="<?= $this->url('adminupdate') ?>" method="post"> - <article> + <article> - <h1>Administration</h1> + <h1>Administration</h1> - <input type="submit" value="Update configuration"> - </article> + <input type="submit" value="Update configuration"> + </article> - <article> + <article> - <h2>Home page</h2> + <h2>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" <?= Config::homepage() === 'default' ? 'checked' : '' ?>> - <label for="default">default</label> - </div> + <div class="radio"> + <input type="radio" name="homepage" value="default" id="default" <?= Config::homepage() === 'default' ? 'checked' : '' ?>> + <label for="default">default</label> + </div> - <div class="radio"> - <input type="radio" name="homepage" value="search" id="searchbar" <?= Config::homepage() === 'search' ? 'checked' : '' ?>> - <label for="searchbar">search bar</label> - </div> + <div class="radio"> + <input type="radio" name="homepage" value="search" id="searchbar" <?= Config::homepage() === 'search' ? 'checked' : '' ?>> + <label for="searchbar">search bar</label> + </div> - <div class="radio"> - <input type="radio" name="homepage" value="redirect" id="redirect" <?= Config::homepage() === 'redirect' ? 'checked' : '' ?>> - <label for="redirect">redirect to page</label> - </div> + <div class="radio"> + <input type="radio" name="homepage" value="redirect" id="redirect" <?= Config::homepage() === 'redirect' ? 'checked' : '' ?>> + <label for="redirect">redirect to page</label> + </div> - <select name="homeredirect" id="homeredirect"> - <option value="" <?= Config::homeredirect() === null ? 'selected' : '' ?>>--select page to redirect--</option> + <select name="homeredirect" id="homeredirect"> + <option value="" <?= Config::homeredirect() === null ? 'selected' : '' ?>>--select page to redirect--</option> - <?php - foreach ($artlist as $art) { - ?> - <option value="<?= $art ?>" <?= Config::homeredirect() === $art ? 'selected' : '' ?>><?= $art ?></option> - <?php - } + <?php + foreach ($artlist as $art) { + ?> + <option value="<?= $art ?>" <?= Config::homeredirect() === $art ? 'selected' : '' ?>><?= $art ?></option> + <?php + } - ?> - </select> + ?> + </select> - </article> + </article> - <article> + <article> - <h2>Page creation</h2> + <h2>Page creation</h2> - <label for="defaultprivacy">Default privacy</label> - <select name="defaultprivacy" id="defaultprivacy"> - <option value="0" <?= Config::defaultprivacy() == 0 ? 'selected' : '' ?>>public</option> - <option value="1" <?= Config::defaultprivacy() == 1 ? 'selected' : '' ?>>private</option> - <option value="2" <?= Config::defaultprivacy() == 2 ? 'selected' : '' ?>>not published</option> - </select> + <p>What really happend when you create a new page</p> + <label for="defaultprivacy">Default privacy</label> + <select name="defaultprivacy" id="defaultprivacy"> + <option value="0" <?= Config::defaultprivacy() == 0 ? 'selected' : '' ?>>public</option> + <option value="1" <?= Config::defaultprivacy() == 1 ? 'selected' : '' ?>>private</option> + <option value="2" <?= Config::defaultprivacy() == 2 ? 'selected' : '' ?>>not published</option> + </select> - <label for="defaultart">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> - <?php - foreach ($artlist as $art) { - ?> - <option value="<?= $art ?>" <?= Config::defaultart() === $art ? 'selected' : '' ?>><?= $art ?></option> - <?php } - ?> - </select> - <?php - if(empty(!$defaultartexist || Config::defaultart())) { - ?> - <label for="defaultbody">Edit default BODY element</label> - <textarea name="defaultbody" id="defaultbody" cols="30" rows="10"><?= Config::defaultbody() ?></textarea> - <?php - } - ?> + <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> + <?php + foreach ($artlist as $art) { + ?> + <option value="<?= $art ?>" <?= Config::defaultart() === $art ? 'selected' : '' ?>><?= $art ?></option> + <?php } + ?> + </select> - </article> + <?php + if (empty(!$defaultartexist || Config::defaultart())) { + ?> + <label for="defaultbody">Edit default BODY element</label> + <textarea name="defaultbody" id="defaultbody" cols="30" rows="10"><?= Config::defaultbody() ?></textarea> + <?php + } + ?> - <article> + </article> + <article> - <h2>Editing</h2> - <label for="existnot">Text to show when a page does not exist yet</label> - <input type="text" name="existnot" id="existnot" value="<?= Config::existnot() ?>"> + <h2>Alert pages</h2> + <h4>Common options</h4> - <h4>Render</h4> + <label for="alerttitle">H1 Title</label> + <input type="text" name="alerttitle" id="alerttitle" value="<?= Config::alerttitle() ?>"> - <div class="checkbox"> - <input type="hidden" name="reccursiverender" value="0"> - <input type="checkbox" name="reccursiverender" id="reccursiverender" value="1" <?= Config::reccursiverender() ? 'checked' : '' ?>> - <label for="reccursiverender">Reccursive render</label> - </div> + <label for="alertlink">Link to this page (for visitors)</label> + <select name="alertlink" id="alertlink"> + <option value="" <?= empty(Config::alertlink()) ? 'selected' : '' ?>>--No link--</option> + <?php + foreach ($artlist as $art) { + ?> + <option value="<?= $art ?>" <?= Config::alertlink() === $art ? 'selected' : '' ?>><?= $art ?></option> + <?php } + ?> + </select> - <h4>Links</h4> - - <div class="checkbox"> - <input type="hidden" name="externallinkblank" value="0"> - <input type="checkbox" name="externallinkblank" id="externallinkblank" value="1" <?= Config::externallinkblank() ? 'checked' : '' ?>> - <label for="externallinkblank">Open external links in new tab</label> - </div> - <div class="checkbox"> - <input type="hidden" name="internallinkblank" value="0"> - <input type="checkbox" name="internallinkblank" id="internallinkblank" value="1" <?= Config::internallinkblank() ? 'checked' : '' ?>> - <label for="internallinkblank">Open internal links in new tab</label> - </div> + <label for="alertlinktext">Link text</label> + <input type="text" name="alertlinktext" id="alertlinktext" value="<?= Config::alertlinktext() ?>"> - <i>(This modifications need re-rendering)</i> - <h4>Edit quick menu</h4> - <div class="checkbox"> - <input type="hidden" name="showeditmenu" value="false"> - <input type="checkbox" name="showeditmenu" id="showeditmenu" value="true" <?= Config::showeditmenu() === true ? 'checked' : '' ?>> - <label for="showeditmenu">Show editor menu in top right corner of pages</label> - </div> + <h4>Un-existing</h4> - <?php - if(Config::showeditmenu() === true) { - ?> - <label for="editsymbol">Symbol</label> - <select name="editsymbol" id="editsymbol"> - <?php - foreach (Model::EDIT_SYMBOLS as $symbol) { - ?> - <option value="<?= $symbol ?>" <?= Config::editsymbol() === $symbol ? 'selected' : '' ?>><?= $symbol ?></option> - <?php - } - ?> - </select> - <?php - } - ?> + <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="<?= Config::existnot() ?>"> - </article> + <div class="checkbox"> + <input type="hidden" name="existnotpass" value="0"> + <input type="checkbox" name="existnotpass" id="existnotpass" value="1" <?= Config::existnotpass() ? 'checked' : '' ?>> + <label for="existnotpass">Ask for password</label> + </div> + <h4>Private</h4> + <label for="private">Text to show when a page is private.</label> + <input type="text" name="private" id="private" value="<?= Config::private() ?>"> + <div class="checkbox"> + <input type="hidden" name="privatepass" value="0"> + <input type="checkbox" name="privatepass" id="privatepass" value="1" <?= Config::privatepass() ? 'checked' : '' ?>> + <label for="privatepass">Ask for password</label> + </div> + <h4>Not published</h4> - <article> + <label for="notpublished">Text to show when a page is not published.</label> + <input type="text" name="notpublished" id="notpublished" value="<?= Config::notpublished() ?>"> - <h2>CSS</h2> + <div class="checkbox"> + <input type="hidden" name="notpublishedpass" value="0"> + <input type="checkbox" name="notpublishedpass" id="notpublishedpass" value="1" <?= Config::notpublishedpass() ? 'checked' : '' ?>> + <label for="notpublishedpass">Ask for password</label> + </div> - <label for="globalcss">Edit global css that will apply to every pages</label> - <textarea name="globalcss" id="globalcss" cols="30" rows="10"><?= $globalcss ?></textarea> + <h4>CSS</h4> - <label for="defaultfavicon">Default favicon</label> - <select name="defaultfavicon" id="defaultfavicon"> - <option value="">--no favicon--</option> - <?php - foreach ($faviconlist as $favicon) { - ?> - <option value="<?= $favicon ?>" <?= Config::defaultfavicon() === $favicon ? 'selected' : '' ?>><?= $favicon ?></option> - <?php - } - ?> - </select> + <div class="checkbox"> + <input type="hidden" name="alertcss" value="0"> + <input type="checkbox" name="alertcss" id="alertcss" value="1" <?= Config::alertcss() ? 'checked' : '' ?>> + <label for="alertcss">Use global.css for those page as well</label> + </div> - </article> + <p> + <i>You can use <code>body.alert</code> class to specify style.</i> + </p> + </article> + + + <article> + + <h2>Render</h2> + <div class="checkbox"> + <input type="hidden" name="reccursiverender" value="0"> + <input type="checkbox" name="reccursiverender" id="reccursiverender" value="1" <?= Config::reccursiverender() ? 'checked' : '' ?>> + <label for="reccursiverender">Reccursive render</label> + </div> + <h4>Links</h4> + <div class="checkbox"> + <input type="hidden" name="externallinkblank" value="0"> + <input type="checkbox" name="externallinkblank" id="externallinkblank" value="1" <?= Config::externallinkblank() ? 'checked' : '' ?>> + <label for="externallinkblank">Open external links in new tab</label> + </div> - <article> + <div class="checkbox"> + <input type="hidden" name="internallinkblank" value="0"> + <input type="checkbox" name="internallinkblank" id="internallinkblank" value="1" <?= Config::internallinkblank() ? 'checked' : '' ?>> + <label for="internallinkblank">Open internal links in new tab</label> + </div> - <h2>Interface</h2> + <i>(This modifications need re-rendering)</i> - <p>Set interface Style</p> + <h4>Edit quick menu</h4> - <select name="interfacecss" id="interfacecss"> - <option value="null">--default interface style---</option> - <?php - foreach ($interfacecsslist as $interfacecss) { - ?> - <option value="<?= $interfacecss ?>" <?= $interfacecss === Config::interfacecss() ? 'selected' : '' ?>><?= $interfacecss ?></option> + <div class="checkbox"> + <input type="hidden" name="showeditmenu" value="false"> + <input type="checkbox" name="showeditmenu" id="showeditmenu" value="true" <?= Config::showeditmenu() === true ? 'checked' : '' ?>> + <label for="showeditmenu">Show editor menu in top right corner of pages</label> + </div> + + <?php + if (Config::showeditmenu() === true) { + ?> + <label for="editsymbol">Symbol</label> + <select name="editsymbol" id="editsymbol"> + <?php + foreach (Model::EDIT_SYMBOLS as $symbol) { + ?> + <option value="<?= $symbol ?>" <?= Config::editsymbol() === $symbol ? 'selected' : '' ?>><?= $symbol ?></option> + <?php + } + ?> + </select> <?php - } - ?> - </select> + } + ?> + + </article> + + + + + + <article> + + <h2>CSS</h2> + + <label for="globalcss">Edit global css that will apply to every pages</label> + <textarea name="globalcss" id="globalcss" cols="30" rows="10"><?= $globalcss ?></textarea> + + <label for="defaultfavicon">Default favicon</label> + <select name="defaultfavicon" id="defaultfavicon"> + <option value="">--no favicon--</option> + <?php + foreach ($faviconlist as $favicon) { + ?> + <option value="<?= $favicon ?>" <?= Config::defaultfavicon() === $favicon ? 'selected' : '' ?>><?= $favicon ?></option> + <?php + } + ?> + </select> + + </article> + + + + + + + + <article> + + <h2>Interface</h2> + + <p>Set interface Style</p> + + <select name="interfacecss" id="interfacecss"> + <option value="null">--default interface style---</option> + <?php + foreach ($interfacecsslist as $interfacecss) { + ?> + <option value="<?= $interfacecss ?>" <?= $interfacecss === Config::interfacecss() ? 'selected' : '' ?>><?= $interfacecss ?></option> + <?php + } + ?> + </select> - </article> + </article> - <article> + <article> - <h2>Tracking</h2> + <h2>Tracking</h2> - <label for="analytics">Google analytics Tracking ID</label> - <input type="text" name="analytics" id="analytics" value="<?= Config::analytics() ?>"> + <label for="analytics">Google analytics Tracking ID</label> + <input type="text" name="analytics" id="analytics" value="<?= Config::analytics() ?>"> - <i>(Need rendering to work)</i> + <i>(Need rendering to work)</i> - </article> + </article> - <article> - <input type="submit" value="Update configuration"> - </article> + <article> + <input type="submit" value="Update configuration"> + </article> - </form> + </form> - </section> + </section> -</main> + </main> </body> <?php $this->stop('page') ?>
\ No newline at end of file |