summaryrefslogtreecommitdiffstats
path: root/web/template/pkgreq_results.php
blob: 213f18081fb15a93562f6d1e53f2dda03036b3f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<div id="pkglist-results" class="box">
	<div class="pkglist-stats">
		<p><?= __('%d package requests found. Page %d of %d.', $total, $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>

	<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)): ?>
		<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; ?>
			<td><?= htmlspecialchars(ucfirst($row['Type']), ENT_QUOTES); ?></td>
			<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 (time() - intval($row['RequestTS']) > $REQUEST_IDLE_TIME): ?> class="flagged"<?php endif; ?>><?= gmdate("Y-m-d H:i", intval($row['RequestTS'])) ?></td>
			<?php if ($row['Status'] == 0): ?>
			<td>
				<form action="<?= get_uri('/pkgbase/'); ?>" method="post">
					<fieldset>
						<input type="hidden" name="IDs[<?= $row['BaseID'] ?>]" value="1" />
						<input type="hidden" name="ID" value="<?= $row['BaseID'] ?>" />
						<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
						<input type="hidden" name="reqid" value="<?= $row['ID'] ?>" />
						<div>
							<input type="submit" class="button text-button" name="do_CloseRequest" value="<?= __("Close") ?>" />
						</div>
					</fieldset>
				</form>
			</td>
			<?php else: ?>
			<td><?= __("Closed") ?></td>
			<?php endif; ?>
		</tr>
		<?php endwhile; ?>

	</tbody>
	</table>

	<div class="pkglist-stats">
		<p><?= __('%d package requests found. Page %d of %d.', $total, $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>
</div>