Skip to content

Commit f17d231

Browse files
committed
- Copy layout to the html directory
- Add some icons to the nav - Attempt to fix pagination - Tidy issue template
1 parent 86457e3 commit f17d231

File tree

5 files changed

+81
-60
lines changed

5 files changed

+81
-60
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def main():
8686
templates = [t['path']
8787
for t in listTemplates('share/roundup/templates').values()]
8888
for tdir in templates:
89-
for idir in '. detectors extensions html static'.split():
89+
for idir in '. detectors extensions html html/layout static'.split():
9090
data_files.append(include(os.path.join(tdir, idir), '*'))
9191

9292
# add message files

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

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,38 @@
99
{% include 'layout/permission.html' %}
1010

1111
{% if context.is_view_ok %}
12-
<table class='table'>
13-
<tr class='info'>
14-
<td>Priority</td>
15-
<td>ID</td>
16-
<td>Activity</td>
17-
<td>Actor</td>
18-
<td>Keyword</td>
19-
<td>Title</td>
20-
<td>Status</td>
21-
<td>Creator</td>
22-
<td>Assigned&nbsp;To</td>
23-
</tr>
24-
{% for issue in context.list() %}
25-
<tr>
26-
<td>{{ issue.priority.plain() }}</td>
27-
<td>{{ issue.id }}</td>
28-
<td>{{ issue.activity }}</td>
29-
<td>{{ issue.actor }}</td>
30-
<td>{{ issue.keyword.plain() }}</td>
31-
<td>
32-
<a href='issue{{ issue.id }}'>{{ issue.title.plain(hyperlink=0) }}</a>
33-
</td>
34-
<td>{{ issue.status.plain() }}</td>
35-
<td>{{ issue.creator.plain() }}</td>
36-
<td>{{ issue.assignedto.plain() }}</td>
12+
{% if context.list() %}
13+
<table class='table'>
14+
<tr class='info'>
15+
<td>Priority</td>
16+
<td>ID</td>
17+
<td>Activity</td>
18+
<td>Actor</td>
19+
<td>Keyword</td>
20+
<td>Title</td>
21+
<td>Status</td>
22+
<td>Creator</td>
23+
<td>Assigned&nbsp;To</td>
3724
</tr>
38-
{% else %}
39-
There are no issues yet.
40-
{% endfor %}
41-
</table>
25+
{% for issue in context.list() %}
26+
<tr>
27+
<td>{{ issue.priority.plain() }}</td>
28+
<td>{{ issue.id }}</td>
29+
<td>{{ issue.activity }}</td>
30+
<td>{{ issue.actor }}</td>
31+
<td>{{ issue.keyword.plain() }}</td>
32+
<td>
33+
<a href='issue{{ issue.id }}'>{{ issue.title.plain(hyperlink=0) }}</a>
34+
</td>
35+
<td>{{ issue.status.plain() }}</td>
36+
<td>{{ issue.creator.plain() }}</td>
37+
<td>{{ issue.assignedto.plain() }}</td>
38+
</tr>
39+
{% endfor %}
40+
</table>
41+
{% else %}
42+
<p class='text-error'>There are no issue yet!</p>
43+
{% endif %}
4244
{% endif %}
4345

4446
{% include 'layout/pagination.html' %}

share/roundup/templates/jinja2/html/issue.item.edit.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
enctype="multipart/form-data"
99
>
1010
<fieldset>
11-
<div class='container-fluid form-horizontal'>
11+
<div class='container-fluid'>
1212
<!-- title -->
1313
<div class='row-fluid'>
1414
<div class='control-group'>
@@ -90,7 +90,7 @@
9090
<div class='form-actions'>
9191
{{ context.submit() }}
9292
{% if context.id %}
93-
<a href='{{ context.copy_url }}'>Make a copy</a>
93+
<a href='{{ context.copy_url() }}'>Make a copy</a>
9494
{% endif %}
9595
</div>
9696
<input type="hidden" name="@template" value="item">

