Skip to content

Commit e8bbf6b

Browse files
committed
Add more jinja2 templates
1 parent 20e426a commit e8bbf6b

File tree

11 files changed

+475
-148
lines changed

11 files changed

+475
-148
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<h4>Files</h4>
2+
<table class='table'>
3+
<tr>
4+
<th i18n:translate="">File name</th>
5+
<th i18n:translate="">Uploaded</th>
6+
<th i18n:translate="">Type</th>
7+
<th i18n:translate="">Edit</th>
8+
<th i18n:translate="">Remove</th>
9+
</tr>
10+
{% for file in context.files %}
11+
<tr>
12+
<td>
13+
<a href='{{ file.download_url() }}'>{{ file.name }}</a>
14+
</td>
15+
<td>{{ file.creator }}, {{ file.creation }}</td>
16+
<td>{{ file.type }}</td>
17+
{% if file.is_edit_ok %}
18+
<td>
19+
<a href='file{{ file.id }}'>edit</a>
20+
</td>
21+
{% endif %}
22+
{% if context.is_edit_ok %}
23+
<td>
24+
<form method="POST" action='issue{{ context.id }}'>
25+
<input type="hidden" name="@remove@files" value='file.id'>
26+
<input type="hidden" name="@action" value="edit">
27+
<input type="submit" value="remove" i18n:attributes="value">
28+
</form>
29+
</td>
30+
{% endif %}
31+
</tr>
32+
{% endfor %}
33+
</table>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{% extends 'layout/page.html' %}
2+
3+
{% block content %}
4+
<div class='page-header'>
5+
<h1>File display</h1>
6+
</div>
7+
8+
{% include 'layout/permission.html' %}
9+
10+
{% if context.is_view_ok() %}
11+
<form method="POST"
12+
enctype="multipart/form-data" action='{{ context.designator() }}'>
13+
14+
<dl class='dl-horizontal'>
15+
<dt>Name</dt>
16+
<dd>{{ context.name.field() }}</dd>
17+
<dt>Content Type</dt>
18+
<dd>{{ context.type.field() }}</dd>
19+
</dl>
20+
21+
<input type="hidden" name="@template" value="item">
22+
<input type="hidden" name="@required" value="name,type">
23+
{% if request.form.has_key('@multilink') %}
24+
<input type="hidden" name="@multilink"
25+
value='[email protected]()'>
26+
{% endif %}
27+
<div class='form-actions'>
28+
{{ context.submit() }}
29+
</div>
30+
</form>
31+
{% endif %}
32+
33+
{% if context.id and context.is_view_ok() %}
34+
<div class='row-fluid'>
35+
<a href='file{{ context.id }}/{{ context.name }}'>Download</a>
36+
</div>
37+
{% endif %}
38+
39+
<div class='vspace-five'></div>
40+
{{ context.history() }}
41+
42+
{% endblock %}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{% extends 'layout/page.html' %}
2+
3+
{% block content %}
4+
<div class='page-header'>
5+
<h1>List of classes</h1>
6+
</div>
7+
8+
<div class='row-fluid'>
9+
{% for cl in db.classes() %}
10+
<div class='span4'>
11+
<h4>
12+
<a href='{{cl.classname}}'>{{ cl.classname.capitalize() }}</a>
13+
</h4>
14+
15+
{% for prop in cl.properties() %}
16+
<p>
17+
<b>{{ prop._name }}</b> -&nbsp;
18+
{{ prop._prop }}
19+
</p>
20+
{% endfor %}
21+
</div>
22+
{% endfor %}
23+
</div>
24+
25+
{% endblock %}

share/roundup/templates/jinja2/html/issue.index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,21 @@ <h1>List of issues</h1>
99

1010
{% if context.is_view_ok %}
1111
<table class='table'>
12-
<tr>
13-
<th i18n:translate="">Priority</th>
14-
<th i18n:translate="">ID</th>
15-
<th i18n:translate="">Creation</th>
16-
<th i18n:translate="">Activity</th>
17-
<th i18n:translate="">Actor</th>
18-
<th i18n:translate="">Keyword</th>
19-
<th i18n:translate="">Title</th>
20-
<th i18n:translate="">Status</th>
21-
<th i18n:translate="">Creator</th>
22-
<th i18n:translate="">Assigned&nbsp;To</th>
12+
<tr class='info'>
13+
<td>Priority</td>
14+
<td>ID</td>
15+
<td>Activity</td>
16+
<td>Actor</td>
17+
<td>Keyword</td>
18+
<td>Title</td>
19+
<td>Status</td>
20+
<td>Creator</td>
21+
<td>Assigned&nbsp;To</td>
2322
</tr>
2423
{% for issue in context.list() %}
2524
<tr>
2625
<td>{{ issue.priority.plain() }}</td>
2726
<td>{{ issue.id }}</td>
28-
<td>{{ issue.creation }}</td>
2927
<td>{{ issue.activity }}</td>
3028
<td>{{ issue.actor }}</td>
3129
<td>{{ issue.keyword.plain() }}</td>
@@ -45,7 +43,9 @@ <h1>List of issues</h1>
4543
{% include 'layout/pagination.html' %}
4644

