diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2017-02-07 08:44:14 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2017-02-08 19:18:27 +0100 |
commit | 403241baa34c75ed4942926cf667094f6036b773 (patch) | |
tree | 8cf949733e3a75b3e1782f517ca79f89e7297379 /web | |
parent | 05007d8b1a0a9c0b8371a7f5a0bcf5e8d240956a (diff) | |
download | aur-403241baa34c75ed4942926cf667094f6036b773.tar.gz aur-403241baa34c75ed4942926cf667094f6036b773.tar.xz |
pkgreq_results.php: Add a flag to hide headers
Introduce a new boolean flag that can be used to disable extended
headers, pagination and forms.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web')
-rw-r--r-- | web/html/pkgreq.php | 1 | ||||
-rw-r--r-- | web/template/pkgreq_results.php | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/web/html/pkgreq.php b/web/html/pkgreq.php index e0ef6cfd..f981c25d 100644 --- a/web/html/pkgreq.php +++ b/web/html/pkgreq.php @@ -78,6 +78,7 @@ if (isset($base_id)) { html_header(__("Requests")); echo '<div id="pkglist-results" class="box">'; + $show_headers = true; include('pkgreq_results.php'); echo '</div>'; } diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php index bd4fc6b9..74fcb10d 100644 --- a/web/template/pkgreq_results.php +++ b/web/template/pkgreq_results.php @@ -1,3 +1,4 @@ +<?php if ($show_headers): ?> <div class="pkglist-stats"> <p> <?= _n('%d package request found.', '%d package requests found.', $total) ?> @@ -17,6 +18,7 @@ </p> <?php endif; ?> </div> +<?php endif; ?> <table class="results"> <thead> @@ -67,7 +69,7 @@ <a href="<?= get_uri('/account/') . htmlspecialchars($row['User'], ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($row['User'])) ?>"><?= htmlspecialchars($row['User']) ?></a> </td> <td<?php if ($due): ?> class="flagged"<?php endif; ?>><?= date("Y-m-d H:i", intval($row['RequestTS'])) ?></td> - <?php if ($row['Open']): ?> + <?php if ($row['Open'] && $show_headers): ?> <td> <?php if ($row['BaseID']): ?> <?php if ($row['Type'] == 'deletion'): ?> @@ -89,8 +91,9 @@ <?php endif; ?> <a href="<?= get_pkgreq_route() . '/' . intval($row['ID']) ?>/close/"><?= __('Close') ?></a> </td> - <?php else: ?> - <?php if ($row['Status'] == 1): ?> + <?php elseif ($row['Open'] && !$show_headers): ?> + <td><?= __("Pending") ?></td> + <?php elseif ($row['Status'] == 1): ?> <td><?= __("Closed") ?></td> <?php elseif ($row['Status'] == 2): ?> <td><?= __("Accepted") ?></td> @@ -99,13 +102,13 @@ <?php else: ?> <td><?= __("unknown") ?></td> <?php endif; ?> - <?php endif; ?> </tr> <?php endwhile; ?> </tbody> </table> +<?php if ($show_headers): ?> <div class="pkglist-stats"> <p> <?= _n('%d package request found.', '%d package requests found.', $total) ?> @@ -125,3 +128,4 @@ </p> <?php endif; ?> </div> +<?php endif; ?> |