forked from edgewall/trac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jreport_edit.html
126 lines (116 loc) · 4.01 KB
/
jreport_edit.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
{# Copyright (C) 2006-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
# set is_query = report.sql.startswith('query:')
# set new_report = action == 'new' and not is_query
# if new_report:
${_("Create New Report")}
# else:
${_("Edit Report {%(id)s} %(title)s", id=report.id, title=report.title)}
# endif
${ super() }
# endblock title
</title>
</head>
<body>
# block content
# set is_query = report.sql.startswith('query:')
# set new_report = action == 'new' and not is_query
# set new_query = action == 'new' and is_query
<div id="content" class="report edit">
<h1>
# if new_report:
${_("New Report")}
# elif new_query:
${_("New Query")}
# else:
${report.title}
# endif
</h1>
<form id="edit_report" method="post" action="${href.report(report.id)}">
<fieldset>
<legend>
# if new_report:
${_("Create Report:")}
# elif new_query:
${_("Create Query:")}
# elif is_query:
${_("Modify Query:")}
# else:
${_("Modify Report:")}
# endif
</legend>
${jmacros.form_token_input()}
<input type="hidden" name="action" value="${action}"/>
<div class="field">
<label for="title">${_("Title:")}</label>
<input type="text" id="title" name="title"
class="trac-fullwidth trac-autofocus"
value="${report.title}"/>
</div>
<div class="field">
<label for="description">
# set wiki_formatting
<a tabindex="42" href="${href.wiki('WikiFormatting')}">
WikiFormatting</a>
# endset
# trans wiki_formatting = wiki_formatting
Description: (you may use ${wiki_formatting} here)
# endtrans
</label>
<textarea id="description" name="description" rows="10" cols="78"
class="wikitext trac-fullwidth trac-resizable">
${report.description}</textarea>
</div>
<div class="field">
# if error:
<div class="system-message">
<strong>${_("Error:")}</strong> ${error}
</div>
# endif
<label for="query">
# set trac_query
<a tabindex="42" href="${href.wiki('TracQuery')
+ '#QueryLanguage'}">TracQuery</a>
# endset
# trans trac_query = trac_query
Query: (can be either SQL or, if starting
with <code>query:</code>, a ${trac_query} expression)
# endtrans
</label>
<textarea id="query" name="query" rows="20" cols="78"
class="trac-fullwidth trac-resizable">
${report.sql}</textarea>
</div>
</fieldset>
<div class="buttons">
<input type="submit" class="trac-disable-on-submit"
value="${_('Save query') if is_query else _('Save report')}"/>
<input type="submit" name="cancel" value="${_('Cancel')}"/>
</div>
</form>
<div id="help">
# set trac_reports
<a href="${href.wiki('TracReports')}">TracReports</a>
# endset
# trans trac_reports = trac_reports
<strong>Note:</strong> See ${trac_reports} for help on using
and creating reports.
# endtrans
</div>
</div>
${ super() }
# endblock content
</body>
</html>