mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
tu_list.php: Hide table if no results are found
Instead of showing a table with a single "No results found." entry, do not show the table at all and display the text "No results found." in a <p></p> container. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
3130a887e8
commit
54ad28369a
1 changed files with 13 additions and 12 deletions
|
@ -7,6 +7,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (empty($result)): ?>
|
||||||
|
<p><?= __("No results found.") ?></p>
|
||||||
|
<?php else: ?>
|
||||||
<table class="results">
|
<table class="results">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -21,14 +24,13 @@
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if (empty($result)): ?>
|
<?php while (list($indx, $row) = each($result)): ?>
|
||||||
<tr><td align="center" colspan="0"><?= __("No results found.") ?></td></tr>
|
<?php
|
||||||
<?php else: while (list($indx, $row) = each($result)):
|
if ($indx % 2) {
|
||||||
if ($indx % 2):
|
$c = "even";
|
||||||
$c = "even";
|
} else {
|
||||||
else:
|
$c = "odd";
|
||||||
$c = "odd";
|
}
|
||||||
endif;
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?= $c ?>">
|
<tr class="<?= $c ?>">
|
||||||
<td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
|
<td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
|
||||||
|
@ -54,12 +56,10 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php endwhile; ?>
|
||||||
endwhile;
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="pkglist-stats">
|
<div class="pkglist-stats">
|
||||||
<p class="pkglist-nav">
|
<p class="pkglist-nav">
|
||||||
<?php if ($result):
|
<?php if ($result):
|
||||||
|
@ -74,4 +74,5 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue