/
list.tpl.html
228 lines (224 loc) · 11.5 KB
/
list.tpl.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
{extends "base_full.tpl.html"}
{block page_classes}list_issues{/block}
{function name="sort_link" field="" link="" title=""}
<a title="{$title}" href="{$sorting.links.$field}" class="white_link">{$link|escape:"html"}</a>
{if $sorting.order.$field|default:''}
{if $sorting.order.$field == "desc"}
{assign var="icon" value="fa-arrow-down"}
{else}
{assign var="icon" value="fa-arrow-up"}
{/if}
<a title="{$title}" href="{$sorting.links.$field}">
<i class="fa {$icon}" aria-hidden="true"></i>
</a>
{/if}
{/function}
{block "content"}
{if $core.current_role != $core.roles.customer}
{include file="quick_filter_form.tpl.html"}
{/if}
{include file="current_filters.tpl.html"}
{* Figure out how many columns there are *}
{assign var="col_count" value=$columns|@count}
{if $list_info.custom_fields|@count > 1}
{math assign="col_count" equation="x+y-1" x=$col_count y=$list_info.custom_fields|@count}
{/if}
{if $core.current_role > $core.roles.developer}
{math assign="col_count" equation="x+1" x=$col_count}
{/if}
<form id="list_form" method="post"
data-current-page="{$list_info.current_page|default:0}"
data-last-page="{$list_info.last_page|default:0}" data-refresh-rate="{$refresh_rate}">
<input type="hidden" name="cat" value="bulk_update">
<table class="bordered grid">
<tr class="title">
<th colspan="{$col_count}">
{* TRANSLATORS: %1: total rows, 2: range start, 3: range end *}
{if $list_info.end_offset > 0}
{t 1=$list_info.total_rows 2=$list_info.start_offset+1 3=$list_info.end_offset}Search Results (%1 issues found, %2 - %3 shown){/t}
{else}
{* TRANSLATORS: %1: total rows *}
{t 1=$list_info.total_rows}Search Results (%1 issues found){/t}
{/if}
{include file="help_link.tpl.html" topic="list"}
{if $core.current_role != $core.roles.customer}
<span class="menu">
{t}hide/show{/t}:
[ <span class="js_link" title="{t}hide / show the quick search form{/t}" id="toggle_quick_filter">{t}quick search{/t}</span> ]
{if $core.current_role > $core.roles.reporter}[ <span class="js_link" id="toggle_current_filters"> {t}current filters{/t}</span> ]{/if}
{if $core.current_role > $core.roles.developer}[ <span class="js_link" id="toggle_bulk_update"> {t}bulk update tool{/t}</span> ]{/if}
</span>
{/if}
</th>
</tr>
<tr>
{if $core.current_role > $core.roles.developer}
<th width="1%">
<input type="button" value="{t}All{/t}" class="select_all">
</th>
{/if}
{foreach from=$columns item=column key=field_name}
{if $field_name == 'custom_fields'}
{foreach from=$list_info.custom_fields key=fld_id item=fld_title}
{assign var="fld_name_id" value="custom_field_`$fld_id`"}
<th align="{$column.align|default:'center'}" nowrap class="cstm_{$fld_id}">
{sort_link field=$fld_name_id link=$fld_title title="{t 1=$fld_title}sort by %1{/t}"}
</th>
{/foreach}
{else}
<th align="{$column.align|default:'center'}" nowrap {if $column.width != ''}width="{$column.width}"{/if}
class="{$field_name}">
{if $field_name == 'iss_summary'}
{sort_link field="iss_summary" link="{t}Summary{/t}" title="{t}sort by summary{/t}"}
<span id="export_csv" class="right">{t}Export Data:{/t}
<i class="fa fa-file-excel-o" aria-hidden="true"></i>
</span>
{elseif $sorting.links[$field_name]|default:'' != ''}
{sort_link field=$field_name link=$column.title title="{t 1=$column.title}sort by %1{/t}"}
{else}
{$column.title|default:''}
{/if}
</th>
{/if}
{/foreach}
</tr>
{section name="i" loop=$list}
<tr {if $core.current_role >= $core.roles.developer AND $list[i].iqu_status > 0}style="text-decoration: line-through;"{/if} data-issue-id="{$list[i].iss_id}">
{if $core.current_role > $core.roles.developer}
<td style="background: {$list[i].status_color}" width="1%" align="center"><input type="checkbox" name="item[]" value="{$list[i].iss_id}"></td>
{/if}
{foreach from=$columns item=column key=field_name}
{if $field_name == 'custom_fields'}
{foreach from=$list[i].custom_field key=fld_id item=cf}
<td style="background: {$list[i].status_color}" align="{$column.align|default:'center'}" class="custom_field cstm_{$fld_id}">
{$cf.formatted_value}
</td>
{/foreach}
{else}
<td style="background: {$list[i].status_color}" align="{$column.align|default:'center'}" class="{$field_name}">
{if $field_name == 'iss_id'}
<a href="view.php?id={$list[i].iss_id}" title="{t}view issue details{/t}">{$list[i].iss_id}</a>
{elseif $field_name == 'pri_rank'}
{if $list[i].pri_icon > 0}<span class="priority_icon priority-icon-{$list[i].pri_icon}"></span> {/if}{$list[i].pri_title|escape:"html"}
{elseif $field_name == 'sev_rank'}
{$list[i].sev_title|escape:"html"}
{elseif $field_name == 'grp_name'}
{$list[i].grp_name|escape:"html"}
{elseif $field_name == 'assigned'}
{$list[i].assigned_users|escape:"html"}
{elseif $field_name == 'time_spent'}
{$list[i].time_spent}
{elseif $field_name == 'prc_title'}
{$list[i].prc_title|escape:"html"}
{elseif $field_name == 'pre_title'}
{$list[i].pre_title|escape:"html"}
{elseif $field_name == 'iss_customer_id'}
<a href="list.php?view=customer&customer_id={$list[i].iss_customer_id}"
title="View other issues from this customer">
{$list[i].customer_title|default:''|escape:"html"}</a>
{elseif $field_name == 'support_level'}
{$list[i].support_level|escape:"html"|default:''}
{elseif $field_name == 'sta_rank'}
{$list[i].sta_title|escape:"html"}
{elseif $field_name == 'iss_created_date'}
{$list[i].iss_created_date|timeago}
{elseif $field_name == 'iss_status_change_date'}
{$list[i].iss_status_change_date|timeago}
{elseif $field_name == 'iss_dev_time'}
{$list[i].iss_dev_time|escape:"html"}
{elseif $field_name == 'status_action_date'}
{$list[i].status_action_date|escape:"html"}
{elseif $field_name == 'last_action_date'}
{* TRANSLATORS: %1: last action data label, %2: last action date diff *}
{t 1=$list[i].last_action_date_label 2=$list[i].last_action_date_diff}%1:
%2 ago{/t}
{elseif $field_name == 'usr_full_name'}
<a href="list.php?view=reporter&reporter_id={$list[i].iss_usr_id}"
title="View other issues from this reporter">
{$list[i].usr_full_name|escape:"html"}</a>
{elseif $field_name == 'iss_percent_complete'}
<div class="iss_percent_complete ui-progressbar" data-percent="{$list[i].iss_percent_complete}"><div class="progress-label"> {$list[i].iss_percent_complete|escape:"html"} %</div></div>
{elseif $field_name == 'iss_expected_resolution_date'}
{if $list[i].iss_expected_resolution_date != 0}
<div class="inline_date_pick" id="expected_resolution_date|{$list[i].iss_id}">{$list[i].iss_expected_resolution_date|escape:"html"} </div>
{/if}
{elseif $field_name == 'iss_summary'}
<a href="view.php?id={$list[i].iss_id}" title="{t}view issue details{/t}">{$list[i].iss_summary|escape:"html"}</a>
{if $list[i].redeemed|default:0}
[{t}Redeemed{/t}]
{/if}
{if $list[i].iss_access_level != 'normal'}
<b>[{t}{$list[i].access_level_name}{/t}]</b>
{/if}
{/if}
</td>
{/if}
{/foreach}
</tr>
{if $list[i].excerpts != ''}
<tr>
<td colspan="{$col_count}" style="background: {$list[i].status_color}">
{if $list[i].excerpts|@count > 0}
{include file="list_excerpts.tpl.html"}
{/if}
</td>
</tr>
{/if}
{sectionelse}
<tr class="no_results">
<td colspan="{$col_count}">
{t}No issues could be found.{/t}
</td>
</tr>
{/section}
<tr class="buttons">
<td colspan="{$col_count}">
<table width="100%">
<tr>
<td width="30%" nowrap>
{if $core.current_role > $core.roles.developer}
<input type="button" value="{t}All{/t}" class="select_all">
{/if}
</td>
<td width="40%" align="center" nowrap>
<nobr>
<input name="first" type="button" value="|<">
<input name="previous" type="button" value="<<"">
<input type="text" name="page" size="3" maxlength="3" value="{if $list_info.current_page == ''}1{else}{math equation="x + 1" x=$list_info.current_page}{/if}" class="paging_input">
<input name="go" type="button" value="{t}Go{/t}">
<input name="next" type="button" value=">>">
<input name="last" type="button" value=">|">
</nobr>
</td>
<td nowrap>
<span>{t}Rows per Page{/t}:</span>
<select name="page_size" id="page_size">
<option value="5" {if $options.rows == 5}selected{/if}>5</option>
<option value="10" {if $options.rows == 10}selected{/if}>10</option>
<option value="25" {if $options.rows == 25}selected{/if}>25</option>
<option value="50" {if $options.rows == 50}selected{/if}>50</option>
<option value="100" {if $options.rows == 100}selected{/if}>100</option>
<option value="ALL" {if $options.rows == "ALL"}selected{/if}>{t}ALL{/t}</option>
</select>
<input type="button" value="{t}Set{/t}" id="resize_page">
</td>
<td width="30%" align="right">
<input type="checkbox" id="hide_closed" name="hide_closed" {if $options.hide_closed}checked{/if}> <label for="hide_closed">{t}Hide Closed Issues{/t}</label>
{if $core.current_role >= $core.roles.developer}
<input type="checkbox" id="show_all_projects" name="show_all_projects"
{if $options.show_all_projects}checked{/if}><label for="show_all_projects">{t}Show all projects{/t}</label>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
{if $core.current_role > $core.roles.developer}
{include file="bulk_update.tpl.html"}
{/if}
</form>
<form target="_csvWindow" method="post" action="csv.php" name="csv_form" id="csv_form">
<input type="hidden" name="csv_data" value="{$csv_data}">
</form>
{/block}