summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_details.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php24
1 files changed, 19 insertions, 5 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index b0ceb8c7..52afba29 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -1,4 +1,9 @@
<?php
+
+$cgit_uri = config_get('options', 'cgit_uri');
+$git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['Name']));
+$git_clone_uri_priv = sprintf(config_get('options', 'git_clone_uri_priv'), htmlspecialchars($row['Name']));
+
$uid = uid_from_sid($SID);
$pkgid = intval($row['ID']);
@@ -21,9 +26,6 @@ $updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($r
$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"]));
$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($row["OutOfDateTS"]));
-$package_url = config_get('options', 'package_url');
-$urlpath = $package_url . substr($row['BaseName'], 0, 2) . "/" . $row['BaseName'];
-
$lics = pkg_licenses($row["ID"]);
$grps = pkg_groups($row["ID"]);
@@ -79,8 +81,8 @@ $sources = pkg_sources($row["ID"]);
<div id="actionlist">
<h4><?= __('Package Actions') ?></h4>
<ul class="small">
- <li><a href="<?= $urlpath ?>/PKGBUILD"><?= __('View PKGBUILD') ?></a></li>
- <li><a href="<?= $urlpath . '/' . $row['BaseName'] ?>.tar.gz"><?= __('Download tarball') ?></a></li>
+ <li><a href="<?= $cgit_uri . $row['BaseName'] . '.git' ?>/tree/PKGBUILD"><?= __('View PKGBUILD') ?></a></li>
+ <li><a href="<?= $cgit_uri . $row['BaseName'] . '.git' ?>/snapshot/master.tar.gz"><?= __('Download snapshot') ?></a></li>
<li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li>
<li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li>
<?php if ($uid): ?>
@@ -129,6 +131,9 @@ $sources = pkg_sources($row["ID"]);
</form>
</li>
<?php endif; ?>
+ <?php if (has_credential(CRED_PKGBASE_EDIT_COMAINTAINERS, array($row["MaintainerUID"]))): ?>
+ <li><a href="<?= get_pkgbase_uri($row['BaseName']) . 'comaintainers/'; ?>"><?= __('Manage Co-Maintainers'); ?></a></li>
+ <?php endif; ?>
<li><span class="flagged"><?php if ($row["RequestCount"] > 0) { echo _n('%d pending request', '%d pending requests', $row["RequestCount"]); } ?></span></li>
<li><a href="<?= get_pkgbase_uri($row['BaseName']) . 'request/'; ?>"><?= __('File Request'); ?></a></li>
<?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
@@ -158,6 +163,15 @@ $sources = pkg_sources($row["ID"]);
<table id="pkginfo">
<tr>
+ <th><?= __('Git Clone URL') . ': ' ?></th>
+ <td>
+ <a href="<?= $git_clone_uri_anon ?>"><?= $git_clone_uri_anon ?></a>
+ <?php if ($uid == $row["MaintainerUID"]): ?>
+ <br /> <a href="<?= $git_clone_uri_priv ?>"><?= $git_clone_uri_priv ?></a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <tr>
<th><?= __('Package Base') . ': ' ?></th>
<td class="wrap"><a href="<?= htmlspecialchars(get_pkgbase_uri($row['BaseName']), ENT_QUOTES); ?>"><?= htmlspecialchars($row['BaseName']); ?></a></td>
</tr>