1 <?php
if (count($results) == 0): ?
>
2 <p
><?
= __("No requests matched your search criteria.") ?
></p
>
4 <?php
if ($show_headers): ?
>
5 <div
class="pkglist-stats">
7 <?
= _n('%d package request found.', '%d package requests found.', $total) ?
>
8 <?
= __('Page %d of %d.', $current, $pages) ?
>
10 <?php
if (count($templ_pages) > 1): ?
>
11 <p
class="pkglist-nav">
12 <?php
foreach ($templ_pages as $pagenr => $pagestart): ?
>
13 <?php
if ($pagestart === false): ?
>
14 <span
class="page"><?
= $pagenr ?
></span
>
15 <?php
elseif ($pagestart +
1 == $first): ?
>
16 <span
class="page"><?
= $pagenr ?
></span
>
18 <a
class="page" href
="<?= get_uri('/requests/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?
= $pagenr ?
></a
>
26 <table
class="results">
29 <th
><?
= __("Package") ?
></th
>
30 <th
><?
= __("Type") ?
></th
>
31 <th
><?
= __("Comments") ?
></th
>
32 <th
><?
= __("Filed by") ?
></th
>
33 <th
><?
= __("Date") ?
></th
>
34 <th
><?
= __("Status") ?
></th
>
39 <?php
foreach ($results as $indx => $row): ?
>
41 $idle_time = config_get_int('options', 'request_idle_time');
42 $due = ($row['Open'] && time() - intval($row['RequestTS']) > $idle_time);
44 $time_left = $idle_time - (time() - intval($row['RequestTS']));
45 if ($time_left > 48 * 3600) {
46 $time_left_fmt = _n("~%d day left", "~%d days left", round($time_left / (24 * 3600)));
47 } elseif ($time_left > 3600) {
48 $time_left_fmt = _n("~%d hour left", "~%d hours left", round($time_left / 3600));
50 $time_left_fmt = __("<1 hour left");
54 <tr
class="<?= ($indx % 2 == 0) ? 'odd' : 'even' ?>">
55 <?php
if ($row['BaseID']): ?
>
56 <td
><a href
="<?= htmlspecialchars(get_pkgbase_uri($row["Name
"]), ENT_QUOTES); ?>"><?
= htmlspecialchars($row["Name"]) ?
></a
></td
>
58 <td
><?
= htmlspecialchars($row["Name"]) ?
></td
>
60 <?php
if ($row['Type'] == 'merge'): ?
>
62 <?
= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES
); ?
>
63 <?php
if (!empty($row['MergeInto'])): ?
>
64 (<?
= htmlspecialchars($row['MergeInto'], ENT_QUOTES
); ?
>)
68 <td
><?
= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES
); ?
></td
>
70 <td
class="wrap"><?
= htmlspecialchars($row['Comments'], ENT_QUOTES
); ?
></td
>
72 <a href
="<?= get_uri('/account/') . htmlspecialchars($row['User'], ENT_QUOTES) ?>" title
="<?= __('View account information for %s', htmlspecialchars($row['User'])) ?>"><?
= htmlspecialchars($row['User']) ?
></a
>
74 <td
<?php
if ($due): ?
> class="flagged"<?php
endif; ?
>><?
= date("Y-m-d H:i", intval($row['RequestTS'])) ?
></td
>
75 <?php
if ($row['Open'] && $show_headers): ?
>
77 <?php
if ($row['BaseID']): ?
>
78 <?php
if ($row['Type'] == 'deletion'): ?
>
79 <a href
="<?= get_pkgbase_uri($row['Name']) ?>delete/?via=<?= intval($row['ID']) ?>"><?
= __('Accept') ?
></a
>
80 <?php
elseif ($row['Type'] == 'merge'): ?
>
81 <a href
="<?= get_pkgbase_uri($row['Name']) ?>merge/?into=<?= urlencode($row['MergeInto']) ?>&via=<?= intval($row['ID']) ?>"><?
= __('Accept') ?
></a
>
82 <?php
elseif ($row['Type'] == 'orphan' && $due): ?
>
83 <a href
="<?= get_pkgbase_uri($row['Name']) ?>disown/?via=<?= intval($row['ID']) ?>"><?
= __('Accept') ?
></a
>
84 <?php
elseif ($row['Type'] == 'orphan' && !$due): ?
>
85 <?
= __('Locked') ?
> (<?
= $time_left_fmt ?
>)
89 <a href
="<?= get_pkgreq_route() . '/' . intval($row['ID']) ?>/close/"><?
= __('Close') ?
></a
>
91 <?php
elseif ($row['Open'] && !$show_headers): ?
>
92 <td
><?
= __("Pending") ?
></td
>
93 <?php
elseif ($row['Status'] == 1): ?
>
94 <td
><?
= __("Closed") ?
></td
>
95 <?php
elseif ($row['Status'] == 2): ?
>
96 <td
><?
= __("Accepted") ?
></td
>
97 <?php
elseif ($row['Status'] == 3): ?
>
98 <td
><?
= __("Rejected") ?
></td
>
100 <td
><?
= __("unknown") ?
></td
>
108 <?php
if ($show_headers): ?
>
109 <div
class="pkglist-stats">
111 <?
= _n('%d package request found.', '%d package requests found.', $total) ?
>
112 <?
= __('Page %d of %d.', $current, $pages) ?
>
114 <?php
if (count($templ_pages) > 1): ?
>
115 <p
class="pkglist-nav">
116 <?php
foreach ($templ_pages as $pagenr => $pagestart): ?
>
117 <?php
if ($pagestart === false): ?
>
118 <span
class="page"><?
= $pagenr ?
></span
>
119 <?php
elseif ($pagestart +
1 == $first): ?
>
120 <span
class="page"><?
= $pagenr ?
></span
>
122 <a
class="page" href
="<?= get_uri('/requests/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?
= $pagenr ?
></a
>