summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/account_edit_form.php7
-rw-r--r--web/template/cgit/footer.html6
-rw-r--r--web/template/cgit/header.html14
-rw-r--r--web/template/comaintainers_form.php20
-rw-r--r--web/template/header.php3
-rw-r--r--web/template/pkg_details.php24
-rw-r--r--web/template/pkgbase_details.php24
7 files changed, 86 insertions, 12 deletions
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php
index 17dd937..110fbb5 100644
--- a/web/template/account_edit_form.php
+++ b/web/template/account_edit_form.php
@@ -97,6 +97,13 @@
<input type="text" size="30" maxlength="50" name="K" id="id_pgp" value="<?= html_format_pgp_fingerprint($K) ?>" />
</p>
+ <?php if ($A == "UpdateAccount"): ?>
+ <p>
+ <label for="id_ssh"><?= __("SSH Public Key") ?>:</label>
+ <textarea name="PK" id="id_ssh" rows="5" cols="30"><?= htmlspecialchars($PK) ?></textarea>
+ </p>
+ <?php endif; ?>
+
<p>
<label for="id_language"><?= __("Language") ?>:</label>
<select name="L" id="id_language">
diff --git a/web/template/cgit/footer.html b/web/template/cgit/footer.html
new file mode 100644
index 0000000..f90aeb7
--- /dev/null
+++ b/web/template/cgit/footer.html
@@ -0,0 +1,6 @@
+<div id="footer">
+ <p>
+ Copyright &copy; 2004-2014 AUR Development Team &ndash;
+ <strong>Unsupported packages are user produced content. Any use of the provided files is at your own risk.</strong>
+ </p>
+</div>
diff --git a/web/template/cgit/header.html b/web/template/cgit/header.html
new file mode 100644
index 0000000..0217f2f
--- /dev/null
+++ b/web/template/cgit/header.html
@@ -0,0 +1,14 @@
+ <div id="archnavbar" class="anb-aur">
+ <div id="archnavbarlogo"><h1><a href="/" title="Return to the main page">Arch Linux User Repository</a></h1></div>
+ <div id="archnavbarmenu">
+ <ul id="archnavbarlist">
+ <li id="anb-home"><a href="https://www.archlinux.org/" title="Arch news, packages, projects and more">Home</a></li>
+ <li id="anb-packages"><a href="https://www.archlinux.org/packages/" title="Arch Package Database">Packages</a></li>
+ <li id="anb-forums"><a href="https://bbs.archlinux.org/" title="Community forums">Forums</a></li>
+ <li id="anb-wiki"><a href="https://wiki.archlinux.org/" title="Community documentation">Wiki</a></li>
+ <li id="anb-bugs"><a href="https://bugs.archlinux.org/" title="Report and track bugs">Bugs</a></li>
+ <li id="anb-aur"><a href="/" title="Arch Linux User Repository">AUR</a></li>
+ <li id="anb-download"><a href="https://www.archlinux.org/download/" title="Get Arch Linux">Download</a></li>
+ </ul>
+ </div>
+ </div><!-- #archnavbar -->
diff --git a/web/template/comaintainers_form.php b/web/template/comaintainers_form.php
new file mode 100644
index 0000000..050f255
--- /dev/null
+++ b/web/template/comaintainers_form.php
@@ -0,0 +1,20 @@
+<div class="box">
+ <h2><?= __('Manage Co-maintainers: %s', htmlspecialchars($pkgbase_name)) ?></h2>
+ <p>
+ <?= __('Use this form to add co-maintainers for %s%s%s (one user name per line):',
+ '<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
+ </p>
+ <form action="<?= get_pkgbase_uri($pkgbase_name); ?>" method="post">
+ <fieldset>
+ <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <p>
+ <label for="id_users"><?= __("Users") ?>:</label>
+ <textarea name="users" id="id_users" rows="5" cols="50"><?= htmlspecialchars(implode("\n", $users)) ?></textarea>
+ </p>
+ <p>
+ <input type="submit" class="button" name="do_EditComaintainers" value="<?= __("Save") ?>" />
+ </p>
+ </fieldset>
+ </form>
+</div>
+
diff --git a/web/template/header.php b/web/template/header.php
index 6167fb7..8a1494c 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -16,7 +16,7 @@
</head>
<body>
<div id="archnavbar" class="anb-aur">
- <div id="archnavbarlogo"><h1><a href="https://www.archlinux.org/" title="Return to the main page">Arch Linux</a></h1></div>
+ <div id="archnavbarlogo"><h1><a href="/" title="Return to the main page">Arch Linux User Repository</a></h1></div>
<div id="archnavbarmenu">
<ul id="archnavbarlist">
<li id="anb-home"><a href="https://www.archlinux.org/" title="Arch news, packages, projects and more">Home</a></li>
@@ -60,7 +60,6 @@
<?php if (has_credential(CRED_PKGREQ_LIST)): ?>
<li><a href="<?= get_uri('/requests/') ; ?>"><?= __("Requests"); ?></a></li>
<?php endif; ?>
- <li><a href="<?= get_uri('/submit/'); ?>"><?= __("Submit"); ?></a></li>
<?php if (has_credential(CRED_ACCOUNT_SEARCH)): ?>
<li><a href="<?= get_uri('/accounts/') ; ?>"><?= __("Accounts"); ?></a></li>
<?php endif; ?>
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index b0ceb8c..52afba2 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>
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
index b8d36ed..ae363fd 100644
--- a/web/template/pkgbase_details.php
+++ b/web/template/pkgbase_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);
$base_id = intval($row['ID']);
@@ -19,9 +24,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['Name'], 0, 2) . "/" . $row['Name'];
-
$pkgs = pkgbase_get_pkgnames($base_id);
?>
<div id="pkgdetails" class="box">
@@ -30,8 +32,8 @@ $pkgs = pkgbase_get_pkgnames($base_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['Name'] ?>.tar.gz"><?= __('Download tarball') ?></a></li>
+ <li><a href="<?= $cgit_uri . $row['Name'] . '.git' ?>/tree/PKGBUILD"><?= __('View PKGBUILD') ?></a></li>
+ <li><a href="<?= $cgit_uri . $row['Name'] . '.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): ?>
@@ -80,6 +82,9 @@ $pkgs = pkgbase_get_pkgnames($base_id);
</form>
</li>
<?php endif; ?>
+ <?php if (has_credential(CRED_PKGBASE_EDIT_COMAINTAINERS, array($row["MaintainerUID"]))): ?>
+ <li><a href="<?= get_pkgbase_uri($row['Name']) . '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['Name']) . 'request/'; ?>"><?= __('File Request'); ?></a></li>
<?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
@@ -109,6 +114,15 @@ $pkgs = pkgbase_get_pkgnames($base_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><?= __('Category') . ': ' ?></th>
<?php
if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))):