diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2020-02-22 12:06:17 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2020-02-26 13:51:18 +0100 |
commit | cbab9870c1388f2d60a8d6cfbb936c384c1b58b6 (patch) | |
tree | 0f9fbf825884ca18138e02fd733236d896b65237 | |
parent | afe3f5d0e562104fb930b650ca799ba433a68c2e (diff) | |
download | aur-cbab9870c1388f2d60a8d6cfbb936c384c1b58b6.tar.gz aur-cbab9870c1388f2d60a8d6cfbb936c384c1b58b6.tar.xz |
Fix HTML code in the account search results table
Do not add an opening <tbody> tag for every row. Instead, wrap all rows
in <tbody></tbody>.
While at it, also simplify the code used to color the rows.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r-- | web/template/account_search_results.php | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/web/template/account_search_results.php b/web/template/account_search_results.php index 81cd8185..0f7eb7a4 100644 --- a/web/template/account_search_results.php +++ b/web/template/account_search_results.php @@ -16,17 +16,9 @@ else: <th><?= __("Edit Account") ?></th> </tr> </thead> - <?php - $i = 0; - foreach ($userinfo as $indx => $row): - if ($i % 2): - $c = "even"; - else: - $c = "odd"; - endif; - ?> - <tbody> - <tr class ="<?= $c ?>"> + <tbody> + <?php foreach ($userinfo as $idx => $row): ?> + <tr class ="<?= ($idx % 2 == 0) ? 'odd' : 'even' ?>"> <td><a href="<?= get_uri('/packages/'); ?>?SeB=m&K=<?= $row["Username"] ?>"><?= $row["Username"] ?></a></td> <td><?= $row["AccountType"] ?></td> <td> @@ -49,10 +41,8 @@ else: <?php endif; ?> </td> </tr> - <?php - $i++; - endforeach; - ?> + <?php endforeach; ?> + </tbody> </table> <table class="results"> |