summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/account_edit_form.php15
-rw-r--r--web/template/cgit/header.html1
-rw-r--r--web/template/comaintainers_form.php2
-rw-r--r--web/template/flag_comment.php2
-rw-r--r--web/template/header.php8
-rw-r--r--web/template/pkg_comments.php6
-rw-r--r--web/template/pkg_details.php10
-rw-r--r--web/template/pkg_search_form.php2
-rw-r--r--web/template/pkg_search_results.php193
-rw-r--r--web/template/pkgbase_details.php8
-rw-r--r--web/template/pkgreq_close_form.php2
-rw-r--r--web/template/pkgreq_form.php2
-rw-r--r--web/template/pkgreq_results.php246
-rw-r--r--web/template/stats/updates_table.php2
-rw-r--r--web/template/tu_details.php4
-rw-r--r--web/template/tu_list.php4
16 files changed, 277 insertions, 230 deletions
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php
index 19821a0b..17c9d14e 100644
--- a/web/template/account_edit_form.php
+++ b/web/template/account_edit_form.php
@@ -129,6 +129,21 @@
?>
</select>
</p>
+ <p>
+ <label for="id_timezone"><?= __("Timezone") ?></label>
+ <select name="TZ" id="id_timezone">
+<?php
+ $timezones = generate_timezone_list();
+ while (list($key, $val) = each($timezones)) {
+ if ($TZ == $key) {
+ print "<option value=\"".$key."\" selected=\"selected\"> ".$val."</option>\n";
+ } else {
+ print "<option value=\"".$key."\"> ".$val."</option>\n";
+ }
+ }
+?>
+ </select>
+ </p>
</fieldset>
<fieldset>
diff --git a/web/template/cgit/header.html b/web/template/cgit/header.html
index 0217f2fd..2d418702 100644
--- a/web/template/cgit/header.html
+++ b/web/template/cgit/header.html
@@ -7,6 +7,7 @@
<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-security"><a href="https://security.archlinux.org/" title="Arch Linux Security Tracker">Security</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>
diff --git a/web/template/comaintainers_form.php b/web/template/comaintainers_form.php
index 70a74645..79e2b52c 100644
--- a/web/template/comaintainers_form.php
+++ b/web/template/comaintainers_form.php
@@ -1,5 +1,5 @@
<div class="box">
- <h2><?= __('Manage Co-maintainers') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Manage Co-maintainers') ?>: <?= 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>'); ?>
diff --git a/web/template/flag_comment.php b/web/template/flag_comment.php
index 36af43ea..e8855fe8 100644
--- a/web/template/flag_comment.php
+++ b/web/template/flag_comment.php
@@ -5,7 +5,7 @@
<?= __('%s%s%s flagged %s%s%s out-of-date on %s%s%s for the following reason:',
'<strong>', html_format_username($message['Username']), '</strong>',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>',
- '<strong>', gmdate('Y-m-d', $message['OutOfDateTS']), '</strong>'); ?>
+ '<strong>', date('Y-m-d', $message['OutOfDateTS']), '</strong>'); ?>
<?php else: ?>
<?= __('%s%s%s is not flagged out-of-date.',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/template/header.php b/web/template/header.php
index 874109a5..f7409400 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -24,6 +24,7 @@
<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-security"><a href="https://security.archlinux.org/" title="Arch Linux Security Tracker">Security</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>
@@ -53,10 +54,9 @@
</div>
<div id="archdev-navbar">
<ul>
- <li><a href="<?= get_uri('/'); ?>">AUR <?= __("Home"); ?></a></li>
- <li><a href="<?= get_uri('/packages/'); ?>"><?= __("Packages"); ?></a></li>
<?php if (isset($_COOKIE['AURSID'])): ?>
- <li><a href="<?= get_uri('/packages/'); ?>?SeB=m&amp;K=<?= username_from_sid($_COOKIE["AURSID"]); ?>"><?= __("My Packages"); ?></a></li>
+ <li><a href="<?= get_uri('/'); ?>"><?= __("Dashboard"); ?></a></li>
+ <li><a href="<?= get_uri('/packages/'); ?>"><?= __("Packages"); ?></a></li>
<?php if (has_credential(CRED_PKGREQ_LIST)): ?>
<li><a href="<?= get_uri('/requests/') ; ?>"><?= __("Requests"); ?></a></li>
<?php endif; ?>
@@ -67,6 +67,8 @@
<?php if (has_credential(CRED_TU_LIST_VOTES)): ?><li><a href="<?= get_uri('/tu/'); ?>"><?= __("Trusted User"); ?></a></li><?php endif; ?>
<li><a href="<?= get_uri('/logout/'); ?>"><?= __("Logout"); ?></a></li>
<?php else: ?>
+ <li><a href="<?= get_uri('/'); ?>">AUR <?= __("Home"); ?></a></li>
+ <li><a href="<?= get_uri('/packages/'); ?>"><?= __("Packages"); ?></a></li>
<li><a href="<?= get_uri('/register/'); ?>"><?= __("Register"); ?></a></li>
<?php if (config_get_bool('options', 'disable_http_login') && empty($_SERVER['HTTPS'])): ?>
<li><a href="<?= get_uri('/login/', true); ?>"><?= __("Login"); ?></a></li>
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index a28e41b0..fee1898c 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -17,7 +17,7 @@ if (!isset($count)) {
<?php while (list($indx, $row) = each($comments)): ?>
<?php
- $date_fmtd = gmdate('Y-m-d H:i', $row['CommentTS']);
+ $date_fmtd = date('Y-m-d H:i', $row['CommentTS']);
if ($row['UserName']) {
$user_fmtd = html_format_username($row['UserName']);
$heading = __('%s commented on %s', $user_fmtd, $date_fmtd);
@@ -30,7 +30,7 @@ if (!isset($count)) {
$is_pinned = $row['PinnedTS'];
if ($uid && $is_deleted) {
- $date_fmtd = gmdate('Y-m-d H:i', $row['DelTS']);
+ $date_fmtd = date('Y-m-d H:i', $row['DelTS']);
$heading .= ' <span class="edited">(';
if ($row['DelUserName']) {
$user_fmtd = html_format_username($row['DelUserName']);
@@ -40,7 +40,7 @@ if (!isset($count)) {
}
$heading .= ')</span>';
} elseif ($uid && $is_edited) {
- $date_fmtd = gmdate('Y-m-d H:i', $row['EditedTS']);
+ $date_fmtd = date('Y-m-d H:i', $row['EditedTS']);
$heading .= ' <span class="edited">(';
if ($row['EditUserName']) {
$user_fmtd = html_format_username($row['EditUserName']);
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index b9c66d47..ed8974a3 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -1,6 +1,6 @@
<?php
-$pkgbuild_uri = sprintf(config_get('options', 'pkgbuild_uri'), urlencode($row['BaseName']));
+$pkgbuild_uri = sprintf(config_get('options', 'source_file_uri'), 'PKGBUILD', urlencode($row['BaseName']));
$log_uri = sprintf(config_get('options', 'log_uri'), urlencode($row['BaseName']));
$snapshot_uri = sprintf(config_get('options', 'snapshot_uri'), urlencode($row['BaseName']));
$git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['BaseName']));
@@ -34,9 +34,9 @@ $msg = __('unknown');
$license = empty($row['License']) ? $msg : $row['License'];
# Print the timestamps for last updates
-$updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"]));
-$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"]));
+$updated_time = ($row["ModifiedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["ModifiedTS"]));
+$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["SubmittedTS"]));
+$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : date("Y-m-d", intval($row["OutOfDateTS"]));
$lics = pkg_licenses($row["ID"]);
$grps = pkg_groups($row["ID"]);
@@ -299,7 +299,7 @@ endif;
<div>
<ul id="pkgsrcslist">
<?php while (list($k, $src) = each($sources)): ?>
- <li><?= pkg_source_link($src[0], $src[1]) ?></li>
+ <li><?= pkg_source_link($src[0], $src[1], urlencode($row['BaseName'])) ?></li>
<?php endwhile; ?>
</ul>
</div>
diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php
index 795a796e..3d0cde6c 100644
--- a/web/template/pkg_search_form.php
+++ b/web/template/pkg_search_form.php
@@ -9,6 +9,8 @@ $searchby = array(
'B' => __('Exact Package Base'),
'k' => __('Keywords'),
'm' => __('Maintainer'),
+ 'c' => __('Co-maintainer'),
+ 'M' => __('Maintainer, Co-maintainer'),
's' => __('Submitter')
);
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 37a90328..7f92685a 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -1,54 +1,74 @@
<?php
+if ($show_headers) {
+ $fmtth = function($title, $sb=false, $so=false, $hint=false) {
+ echo '<th>';
+ if ($sb) {
+ echo '<a href="?' . mkurl('SB=' . $sb . '&SO = ' . $so) . '">' . $title . '</a>';
+ } else {
+ echo $title;
+ }
+ if ($hint) {
+ echo '<span title="' . $hint . '" class="hover-help"><sup>?</sup></span>';
+ }
+ echo '</th>';
+ };
+} else {
+ $fmtth = function($title, $sb=false, $so=false, $hint=false) {
+ echo '<th>' . $title . '</th>';
+ };
+}
+
if (!$result): ?>
- <div class="box"><p><?= __("Error retrieving package list.") ?></p></div>
+ <p><?= __("Error retrieving package list.") ?></p>
<?php elseif ($total == 0): ?>
- <div class="box"><p><?= __("No packages matched your search criteria.") ?></p></div>
+ <p><?= __("No packages matched your search criteria.") ?></p>
<?php else: ?>
- <div id="pkglist-results" class="box">
- <div class="pkglist-stats">
- <p>
- <?= _n('%d package found.', '%d packages found.', $total) ?>
- <?= __('Page %d of %d.', $current, $pages) ?>
- </p>
- <?php if (count($templ_pages) > 1): ?>
- <p class="pkglist-nav">
- <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
- <?php if ($pagestart === false): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php elseif ($pagestart + 1 == $first): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php else: ?>
- <a class="page" href="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
- <?php endif; ?>
- <?php endforeach; ?>
- </p>
- <?php endif; ?>
- </div>
+ <?php if ($show_headers): ?>
+ <div class="pkglist-stats">
+ <p>
+ <?= _n('%d package found.', '%d packages found.', $total) ?>
+ <?= __('Page %d of %d.', $current, $pages) ?>
+ </p>
+ <?php if (count($templ_pages) > 1): ?>
+ <p class="pkglist-nav">
+ <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
+ <?php if ($pagestart === false): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php elseif ($pagestart + 1 == $first): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php else: ?>
+ <a class="page" href="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </p>
+ <?php endif; ?>
+ </div>
+ <?php endif; ?>
- <form id="pkglist-results-form" method="post" action="<?= get_uri('/pkgbase/'); ?>?<?= htmlentities($_SERVER['QUERY_STRING']) ?>">
- <table class="results">
- <thead>
- <tr>
- <?php if ($SID): ?>
- <th>&nbsp;</th>
- <?php endif; ?>
- <th><a href="?<?= mkurl('SB=n&SO=' . $SO_next) ?>"><?= __("Name") ?></a></th>
- <th><?= __("Version") ?></th>
- <th><a href="?<?= mkurl('SB=v&SO=' . $SO_next) ?>"><?= __("Votes") ?></a></th>
- <th><a href="?<?= mkurl('SB=p&SO=' . $SO_next) ?>"><?= __("Popularity") ?></a><span title="<?= __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of %.2f per day since its creation.', 0.98) ?>" class="hover-help"><sup>?</sup></span></th>
- <?php if ($SID): ?>
- <th><a href="?<?= mkurl('SB=w&SO=' . $SO_next) ?>"><?= __("Voted") ?></a></th>
- <th><a href="?<?= mkurl('SB=o&SO=' . $SO_next) ?>"><?= __("Notify") ?></a></th>
- <?php endif; ?>
- <th><?= __("Description") ?></th>
- <th><a href="?<?= mkurl('SB=m&SO=' . $SO_next) ?>"><?= __("Maintainer") ?></a></th>
- </tr>
- </thead>
- <tbody>
+ <form id="pkglist-results-form" method="post" action="<?= get_uri('/pkgbase/'); ?>?<?= htmlentities($_SERVER['QUERY_STRING']) ?>">
+ <table class="results">
+ <thead>
+ <tr>
+ <?php if ($SID && $show_headers): ?>
+ <th>&nbsp;</th>
+ <?php endif; ?>
+ <?php $fmtth(__('Name'), 'n', $SO_next) ?>
+ <?php $fmtth(__('Version')) ?>
+ <?php $fmtth(__('Votes'), 'v', $SO_next) ?>
+ <?php $fmtth(__('Popularity'), 'p', $SO_next, __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of %.2f per day since its creation.', 0.98)) ?>
+ <?php if ($SID): ?>
+ <?php $fmtth(__('Voted'), 'w', $SO_next) ?>
+ <?php $fmtth(__('Notify'), 'o', $SO_next) ?>
+ <?php endif; ?>
+ <?php $fmtth(__('Description')) ?>
+ <?php $fmtth(__('Maintainer'), 'm', $SO_next) ?>
+ </tr>
+ </thead>
+ <tbody>
<?php while (list($indx, $row) = each($searchresults)): ?>
<tr class="<?= ($indx % 2 == 0) ? 'odd' : 'even' ?>">
- <?php if ($SID): ?>
+ <?php if ($SID && $show_headers): ?>
<td><input type="checkbox" name="IDs[<?= $row["PackageBaseID"] ?>]" value="1" /></td>
<?php endif; ?>
<td><a href="<?= htmlspecialchars(get_pkg_uri($row["Name"]), ENT_QUOTES); ?>"><?= htmlspecialchars($row["Name"]) ?></a></td>
@@ -82,51 +102,52 @@ if (!$result): ?>
</tr>
<?php endwhile; ?>
- </tbody>
- </table>
+ </tbody>
+ </table>
- <div class="pkglist-stats">
- <p>
- <?= _n('%d package found.', '%d packages found.', $total) ?>
- <?= __('Page %d of %d.', $current, $pages) ?>
- </p>
- <?php if (count($templ_pages) > 1): ?>
- <p class="pkglist-nav">
- <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
- <?php if ($pagestart === false): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php elseif ($pagestart + 1 == $first): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php else: ?>
- <a class="page" href="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
- <?php endif; ?>
- <?php endforeach; ?>
- </p>
- <?php endif; ?>
- </div>
+ <?php if ($show_headers): ?>
+ <div class="pkglist-stats">
+ <p>
+ <?= _n('%d package found.', '%d packages found.', $total) ?>
+ <?= __('Page %d of %d.', $current, $pages) ?>
+ </p>
+ <?php if (count($templ_pages) > 1): ?>
+ <p class="pkglist-nav">
+ <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
+ <?php if ($pagestart === false): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php elseif ($pagestart + 1 == $first): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php else: ?>
+ <a class="page" href="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </p>
+ <?php endif; ?>
+ </div>
- <?php if ($SID): ?>
- <p>
- <select name="action">
- <option><?= __("Actions") ?></option>
- <option value="do_UnFlag"><?= __("Unflag Out-of-date") ?></option>
- <option value="do_Adopt"><?= __("Adopt Packages") ?></option>
- <option value="do_Disown"><?= __("Disown Packages") ?></option>
- <?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
- <option value="do_Delete"><?= __("Delete Packages") ?></option>
- <?php endif; ?>
- <option value="do_Notify"><?= __("Notify") ?></option>
- <option value="do_UnNotify"><?= __("UnNotify") ?></option>
- </select>
+ <?php if ($SID): ?>
+ <p>
+ <select name="action">
+ <option><?= __("Actions") ?></option>
+ <option value="do_UnFlag"><?= __("Unflag Out-of-date") ?></option>
+ <option value="do_Adopt"><?= __("Adopt Packages") ?></option>
+ <option value="do_Disown"><?= __("Disown Packages") ?></option>
<?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
- <label for="merge_Into"><?= __("Merge into") ?></label>
- <input type="text" id="merge_Into" name="merge_Into" />
+ <option value="do_Delete"><?= __("Delete Packages") ?></option>
<?php endif; ?>
- <label class="confirmation"><input type="checkbox" name="confirm" value="1" /> <?= __("Confirm") ?></label>
- <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
- <input type="submit" class="button" style="width: 80px" value="<?= __("Go") ?>" />
- </p>
- <?php endif; # if ($SID) ?>
- </form>
- </div>
+ <option value="do_Notify"><?= __("Notify") ?></option>
+ <option value="do_UnNotify"><?= __("UnNotify") ?></option>
+ </select>
+ <?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
+ <label for="merge_Into"><?= __("Merge into") ?></label>
+ <input type="text" id="merge_Into" name="merge_Into" />
+ <?php endif; ?>
+ <label class="confirmation"><input type="checkbox" name="confirm" value="1" /> <?= __("Confirm") ?></label>
+ <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <input type="submit" class="button" style="width: 80px" value="<?= __("Go") ?>" />
+ </p>
+ <?php endif; # if ($SID) ?>
+ <?php endif; ?>
+ </form>
<?php endif; # search was successful and returned multiple results ?>
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
index 1012c4e6..e368872e 100644
--- a/web/template/pkgbase_details.php
+++ b/web/template/pkgbase_details.php
@@ -31,9 +31,9 @@ $popularity = $row['Popularity'];
$msg = __('unknown');
# Print the timestamps for last updates
-$updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"]));
-$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"]));
+$updated_time = ($row["ModifiedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["ModifiedTS"]));
+$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["SubmittedTS"]));
+$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : date("Y-m-d", intval($row["OutOfDateTS"]));
$pkgs = pkgbase_get_pkgnames($base_id);
@@ -50,7 +50,7 @@ $base_uri = get_pkgbase_uri($row['Name']);
<th><?= __('Git Clone URL') . ': ' ?></th>
<td>
<a href="<?= $git_clone_uri_anon ?>"><?= $git_clone_uri_anon ?></a> (<?= __('read-only') ?>)
- <?php if ($uid == $row["MaintainerUID"]): ?>
+ <?php if (in_array($uid, $maintainers)): ?>
<br /> <a href="<?= $git_clone_uri_priv ?>"><?= $git_clone_uri_priv ?></a>
<?php endif; ?>
</td>
diff --git a/web/template/pkgreq_close_form.php b/web/template/pkgreq_close_form.php
index 59e9c8f4..6077b325 100644
--- a/web/template/pkgreq_close_form.php
+++ b/web/template/pkgreq_close_form.php
@@ -1,5 +1,5 @@
<div class="box">
- <h2><?= __('Close Request') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Close Request') ?>: <?= htmlspecialchars($pkgbase_name) ?></h2>
<p>
<?= __('Use this form to close the request for package base %s%s%s.',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/template/pkgreq_form.php b/web/template/pkgreq_form.php
index 35dbef57..904ab48f 100644
--- a/web/template/pkgreq_form.php
+++ b/web/template/pkgreq_form.php
@@ -1,5 +1,5 @@
<div class="box">
- <h2><?= __('Submit Request') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Submit Request') ?>: <?= htmlspecialchars($pkgbase_name) ?></h2>
<p>
<?= __('Use this form to file a request against package base %s%s%s which includes the following packages:',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php
index b27963be..fb49dfae 100644
--- a/web/template/pkgreq_results.php
+++ b/web/template/pkgreq_results.php
@@ -1,129 +1,135 @@
-<div id="pkglist-results" class="box">
- <div class="pkglist-stats">
- <p>
- <?= _n('%d package request found.', '%d package requests found.', $total) ?>
- <?= __('Page %d of %d.', $current, $pages) ?>
- </p>
- <?php if (count($templ_pages) > 1): ?>
- <p class="pkglist-nav">
- <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
- <?php if ($pagestart === false): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php elseif ($pagestart + 1 == $first): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php else: ?>
- <a class="page" href="<?= get_uri('/requests/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
- <?php endif; ?>
- <?php endforeach; ?>
- </p>
- <?php endif; ?>
- </div>
+<?php if (count($results) == 0): ?>
+<p><?= __("No requests matched your search criteria.") ?></p>
+<?php else: ?>
+<?php if ($show_headers): ?>
+<div class="pkglist-stats">
+ <p>
+ <?= _n('%d package request found.', '%d package requests found.', $total) ?>
+ <?= __('Page %d of %d.', $current, $pages) ?>
+ </p>
+ <?php if (count($templ_pages) > 1): ?>
+ <p class="pkglist-nav">
+ <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
+ <?php if ($pagestart === false): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php elseif ($pagestart + 1 == $first): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php else: ?>
+ <a class="page" href="<?= get_uri('/requests/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </p>
+ <?php endif; ?>
+</div>
+<?php endif; ?>
- <table class="results">
- <thead>
- <tr>
- <th><?= __("Package") ?></th>
- <th><?= __("Type") ?></th>
- <th><?= __("Comments") ?></th>
- <th><?= __("Filed by") ?></th>
- <th><?= __("Date") ?></th>
- <th><?= __("Status") ?></th>
- </tr>
- </thead>
- <tbody>
+<table class="results">
+<thead>
+ <tr>
+ <th><?= __("Package") ?></th>
+ <th><?= __("Type") ?></th>
+ <th><?= __("Comments") ?></th>
+ <th><?= __("Filed by") ?></th>
+ <th><?= __("Date") ?></th>
+ <th><?= __("Status") ?></th>
+ </tr>
+</thead>
+<tbody>
- <?php while (list($indx, $row) = each($results)): ?>
- <?php
- $idle_time = config_get_int('options', 'request_idle_time');
- $due = ($row['Open'] && time() - intval($row['RequestTS']) > $idle_time);
- if (!$due) {
- $time_left = $idle_time - (time() - intval($row['RequestTS']));
- if ($time_left > 48 * 3600) {
- $time_left_fmt = _n("~%d day left", "~%d days left", round($time_left / (24 * 3600)));
- } elseif ($time_left > 3600) {
- $time_left_fmt = _n("~%d hour left", "~%d hours left", round($time_left / 3600));
- } else {
- $time_left_fmt = __("<1 hour left");
- }
+ <?php while (list($indx, $row) = each($results)): ?>
+ <?php
+ $idle_time = config_get_int('options', 'request_idle_time');
+ $due = ($row['Open'] && time() - intval($row['RequestTS']) > $idle_time);
+ if (!$due) {
+ $time_left = $idle_time - (time() - intval($row['RequestTS']));
+ if ($time_left > 48 * 3600) {
+ $time_left_fmt = _n("~%d day left", "~%d days left", round($time_left / (24 * 3600)));
+ } elseif ($time_left > 3600) {
+ $time_left_fmt = _n("~%d hour left", "~%d hours left", round($time_left / 3600));
+ } else {
+ $time_left_fmt = __("<1 hour left");
}
- ?>
- <tr class="<?= ($indx % 2 == 0) ? 'odd' : 'even' ?>">
- <?php if ($row['BaseID']): ?>
- <td><a href="<?= htmlspecialchars(get_pkgbase_uri($row["Name"]), ENT_QUOTES); ?>"><?= htmlspecialchars($row["Name"]) ?></a></td>
- <?php else: ?>
- <td><?= htmlspecialchars($row["Name"]) ?></td>
- <?php endif; ?>
- <?php if ($row['Type'] == 'merge'): ?>
- <td>
- <?= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES); ?>
- <?php if (!empty($row['MergeInto'])): ?>
- (<?= htmlspecialchars($row['MergeInto'], ENT_QUOTES); ?>)
- <?php endif; ?>
- </td>
- <?php else: ?>
- <td><?= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES); ?></td>
+ }
+ ?>
+ <tr class="<?= ($indx % 2 == 0) ? 'odd' : 'even' ?>">
+ <?php if ($row['BaseID']): ?>
+ <td><a href="<?= htmlspecialchars(get_pkgbase_uri($row["Name"]), ENT_QUOTES); ?>"><?= htmlspecialchars($row["Name"]) ?></a></td>
+ <?php else: ?>
+ <td><?= htmlspecialchars($row["Name"]) ?></td>
+ <?php endif; ?>
+ <?php if ($row['Type'] == 'merge'): ?>
+ <td>
+ <?= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES); ?>
+ <?php if (!empty($row['MergeInto'])): ?>
+ (<?= htmlspecialchars($row['MergeInto'], ENT_QUOTES); ?>)
<?php endif; ?>
- <td class="wrap"><?= htmlspecialchars($row['Comments'], ENT_QUOTES); ?></td>
- <td>
- <a href="<?= get_uri('/account/') . htmlspecialchars($row['User'], ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($row['User'])) ?>"><?= htmlspecialchars($row['User']) ?></a>
- </td>
- <td<?php if ($due): ?> class="flagged"<?php endif; ?>><?= gmdate("Y-m-d H:i", intval($row['RequestTS'])) ?></td>
- <?php if ($row['Open']): ?>
- <td>
- <?php if ($row['BaseID']): ?>
- <?php if ($row['Type'] == 'deletion'): ?>
- <a href="<?= get_pkgbase_uri($row['Name']) ?>delete/?via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
- <br/ >
- <?php elseif ($row['Type'] == 'merge'): ?>
- <a href="<?= get_pkgbase_uri($row['Name']) ?>merge/?into=<?= urlencode($row['MergeInto']) ?>&via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
- <br />
- <?php elseif ($row['Type'] == 'orphan' && $due): ?>
- <form action="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method="post">
- <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
- <input type="hidden" name="via" value="<?= intval($row['ID']) ?>" />
- <input type="submit" class="button text-button" name="do_Disown" value="<?= __('Accept') ?>" />
- </form>
- <?php elseif ($row['Type'] == 'orphan' && !$due): ?>
- <?= __('Locked') ?> (<?= $time_left_fmt ?>)
- <br />
- <?php endif; ?>
- <?php endif; ?>
- <a href="<?= get_pkgreq_route() . '/' . intval($row['ID']) ?>/close/"><?= __('Close') ?></a>
- </td>
- <?php else: ?>
- <?php if ($row['Status'] == 1): ?>
- <td><?= __("Closed") ?></td>
- <?php elseif ($row['Status'] == 2): ?>
- <td><?= __("Accepted") ?></td>
- <?php elseif ($row['Status'] == 3): ?>
- <td><?= __("Rejected") ?></td>
- <?php else: ?>
- <td><?= __("unknown") ?></td>
+ </td>
+ <?php else: ?>
+ <td><?= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES); ?></td>
+ <?php endif; ?>
+ <td class="wrap"><?= htmlspecialchars($row['Comments'], ENT_QUOTES); ?></td>
+ <td>
+ <a href="<?= get_uri('/account/') . htmlspecialchars($row['User'], ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($row['User'])) ?>"><?= htmlspecialchars($row['User']) ?></a>
+ </td>
+ <td<?php if ($due): ?> class="flagged"<?php endif; ?>><?= date("Y-m-d H:i", intval($row['RequestTS'])) ?></td>
+ <?php if ($row['Open'] && $show_headers): ?>
+ <td>
+ <?php if ($row['BaseID']): ?>
+ <?php if ($row['Type'] == 'deletion'): ?>
+ <a href="<?= get_pkgbase_uri($row['Name']) ?>delete/?via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
+ <br/ >
+ <?php elseif ($row['Type'] == 'merge'): ?>
+ <a href="<?= get_pkgbase_uri($row['Name']) ?>merge/?into=<?= urlencode($row['MergeInto']) ?>&via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
+ <br />
+ <?php elseif ($row['Type'] == 'orphan' && $due): ?>
+ <form action="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method="post">
+ <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <input type="hidden" name="via" value="<?= intval($row['ID']) ?>" />
+ <input type="submit" class="button text-button" name="do_Disown" value="<?= __('Accept') ?>" />
+ </form>
+ <?php elseif ($row['Type'] == 'orphan' && !$due): ?>
+ <?= __('Locked') ?> (<?= $time_left_fmt ?>)
+ <br />
<?php endif; ?>
<?php endif; ?>
- </tr>
- <?php endwhile; ?>
+ <a href="<?= get_pkgreq_route() . '/' . intval($row['ID']) ?>/close/"><?= __('Close') ?></a>
+ </td>
+ <?php elseif ($row['Open'] && !$show_headers): ?>
+ <td><?= __("Pending") ?></td>
+ <?php elseif ($row['Status'] == 1): ?>
+ <td><?= __("Closed") ?></td>
+ <?php elseif ($row['Status'] == 2): ?>
+ <td><?= __("Accepted") ?></td>
+ <?php elseif ($row['Status'] == 3): ?>
+ <td><?= __("Rejected") ?></td>
+ <?php else: ?>
+ <td><?= __("unknown") ?></td>
+ <?php endif; ?>
+ </tr>
+ <?php endwhile; ?>
- </tbody>
- </table>
+</tbody>
+</table>
- <div class="pkglist-stats">
- <p>
- <?= _n('%d package request found.', '%d package requests found.', $total) ?>
- <?= __('Page %d of %d.', $current, $pages) ?>
- </p>
- <?php if (count($templ_pages) > 1): ?>
- <p class="pkglist-nav">
- <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
- <?php if ($pagestart === false): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php elseif ($pagestart + 1 == $first): ?>
- <span class="page"><?= $pagenr ?></span>
- <?php else: ?>
- <a class="page" href="<?= get_uri('/requests/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
- <?php endif; ?>
- <?php endforeach; ?>
- </p>
- <?php endif; ?>
- </div>
+<?php if ($show_headers): ?>
+<div class="pkglist-stats">
+ <p>
+ <?= _n('%d package request found.', '%d package requests found.', $total) ?>
+ <?= __('Page %d of %d.', $current, $pages) ?>
+ </p>
+ <?php if (count($templ_pages) > 1): ?>
+ <p class="pkglist-nav">
+ <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
+ <?php if ($pagestart === false): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php elseif ($pagestart + 1 == $first): ?>
+ <span class="page"><?= $pagenr ?></span>
+ <?php else: ?>
+ <a class="page" href="<?= get_uri('/requests/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </p>
+ <?php endif; ?>
</div>
+<?php endif; ?>
+<?php endif; ?>
diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php
index 580583b5..b4c6215f 100644
--- a/web/template/stats/updates_table.php
+++ b/web/template/stats/updates_table.php
@@ -10,7 +10,7 @@
<a href="<?= get_pkg_uri($row["Name"]); ?>" title="<?= htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?>"><?= htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
</td>
<td class="pkg-date">
- <span><?= gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span>
+ <span><?= date("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span>
</td>
</tr>
<?php endforeach; ?>
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index 38f6c0d0..d739060d 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -39,10 +39,10 @@ if ($yes > $active_tus / 2) {
<?php endif; ?>
</strong>
<br />
- <?= __("Submitted: %s by %s", gmdate("Y-m-d H:i", $row['Submitted']), html_format_username(username_from_id($row['SubmitterID']))) ?>
+ <?= __("Submitted: %s by %s", date("Y-m-d H:i", $row['Submitted']), html_format_username(username_from_id($row['SubmitterID']))) ?>
<br />
<?= __("End") ?>:
- <strong><?= gmdate("Y-m-d H:i", $row['End']) ?></strong>
+ <strong><?= date("Y-m-d H:i", $row['End']) ?></strong>
<?php if ($isrunning == 0): ?>
<br />
<?= __("Result") ?>:
diff --git a/web/template/tu_list.php b/web/template/tu_list.php
index b3e1073a..b7253f98 100644
--- a/web/template/tu_list.php
+++ b/web/template/tu_list.php
@@ -38,8 +38,8 @@
<td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
<a href="<?= get_uri('/tu/'); ?>?id=<?= $row['ID'] ?>"><?= $row["Agenda"] ?></a>
</td>
- <td><?= gmdate("Y-m-d", $row["Submitted"]) ?></td>
- <td><?= gmdate("Y-m-d", $row["End"]) ?></td>
+ <td><?= date("Y-m-d", $row["Submitted"]) ?></td>
+ <td><?= date("Y-m-d", $row["End"]) ?></td>
<td>
<?php if (!empty($row['User'])): ?>
<a href="<?= get_uri('/packages/'); ?>?K=<?= $row['User'] ?>&amp;SeB=m"><?= $row['User'] ?></a>