diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-01 10:18:06 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-01 10:28:22 +0200 |
| commit | c4f387d21147b91e708345fc6f7405fb1a2b6271 (patch) | |
| tree | ed7ced6b63636dfa01870d595b83c32a47c4bd67 /views/profile/index.php | |
| parent | faabc462d3080cac67687f450135a078731fb3d1 (diff) | |
| download | nowayforward_human-c4f387d21147b91e708345fc6f7405fb1a2b6271.tar nowayforward_human-c4f387d21147b91e708345fc6f7405fb1a2b6271.tar.gz nowayforward_human-c4f387d21147b91e708345fc6f7405fb1a2b6271.zip | |
feat: Move single archive item code to a separate file
Diffstat (limited to 'views/profile/index.php')
| -rw-r--r-- | views/profile/index.php | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/views/profile/index.php b/views/profile/index.php index 0a10e4a..58a43e2 100644 --- a/views/profile/index.php +++ b/views/profile/index.php @@ -18,36 +18,12 @@ <h2 onclick="openArchives()">Archives</h2> <h2 onclick="openLists()">Lists</h2> <section id="user-archives"> - <?php foreach ($user->archives() as $page): ?> - <section class="item"> - <section> - <div> - <img src="<?= '/archives/' . $page->FaviconPath ?>" class="favicon"> - <a href="<?= '/archives/' . $page->WID ?>"><?= $page->URL ?></a> - <span class="float-right"><?= $page->Date ?></span> - </div> - <div class="details"> - <span>Visits: <?= $page->Visits ?></span> - <span class="float-right"><?= Database\User::fromDBuid($page->RequesterUID)->Username ?></span> - </div> - </section> - <section name="itemButton" hidden> - <form action="/list/update" method="GET"> - <input type="hidden" name="wid" value="<?= $page->WID ?>"> - <input type="submit" value="+"> - </form> - <span><!-- Delete (when admin) button --></span> - </section> - </section> - <?php endforeach; ?> - <script type="text/javascript"> - function showButtons() { - for (buttonset of document.getElementsByName('itemButton')) { - buttonset.hidden = false; - } - } - authenticated(showButtons); - </script> + <?php + foreach ($user->archives() as $page) { + include $VIEWS_DIR . '/archive/item.php'; + } + include_once $VIEWS_DIR . '/archive/item_show.php'; + ?> </section> <section id="user-lists" hidden> |