4745
<div class='row-fluid'>
48-
<a href="{{ request.indexargs_url('issue', {'@action':'export_csv'}) }}">Download as CSV</a>
46+
<div class='pull-right'>
47+
<a class='btn btn-success' href="{{ request.indexargs_url('issue', {'@action':'export_csv'}) }}">Download as CSV</a>
48+
</div>
4949
</div>
5050

5151
{% include 'layout/sort.html' %}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<form method="POST"
2+
{% if context.id %}
3+
action='issue{{ context.id }}'
4+
{% else %}
5+
action='issue'
6+
{% endif %}
7+
name="itemSynopsis"
8+
enctype="multipart/form-data"
9+
>
10+
<fieldset>
11+
<div class='container-fluid form-horizontal'>
12+
<!-- title -->
13+
<div class='row-fluid'>
14+
<div class='control-group'>
15+
<label class='control-label' for='title'>Title</label>
16+
<div class='controls'>
17+
<input name='title' id='title' type='text' class='input-xxlarge' value='{{ context.title }}' required>
18+
</div>
19+
</div>
20+
</div> <!-- row-fluid -->
21+
22+
<!-- priority & Status -->
23+
<div class='row-fluid'>
24+
<div class='control-group span6'>
25+
<label class='control-label' for='priority'>Priority</label>
26+
<div class='controls'>
27+
{{ context.priority.menu() }}
28+
</div>
29+
</div>
30+
<div class='control-group span6'>
31+
<label class='control-label' for='status'>Status</label>
32+
<div class='controls'>
33+
{{ context.status.menu() }}
34+
</div>
35+
</div>
36+
</div> <!-- row-fluid -->
37+
38+
<!-- Superseder & nosy list -->
39+
<div class='row-fluid'>
40+
<div class='control-group span6'>
41+
<label class='control-label' for='superseder'>Superseder</label>
42+
<div class='controls'>
43+
<input type='text' name='superseder'>
44+
</div>
45+
</div>
46+
<div class='control-group span6'>
47+
<label class='control-label' for='nosylist'>Nosy list</label>
48+
<div class='controls'>
49+
<input type='text' name='nosy'>
50+
</div>
51+
</div>
52+
</div> <!-- row-fluid -->
53+
54+
<!-- Assigned to & keywords -->
55+
<div class='row-fluid'>
56+
<div class='control-group span6'>
57+
<label class='control-label' for='assignedto'>Assigned to</label>
58+
<div class='controls'>
59+
{{ context.assignedto.menu() }}
60+
</div>
61+
</div>
62+
<div class='control-group span6'>
63+
<label class='control-label' for='keywords'>Keywords</label>
64+
<div class='controls'>
65+
<input type='text' name='keywords' id='keywords'>
66+
</div>
67+
</div>
68+
</div> <!-- row-fluid -->
69+
70+
<!-- Note -->
71+
<div class='row-fluid'>
72+
<div class='control-group'>
73+
<label class='control-label' for='change_note'>Change note</label>
74+
<div class='controls'>
75+
<textarea name="@note" rows="5" class='input-xxlarge' id='change_note'></textarea>
76+
</div>
77+
</div>
78+
</div> <!-- row-fluid -->
79+
80+
<!-- File upload -->
81+
<div class='row-fluid'>
82+
<div class='control-group'>
83+
<label class='control-label' for='file_upload'>File</label>
84+
<div class='controls'>
85+
<input type="file" name="@file" id='file_upload'>
86+
</div>
87+
</div>
88+
</div> <!-- row-fluid -->
89+
</fieldset>
90+
<div class='form-actions'>
91+
{{ context.submit() }}
92+
{% if context.id %}
93+
<a href='{{ context.copy_url }}'>Make a copy</a>
94+
{% endif %}
95+
</div>
96+
<input type="hidden" name="@template" value="item">
97+
<input type="hidden" name="@required" value="title,priority">
98+
</form>

0 commit comments

Comments
 (0)