diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2015-06-14 09:49:17 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-06-14 17:58:56 +0200 |
commit | a2f79eb2e1ff74e7d2403bf194a52b41cc7f3c0c (patch) | |
tree | e3ee9cea28d8a8a8b28eadef3b86e314690b2b81 /web/template | |
parent | 19ee268935de2befc68fc245555cfc5ba7951062 (diff) | |
download | aurweb-a2f79eb2e1ff74e7d2403bf194a52b41cc7f3c0c.tar.xz |
Refactor code for printing account links
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_details.php | 18 | ||||
-rw-r--r-- | web/template/pkgbase_details.php | 18 | ||||
-rw-r--r-- | web/template/tu_last_votes_list.php | 2 |
3 files changed, 1 insertions, 37 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index cc2f055..7b75210 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -289,33 +289,15 @@ if (has_credential(CRED_PKGBASE_SET_KEYWORDS, array($row["MaintainerUID"]))): <?php endif; ?> <tr> <th><?= __('Submitter') .': ' ?></th> - <?php if ($row["SubmitterUID"] && $SID): ?> - <td><a href="<?= get_uri('/account/') . html_format_username($submitter, ENT_QUOTES) ?>" title="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?= html_format_username($submitter) ?></a></td> - <?php elseif ($row["SubmitterUID"] && !$SID): ?> <td><?= html_format_username($submitter) ?></td> - <?php else: ?> - <td><?= __('None') ?></td> - <?php endif; ?> </tr> <tr> <th><?= __('Maintainer') .': ' ?></th> - <?php if ($row["MaintainerUID"] && $SID): ?> - <td><a href="<?= get_uri('/account/') . html_format_username($maintainer) ?>" title="<?= __('View account information for %s', html_format_username($maintainer)) ?>"><?= html_format_username($maintainer) ?></a></td> - <?php elseif ($row["MaintainerUID"] && !$SID): ?> <td><?= html_format_username($maintainer) ?></td> - <?php else: ?> - <td><?= __('None') ?></td> - <?php endif; ?> </tr> <tr> <th><?= __('Last Packager') .': ' ?></th> - <?php if ($row["PackagerUID"] && $SID): ?> - <td><a href="<?= get_uri('/account/') . html_format_username($packager) ?>" title="<?= __('View account information for %s', html_format_username($packager)) ?>"><?= html_format_username($packager) ?></a></td> - <?php elseif ($row["PackagerUID"] && !$SID): ?> <td><?= html_format_username($packager) ?></td> - <?php else: ?> - <td><?= __('None') ?></td> - <?php endif; ?> </tr> <tr> <th><?= __('Votes') . ': ' ?></th> diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 2522f34..2ceb35f 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -148,33 +148,15 @@ if (has_credential(CRED_PKGBASE_SET_KEYWORDS, array($row["MaintainerUID"]))): <?php endif; ?> <tr> <th><?= __('Submitter') .': ' ?></th> - <?php if ($row["SubmitterUID"] && $SID): ?> - <td><a href="<?= get_uri('/account/') . html_format_username($submitter, ENT_QUOTES) ?>" title="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?= html_format_username($submitter) ?></a></td> - <?php elseif ($row["SubmitterUID"] && !$SID): ?> <td><?= html_format_username($submitter) ?></td> - <?php else: ?> - <td><?= __('None') ?></td> - <?php endif; ?> </tr> <tr> <th><?= __('Maintainer') .': ' ?></th> - <?php if ($row["MaintainerUID"] && $SID): ?> - <td><a href="<?= get_uri('/account/') . html_format_username($maintainer) ?>" title="<?= __('View account information for %s', html_format_username($maintainer)) ?>"><?= html_format_username($maintainer) ?></a></td> - <?php elseif ($row["MaintainerUID"] && !$SID): ?> <td><?= html_format_username($maintainer) ?></td> - <?php else: ?> - <td><?= __('None') ?></td> - <?php endif; ?> </tr> <tr> <th><?= __('Last Packager') .': ' ?></th> - <?php if ($row["PackagerUID"] && $SID): ?> - <td><a href="<?= get_uri('/account/') . html_format_username($packager) ?>" title="<?= __('View account information for %s', html_format_username($packager)) ?>"><?= html_format_username($packager) ?></a></td> - <?php elseif ($row["PackagerUID"] && !$SID): ?> <td><?= html_format_username($packager) ?></td> - <?php else: ?> - <td><?= __('None') ?></td> - <?php endif; ?> </tr> <tr> <th><?= __('Votes') . ': ' ?></th> diff --git a/web/template/tu_last_votes_list.php b/web/template/tu_last_votes_list.php index f7b07bc..5cff248 100644 --- a/web/template/tu_last_votes_list.php +++ b/web/template/tu_last_votes_list.php @@ -21,7 +21,7 @@ ?> <tr class="<?= $c ?>"> <td> - <a href="<?= get_uri('/account/') . html_format_username($username) ?>" title="<?= __('View account information for %s', html_format_username($username)) ?>"><?= html_format_username($username) ?></a> + <?= html_format_username($username) ?> </td> <td> <a href="<?= get_uri('/tu/'); ?>?id=<?= $row['LastVote'] ?>"><?= intval($row["LastVote"]) ?></a> |