-
Notifications
You must be signed in to change notification settings - Fork 156
/
jreport_list.html
192 lines (171 loc) · 5.87 KB
/
jreport_list.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
{# Copyright (C) 2009-2014 Edgewall Software
This software is licensed as described in the file COPYING, which
you should have received as part of this distribution. The terms
are also available at http://trac.edgewall.com/license.html.
This software consists of voluntary contributions made by many
individuals. For the exact contribution history, see the revision
history and logs, available at http://trac.edgewall.org/.
#}
# extends "jlayout.html"
<!DOCTYPE html>
<html>
<head>
<title>
# block title
${_("Available Reports")}
${ super() }
# endblock title
</title>
# block head
${ super() }
<script type="text/javascript"
src="${chrome.htdocs_location}js/folding.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("span.foldable").enableFolding(true);
$("#trac-toggle-description").click(function() {
if ($(this).checked())
$("div.description").parent().removeClass("collapsed");
else
$("div.description").parent().addClass("collapsed");
});
});
</script>
# endblock head
</head>
<body>
# block content
<div id="content" class="report">
<h1>${_("Available Reports")}</h1>
<form id="prefs" method="get" action="">
<div>
<input id="trac-toggle-description" type="checkbox"/>
<label for="trac-toggle-description">${_("Show Descriptions")}</label>
</div>
</form>
<div id="description"></div>
<div class="reports">
# if saved_query_href:
<div>
<form method="get" action="${href.report()}">
<div class="inlinebuttons">
<input type="hidden" name="action" value="clear"/>
<input type="submit" value="${captioned_button('x', _('Clear'))}"
title="${_("Forget last query")}" class="trac-delete"/>
</div>
</form>
<h3>
<a href="${saved_query_href}">
<em>${_("Return to Last Query")}</em>
</a>
</h3>
<span class="foldable"></span>
<div class="description">
<p>
# trans
Continue browsing through the current list of results,
from the last selected report or custom query.
# endtrans
</p>
</div>
</div>
# endif
# if query_href:
<div>
<h3><a href="${query_href}"><em>${_("New Custom Query")}</em></a></h3>
<span class="foldable"></span>
<div class="description">
<p>
# trans
Compose a new ticket query by selecting filters and
columns to display.
# endtrans
</p>
</div>
</div>
# endif
# if reports:
<h2>${_("SQL reports and saved custom queries")}
# with
# set report_asc = asc if sort == 'report' else none
# set title_asc = asc if sort == 'title' else none
# set a_identifier
<a${{'class': ('desc', 'asc')[report_asc] if report_asc is not none,
'href': href.report(sort='report',
asc='0' if report_asc else '1')
}|htmlattr}>${_("Identifier")}</a>
# endset
# set a_title
<a${{'class': ('desc', 'asc')[title_asc] if title_asc is not none,
'href': href.report(sort='title', asc='0' if title_asc else '1')
}|htmlattr}>${_("Title")}</a>
# endset
<span id="trac-sort-order">
# trans a_identifier = a_identifier, a_title = a_title
Sort by: ${a_identifier} ${a_title}
# endtrans
</span>
# endwith
</h2>
# for id, title, description, can_edit, can_delete in reports:
<div>
# if can_delete:
<form method="get" action="${href.report(id)}">
<div class="inlinebuttons">
<input type="hidden" name="action" value="delete"/>
<input type="submit" value="${captioned_button('–', _('Delete'))}"
title="${_("Delete report")}" class="trac-delete"/>
</div>
</form>
# endif
# if can_edit:
<form method="get" action="${href.report(id)}">
<div class="inlinebuttons">
<input type="hidden" name="action" value="edit"/>
<input type="submit" value="${captioned_button('✎', _('Edit'))}"
title="${_("Edit report")}"/>
</div>
</form>
# endif
<h3>
<a title="${_("View report")}" href="${href.report(id)}">
# if sort == 'title':
${title} <em>{${id}}</em>
# else:
<em>{${id}}</em> ${title}
# endif
</a>
</h3>
<span class="foldable"></span>
# if description:
<div class="description">
${wiki_to_html(context.child('report', id), description)}
</div>
# endif
</div>
# endfor
# else:
<p>${_("No reports available.")}</p>
# endif
</div>
# if 'REPORT_CREATE' in perm('report'):
<div class="buttons">
<form action="" method="get" id="create_report">
<div>
<input type="hidden" name="action" value="new"/>
<input type="submit" value="${_('Create new report')}"/>
</div>
</form>
</div>
# endif
<div id="help">
# trans href = href.wiki('TracReports')
<strong>Note:</strong> See <a href="${href}">TracReports</a>
for help on using and creating reports.
# endtrans
</div>
</div>
${ super() }
# endblock
</body>
</html>