diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-18 08:23:27 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-18 08:23:27 +0200 |
commit | 7ad4bc352d678ec011af50d7be8e159d26a8a749 (patch) | |
tree | db117fd508a9e4d58af85a6f1f46a6d43dd3fa1e /web/template | |
parent | 51b8213ff1ba1f4db8396684f2afb82f0e38a90f (diff) |
Use virtual paths for voters page
Link to "/packages/$pkgname/voters/" instead of using "/voters/" and a
get parameter to request a specific package by ID.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_details.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 774d670..67cb5d1 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -143,10 +143,12 @@ if ($row["MaintainerUID"]): </tr> <tr> <th><?php echo __('Votes') . ': ' ?></th> -<?php -if ($atype == "Developer" || $atype == "Trusted User"): -?> - <td><a href="<?php echo get_uri('/voters/'); ?>?ID=<?php echo$pkgid ?>"><?php echo $votes ?></a> +<?php if ($atype == "Developer" || $atype == "Trusted User"): ?> +<?php if ($USE_VIRTUAL_URLS): ?> + <td><a href="<?php echo get_pkg_uri($row['Name']); ?>voters/"><?php echo $votes ?></a> +<?php else: ?> + <td><a href="<?php echo get_uri('/voters/'); ?>?ID=<?php echo $pkgid ?>"><?php echo $votes ?></a> +<?php endif; ?> <?php else: ?> <td><?php echo $votes ?></td> <?php endif; ?> |