-
Notifications
You must be signed in to change notification settings - Fork 2
/
tpl.issues.php
40 lines (31 loc) · 1.76 KB
/
tpl.issues.php
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
<?php
echo '<div class="menu">';
echo ' <h2 class="pre-menu">Showing ' . ($page * $perPage + 1) . ' - ' . ($page * $perPage + count($issues->issues)) . ' of ' . $issues->total . '</h2>';
echo ' (<a href="new.php">create</a>)';
echo '</div>';
echo '<hr>';
foreach ( $issues->issues AS $issue ) {
$fields = $issue->fields;
$status = $fields->resolution ? $fields->resolution->name : $fields->status->name;
$storypoints = $issue->story_points ? ' (' . $issue->story_points . ' pt)' : '';
echo '<h2><a href="issue.php?key=' . $issue->key . '">' . $issue->key . ' ' . html(trim($fields->summary)) . '</a>' . $storypoints . '</h2>';
echo '<p class="short-meta">';
echo ' <span class="left">' . html_icon($fields->issuetype, 'issuetype') . ' ' . html($fields->issuetype->name) . '</span>';
echo ' <span class="center">' . ( @$fields->priority ? html_icon($fields->priority, 'priority') . ' ' . html($fields->priority->name) : ' ' ) . '</span>';
echo ' <span class="right"><strong>' . html_icon($fields->status) . ' ' . html($status) . '</strong></span>';
echo '</p>';
if ( $fields->labels ) {
echo '<p class="labels">Labels: ' . html_labels($fields->labels) . '</p>';
}
echo '<p class="dates">';
echo ' <span class="left">' . date(FORMAT_DATETIME, $issue->created) . '</span>';
echo ' <span class="right">' . date(FORMAT_DATETIME, $issue->updated) . '</span>';
echo '</p>';
echo '<hr />';
}
?>
<p id="pager">
<a class="<?= $page <= 0 ? 'disabled' : '' ?>" href="<?= html_q(array('page' => $page == 1 ? false : $page-1)) ?>">< prev</a> |
<span><?= $page+1 ?> / <?= ceil($issues->total/$perPage) ?> (<?= $issues->total ?>)</span> |
<a class="<?= $page+1 >= ceil($issues->total/$perPage) ? 'disabled' : '' ?>" href="<?= html_q(array('page' => $page+1)) ?>">next ></a>
</p>