share/roundup/templates/jinja2/html/layout/navigation.html

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<p>
88
{% if request.user.hasPermission('View', 'issue') %}
99
<ul class='nav nav-list'>
10-
<li class='nav-header' i18n:translate="">Issues</li>
10+
<li class='nav-header' i18n:translate="">
11+
<i class='icon-fire'></i>Issues
12+
</li>
1113
{% if request.user.hasPermission('Create', 'issue') %}
1214
<li>
1315
<a href="issue?@template=item" i18n:translate="">Create New</a>
@@ -59,7 +61,9 @@
5961
<ul class='nav nav-list'>
6062
{% if request.user.hasPermission('Create', 'keyword')
6163
or request.user.hasPermission('Edit', 'keyword') %}
62-
<li class='nav-header' i18n:translate="">Keywords</li>
64+
<li class='nav-header'>
65+
<i class='icon-star'></i>Keywords
66+
</li>
6367
{% endif %}
6468
{% if request.user.hasPermission('Create', 'keyword') %}
6569
<li>
@@ -81,7 +85,9 @@
8185
<p>
8286
{% if request.user.hasPermission('View', 'user') %}
8387
<ul class='nav nav-list'>
84-
<li class='nav-header' i18n:translate="">Administration</li>
88+
<li class='nav-header'>
89+
<i class='icon-eye-open'></i>Administration
90+
</li>
8591

8692
{% if request.user.hasPermission('Edit', None) %}
8793
<li>
@@ -108,7 +114,9 @@
108114
{% if request.user.username == 'anonymous' %}
109115
<form method="POST" tal:attributes="action request/base">
110116
<ul class='nav nav-list'>
111-
<li class='nav-header' i18n:translate="">Login</li>
117+
<li class='nav-header'>
118+
<i class='icon-user'></i>Login
119+
</li>
112120
<li>
113121
<input type='text' name="__login_name" placeholder='username'>
114122
</li>
@@ -139,7 +147,8 @@
139147
{% else %}
140148
<ul class='nav nav-list'>
141149
<li class='nav-header'>
142-
Hello, <span class='username'>{{ request.user.username.plain(escape=1) }}</span>
150+
<i class='icon-user'></i>Hello,
151+
<span class='username'>{{ request.user.username.plain(escape=1) }}</span>
143152
</li>
144153
<li>
145154
<a href="{{ request.indexargs_url('issue', {
@@ -165,7 +174,9 @@
165174

166175
<p>
167176
<ul class='nav nav-list'>
168-
<li class='nav-header' i18n:translate="">Help</li>
177+
<li class='nav-header'>
178+
<i class='icon-bookmark'></i>Help
179+
</li>
169180
<li>
170181
<a href="http://www.roundup-tracker.org" i18n:translate="">Roundup docs</a>
171182
</li>
Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
1-
2-
<div class='pagination pagination-centered' tal:condition="batch">
3-
<ul>
4-
<li tal:define="prev batch/previous" tal:condition="prev" class='disabled'>
5-
<a tal:define="prev batch/previous" tal:condition="prev"
6-
tal:attributes="href python:request.indexargs_url(request.classname,
7-
{'@startwith':prev.first, '@pagesize':prev.size})"
8-
i18n:translate="">Previous</a>
1+
<div class='pagination pagination-centered'>
2+
{% set batch = request.batch() %}
3+
<ul>
4+
{% if batch and batch.previous %}
5+
<li>
6+
<a href="#"
7+
>Previous</a>
98
</li>
10-
<li tal:define="prev batch/previous" tal:condition="not:prev" class='disabled'><a href='#' i18n:translate="">Previous</a></li>
11-
<li i18n:translate="">
12-
<a href='#'><span tal:replace="batch/start" i18n:name="start"
13-
/>..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
14-
/> out of <span tal:replace="batch/sequence_length" i18n:name="total"
15-
/></a></li>
16-
<li tal:define="next batch/next" tal:condition="next" class='disabled'>
17-
<a tal:define="next batch/next" tal:condition="next"
18-
tal:attributes="href python:request.indexargs_url(request.classname,
19-
{'@startwith':next.first, '@pagesize':next.size})"
20-
i18n:translate="">Next</a>
9+
{% else %}
10+
<li class='disabled'>
11+
<a href='#' i18n:translate="">Previous</a>
2112
</li>
22-
<li tal:define="next batch/next" tal:condition="not:next" class='disabled'><a href='#' i18n:translate="">Next</a></li>
23-
</ul>
24-
</div>
13+
{% endif %}
14+
<li>
15+
<span>
16+
{{ batch.start }}...{{ batch.start + batch.length -1 }}
17+
out of {{ batch.sequence_length }}
18+
</span>
19+
</li>
20+
{% if batch and batch.next() %}
21+
<li>
22+
<a href="{{ request.indexargs_url(request.classname,
23+
{'@startwith':batch.next().first, '@pagesize':batch.next().size}) }}"
24+
>Next</a>
25+
</li>
26+
{% else %}
27+
<li class='disabled'>
28+
<a href='#' i18n:translate="">Next</a>
29+
</li>
30+
{% endif %}
31+
</ul>
32+
</div>

0 commit comments

Comments
 (0)