diff mbox

pkgreq_results.php: Hide empty table

Message ID 20170225120953.31698-1-lfleischer@archlinux.org
State Accepted, archived
Headers show

Commit Message

Lukas Fleischer Feb. 25, 2017, 12:09 p.m. UTC
Display a message that no requests matched the filter criteria instead
of showing an empty package requests table.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 web/template/pkgreq_results.php | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php
index 74fcb10..fb49dfa 100644
--- a/web/template/pkgreq_results.php
+++ b/web/template/pkgreq_results.php
@@ -1,3 +1,6 @@ 
+<?php if (count($results) == 0): ?>
+<p><?= __("No requests matched your search criteria.") ?></p>
+<?php else: ?>
 <?php if ($show_headers): ?>
 <div class="pkglist-stats">
 	<p>
@@ -129,3 +132,4 @@ 
 	<?php endif; ?>
 </div>
 <?php endif; ?>
+<?php endif; ?>