aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/mediamenu.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-26 18:34:59 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-26 18:34:59 +0200
commit877e0570ea7eb94e9698aab9147104f5251f55c9 (patch)
tree62fcff04bdf46de5ec504604ed67d0682b6bacdf /app/view/templates/mediamenu.php
parent53e6d5fde32a917718a0658fb95f366dc7dfc248 (diff)
downloadwcms-877e0570ea7eb94e9698aab9147104f5251f55c9.tar.gz
wcms-877e0570ea7eb94e9698aab9147104f5251f55c9.zip
add bookmarks to media
Diffstat (limited to 'app/view/templates/mediamenu.php')
-rw-r--r--app/view/templates/mediamenu.php48
1 files changed, 47 insertions, 1 deletions
diff --git a/app/view/templates/mediamenu.php b/app/view/templates/mediamenu.php
index 560025a..2a33b65 100644
--- a/app/view/templates/mediamenu.php
+++ b/app/view/templates/mediamenu.php
@@ -73,8 +73,54 @@
<p>Use this code to print the content of the actual folder in a page</p>
- <code><?= $mediaopt->getquery() ?></code>
+ <code><?= $mediaopt->getcode() ?></code>
</div>
</details>
+
+
+
+
+
+
+ <details class="hidephone" id="bookmarks">
+ <summary>Bookmarks</summary>
+ <div class="submenu">
+ <h2>Personnal</h2>
+ <?php if(!empty($user->bookmark())) { ?>
+ <form action="<?= $this->url('userbookmark') ?>" method="post">
+ <ul>
+ <?php foreach ($user->bookmark() as $bookmark) { ?>
+ <?php if($bookmark->route() === 'media') { ?>
+ <li>
+ <input type="checkbox" name="id[]" value="<?= $bookmark->id() ?>" id="bookmark_<?= $bookmark->id() ?>">
+ <label for="bookmark_<?= $bookmark->id() ?>" title="<?= $bookmark->query() ?>"><?= $bookmark->id() ?></label>
+ </li>
+ <?php } ?>
+ <?php } ?>
+ </ul>
+ <input type="hidden" name="action" value="del">
+ <input type="hidden" name="route" value="media">
+ <input type="hidden" name="user" value="<?= $user->id() ?>">
+ <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('userbookmark') ?>" method="post">
+ <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="<?= $mediaopt->getadress() ?>">
+ <input type="hidden" name="route" value="media">
+ <input type="hidden" name="user" value="<?= $user->id() ?>">
+ <input type="submit" name="action" value="add">
+ </form>
+ </div>
+ </details>
+
+
+
+
</aside> \ No newline at end of file