summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_details.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-07-17 21:10:04 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-07-17 22:22:09 +0200
commit4679e8ef5d2f998abe5b29fe8c1af9d6b3143b6a (patch)
tree2aaea2ce9c0e7f4ad5fa3c56aa55c184bac67961 /web/template/pkg_details.php
parentc349cb2feafa1c2009e8f41c039edc661ef6e0be (diff)
downloadaurweb-4679e8ef5d2f998abe5b29fe8c1af9d6b3143b6a.tar.xz
Move package actions to the action box
Note that this currently only works if the virtual path feature is enabled. If you don't use virtual paths, these will still be displayed as buttons below the package details listing. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 6e19b3b..7542ea8 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -37,6 +37,23 @@ $sources = package_sources($row["ID"]);
<li><a href="<?php echo $urlpath ?>/PKGBUILD"><?php echo __('View PKGBUILD') ?></a></li>
<li><a href="<?php echo $urlpath . '/' . $row['Name'] ?>.tar.gz"><?php echo __('Download tarball') ?></a></li>
<li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li>
+ <?php if ($USE_VIRTUAL_URLS && $uid): ?>
+ <?php if (user_voted($uid, $row['ID'])): ?>
+ <li><a href="<?php echo get_pkg_uri($row['Name']) . 'unvote/'; ?>"><?php echo __('UnVote'); ?></a></li>
+ <?php else: ?>
+ <li><a href="<?php echo get_pkg_uri($row['Name']) . 'vote/'; ?>"><?php echo __('Vote'); ?></a></li>
+ <?php endif; ?>
+ <?php if (user_notify($uid, $row['ID'])): ?>
+ <li><a href="<?php echo get_pkg_uri($row['Name']) . 'unnotify/'; ?>"><?php echo __('UnNotify'); ?></a></li>
+ <?php else: ?>
+ <li><a href="<?php echo get_pkg_uri($row['Name']) . 'notify/'; ?>"><?php echo __('Notify'); ?></a></li>
+ <?php endif; ?>
+ <?php if ($row["OutOfDateTS"] === NULL): ?>
+ <li><a href="<?php echo get_pkg_uri($row['Name']) . 'flag/'; ?>"><?php echo __('Flag'); ?></a></li>
+ <?php else: ?>
+ <li><a href="<?php echo get_pkg_uri($row['Name']) . 'unflag/'; ?>"><?php echo __('UnFlag'); ?></a></li>
+ <?php endif; ?>
+ <?php endif; ?>
</ul>
</div>
</div>