diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-26 15:41:48 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-26 15:41:48 +0200 |
commit | 53e6d5fde32a917718a0658fb95f366dc7dfc248 (patch) | |
tree | 6510be3ee713a444a477aef8faf60a62fb47b165 /app/view/templates | |
parent | 0efeef6b6693d62675ec8a45e73c71f69e0a0362 (diff) | |
download | wcms-53e6d5fde32a917718a0658fb95f366dc7dfc248.tar.gz wcms-53e6d5fde32a917718a0658fb95f366dc7dfc248.zip |
user bookmarks use new object
+ shortcuts visible in backtopbar
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/backtopbar.php | 36 | ||||
-rw-r--r-- | app/view/templates/homemenu.php | 15 |
2 files changed, 30 insertions, 21 deletions
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index 597ae6f..6aded61 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -30,25 +30,15 @@ <img src="<?= Wcms\Model::iconpath() ?>media.png" alt="" class="icon"> <span class="hidephone">media</span> </a> -<?php -if($user->isadmin()) { -?> -<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>> - <img src="<?= Wcms\Model::iconpath() ?>admin.png" alt="" class="icon"> - <span class="hidephone">admin</span> -</a> -<?php -} -?> -<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>> - <img src="<?= Wcms\Model::iconpath() ?>info.png" alt="" class="icon"> - <span class="hidephone">info</span> -</a> </span> - +<span id="shortcuts" class="hidephone"> + <?php foreach ($user->bookmark() as $bookmark) { ?> + <a href="<?= $this->url($bookmark->route(), $bookmark->params(), $bookmark->query()) ?>"><?= $bookmark->icon() ?> <?= $bookmark->id() ?></a> + <?php } ?> +</span> <?php } ?> @@ -75,6 +65,22 @@ if($user->isadmin()) { <span> +<?php +if($user->isadmin()) { +?> +<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>> + <img src="<?= Wcms\Model::iconpath() ?>admin.png" alt="" class="icon"> + <span class="hidephone">admin</span> + +</a> +<?php +} +?> +<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>> + <img src="<?= Wcms\Model::iconpath() ?>info.png" alt="" class="icon"> + <span class="hidephone">info</span> +</a> + <a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>> <img src="<?= Wcms\Model::iconpath() ?>user.png" alt="" class="icon"> <span class="hidephone"><?= $user->id() ?></span> diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 540806b..0848506 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -266,7 +266,7 @@ <?php } ?> </ul> <input type="hidden" name="action" value="del"> - <input type="submit" value="delete selected" class="floatright"> + <input type="submit" value="delete selected"> </form> <?php } elseif($user->issupereditor()) { ?> <p>This will store your filters settings as a Bookmark that every editors users can use.</p> @@ -284,22 +284,25 @@ <?php if(!empty($user->bookmark())) { ?> <form action="<?= $this->url('homebookmark') ?>" method="post"> <ul> - <?php foreach ($user->bookmark() as $id => $query) { ?> + <?php foreach ($user->bookmark() as $bookmark) { ?> <li> - <a href="<?= $query ?>" title="<?= $query ?>"><?= $id ?></a> - <input type="checkbox" name="id[]" value="<?= $id ?>"> + <label for="bookmark_<?= $bookmark->id() ?>" title="<?= $bookmark->query() ?>"><?= $bookmark->id() ?></label> + <input type="checkbox" name="id[]" value="<?= $bookmark->id() ?>" id="bookmark_<?= $bookmark->id() ?>"> </li> <?php } ?> </ul> <input type="hidden" name="action" value="del"> <input type="hidden" name="user" value="<?= $user->id() ?>"> - <input type="submit" value="delete selected" class="floatright"> + <input type="submit" value="delete selected"> </form> <?php } else { ?> <p>This will store your filters settings as a Bookmark that only you can use.</p> <?php } ?> <form action="<?= $this->url('homebookmark') ?>" method="post"> - <input type="text" name="id" placeholder="bookmark id" minlength="1" maxlength="16"> + <select name="icon" id="icon"> + <?= options(Wcms\Model::BOOKMARK_ICONS, null, true) ?> + </select> + <input type="text" name="id" placeholder="bookmark id" minlength="1" maxlength="16" required> <input type="hidden" name="query" value="<?= $opt->getadress() ?>"> <input type="hidden" name="user" value="<?= $user->id() ?>"> <input type="submit" name="action" value="add"> |