ponepaste/theme/bulma/archive.php

69 lines
3 KiB
PHP
Raw Permalink Normal View History

2021-07-10 19:18:17 +01:00
<main class="bd-main">
<div class="container">
<div class="bd-duo">
<div class="bd-lead">
<article class="message is-info">
2021-07-10 19:18:17 +01:00
<div class="message-body">
2022-01-06 07:58:29 -05:00
There are <strong><?= $total_untagged ?></strong> pastes that still need to be tagged.
2021-07-10 19:18:17 +01:00
</div>
</article>
2021-10-15 20:38:36 -04:00
<?php if ($site_is_private): ?>
2021-08-26 05:35:21 -04:00
<h1 class="title is-5">This pastebin is private.</h1>
2021-10-15 20:38:36 -04:00
<?php else: ?>
2021-08-26 05:35:21 -04:00
<h1 class="title is-4">Pastes Archive</h1>
<form class="table_filterer" method="GET">
2022-01-06 07:58:29 -05:00
<label><i class="fa fa-search"></i>
<input class="search" type="search" name="q" placeholder="Filter..."
value="<?= pp_html_escape($filter_value); ?>"/>
2022-01-06 07:58:29 -05:00
</label>
<label>
Show&nbsp;
<select name="per_page">
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
&nbsp;per page
</label>
<button type="submit" class="button js-hidden">Search</button>
</form>
<table id="archive" class="table is-fullwidth is-hoverable">
<thead>
2022-03-12 13:56:32 -05:00
<tr class="paginator__sort">
<th data-sort-field="title">Title</th>
<th data-sort-field="author">Author</th>
<th data-sort-field="updated_at">Updated</th>
2022-03-12 13:56:32 -05:00
<th data-sort-field="tags">Tags</th>
2021-09-03 08:00:22 -04:00
</tr>
</thead>
2021-08-26 05:58:37 -04:00
<tbody>
<?php foreach ($pastes as $paste): ?>
<tr>
<td><a href="<?= urlForPaste($paste); ?>"><?= pp_html_escape($paste->title) ?></a></td>
<td><?= pp_html_escape($paste->user->username) ?></td>
<td><?= pp_html_escape($paste->updated_at ?? $paste->created_at) ?></td>
<td><?= tagsToHtml($paste->tags) ?></td>
</tr>
<?php endforeach; ?>
2021-08-26 05:58:37 -04:00
</tbody>
<tfoot>
2021-09-03 08:00:22 -04:00
<tr>
<th>Title</th>
<th>Author</th>
<th>Updated</th>
2021-09-03 08:00:22 -04:00
<th>Tags</th>
</tr>
</tfoot>
</table>
<div class="loading_container is-hidden">
2022-04-18 13:54:01 -04:00
</div>
2021-07-10 18:21:03 -04:00
<div class="paginator">
<?= paginate($current_page, $per_page, $total_results) ?>
</div>
</div>
2021-10-15 20:38:36 -04:00
<?php endif; ?>
</div>
</div>
2022-01-06 07:58:29 -05:00
</main>