Skip to content

Commit 7ccf026

Browse files
committed
completed update of jinja2 template to bootstrap 4.4.1
1 parent 8dac18e commit 7ccf026

19 files changed

+171
-137
lines changed

CHANGES.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ Features:
3636
admin to control caching for css, js and other static files. See
3737
customizing.html. The use is documented in the section describing
3838
how to use interfaces.py.
39-
- issue2551075 Update jinja template to bootstrap 4. Updated to 4.1.3
40-
(current 4.4.1). The pull request has been around for a
41-
while. (Patch: Paul Spooren; templates merged by Christof Meerwald;
42-
other merged by John Rouillard)
39+
- issue2551071 Update jinja template to bootstrap 4. Updated to 4.4.1.
40+
The pull request has been around for a while. (Patch: Paul Spooren;
41+
templates merged and additional changes by Christof Meerwald; other
42+
merged by John Rouillard)
4343
- Add config option 'http_auth_convert_realm_to_lowercase'
4444
If usernames consist of a name and a domain/realm part of the form
4545
user@realm and we're using REMOTE_USER for authentication (e.g. via

roundup/cgi/engine_jinja2.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
[ ] copy TEMPLATES-INFO.txt to INFO.txt
2323
[ ] implement VERSION file in environment for auto
2424
upgrade
25-
[ ] figure out what to do with autoescaping - it is disabled
26-
by default in Jinja2
2725
2826
[ ] precompile() is a stub
2927

share/roundup/templates/jinja2/html/file.item.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
<form method="POST"
1717
enctype="multipart/form-data" action='{{ context.designator() }}'>
1818

19-
<dl class='dl-horizontal'>
20-
<dt>{% trans %}Name{% endtrans %}</dt>
21-
<dd>{{ context.name.field()|u|safe }}</dd>
22-
<dt>{% trans %}Content Type{% endtrans %}</dt>
23-
<dd>{{ context.type.field()|u|safe }}</dd>
19+
<dl class="row row-cols-1 row-cols-md-2">
20+
<div class="col row">
21+
<dt class="col col-auto">{% trans %}Name{% endtrans %}</dt>
22+
<dd class="col col-auto">{{ context.name.field()|u|safe }}</dd>
23+
</div>
24+
<div class="col row">
25+
<dt class="col col-auto">{% trans %}Content Type{% endtrans %}</dt>
26+
<dd class="col col-auto">{{ context.type.field()|u|safe }}</dd>
27+
</div>
2428
</dl>
2529

2630
<input type="hidden" name="@template" value="item">
@@ -36,7 +40,7 @@
3640
{% endif %}
3741

3842
{% if context.id and context.is_view_ok() %}
39-
<div class='row-fluid'>
43+
<div>
4044
<a href='file{{ context.id }}/{{ context.name.plain()|u }}'>{% trans %}Download{% endtrans %}</a>
4145
</div>
4246
{% endif %}

share/roundup/templates/jinja2/html/home.classlist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
{% block content %}
1212

13-
<div class='row-fluid'>
13+
<div>
1414
{% for cl in db.classes() %}
1515
<div class='span4'>
1616
<h4>

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,14 @@
7979
{% endfor %}
8080
</table>
8181
{% include 'layout/pagination.html' %}
82-
<div class='row-fluid'>
83-
<div class='pull-right'>
84-
<a class='btn btn-success'
85-
href="{{ request.indexargs_url('issue', {'@action':'export_csv'}) }}">
86-
{% trans %}Download as CSV{% endtrans %}
87-
</a>
88-
</div>
89-
</div>
82+
<div>
83+
<a class='btn btn-secondary'
84+
href="{{ request.indexargs_url('issue', {'@action':'export_csv'}) }}">
85+
{% trans %}Download as CSV{% endtrans %}
86+
</a>
87+
</div>
9088

91-
{% include 'layout/sort.html' %}
89+
{% include 'layout/sort.html' %}
9290

9391
{% else %}
9492
<p class='text-error'>{% trans %}There are no issues yet!{% endtrans %}</p>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
{% if context.messages %}
4747
<h4>Messages</h4>
4848
{% for msg in context.messages.reverse() %}
49-
<div class='row-fluid'>
50-
<div class='span2'>
49+
<div class="row row-cols-1 row-cols-lg-3">
50+
<div class="col col-lg-auto">
5151
<a href='msg{{ msg.id }}'>msg{{msg.id}} (view)</a>
5252
</div>
53-
<div class='span4'>
53+
<div class="col col-lg-auto">
5454
Author: {{ msg.author.plain()|u }}, Date: {{ msg.date.plain()|u }}
5555
</div>
56-
<div class='pull-right'>
56+
<div class="col col-lg-auto">
5757
{% if context.is_edit_ok %}
5858
<form method="POST" action='issue{{ context.id }}' class='form-inline'>
5959
<input type="hidden" name="@remove@messages" value='{{ msg.id }}'>
@@ -65,7 +65,7 @@ <h4>Messages</h4>
6565
{% endif %}
6666
</div>
6767
</div>
68-
<div class='row-fluid'>
68+
<div>
6969
<pre>{{ msg.content.hyperlinked()|u|safe }}</pre>
7070
</div>
7171
{% endfor %}
Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
1-
<dl class='dl-horizontal'>
2-
<dt>{% trans %}Title{% endtrans %}</dt>
3-
<dd>{{ context.title.plain()|u }}</dd>
4-
<dt>{% trans %}Priority{% endtrans %}</dt>
5-
<dd>{{ context.priority.plain()|u }}</dd>
6-
<dt>{% trans %}Status{% endtrans %}</dt>
7-
<dd>{{ context.status.plain()|u }}</dd>
8-
<dt>{% trans %}Superseder{% endtrans %}</dt>
9-
<dd>{{ context.superseder.plain()|u }}</dd>
10-
<dt>{% trans %}Nosy list{% endtrans %}</dt>
11-
<dd>{{ context.nosy.plain()|u }}</dd>
12-
<dt>{% trans %}Assigned to{% endtrans %}</dt>
13-
<dd>{{ context.assignedto.plain()|u }}</dd>
14-
<dt>{% trans %}Keywords{% endtrans %}</dt>
15-
<dd>{{ context.keyword.plain()|u }}</dd>
1+
{% set dt_class_full = 'col col-4 col-md-3 col-lg-2' -%}
2+
{% set dd_class_full = 'col col-8 col-md-9 col-lg-10' -%}
3+
{% set dt_class_half = 'col col-4 col-md-3 col-lg-4' -%}
4+
{% set dd_class_half = 'col col-8 col-md-9 col-lg-8' -%}
5+
<dl class="row row-cols-1 row-cols-lg-2">
6+
<div class="col col-lg-12 row">
7+
<dt class="{{ dt_class_full }}">{% trans %}Title{% endtrans %}</dt>
8+
<dd class="{{ dd_class_full }}">{{ context.title.plain()|u }}</dd>
9+
</div>
10+
<div class="col row">
11+
<dt class="{{ dt_class_half }}">{% trans %}Priority{% endtrans %}</dt>
12+
<dd class="{{ dd_class_half }}">{{ context.priority.plain()|u }}</dd>
13+
</div>
14+
<div class="col row">
15+
<dt class="{{ dt_class_half }}">{% trans %}Status{% endtrans %}</dt>
16+
<dd class="{{ dd_class_half }}">{{ context.status.plain()|u }}</dd>
17+
</div>
18+
<div class="col col-lg-12 row">
19+
<dt class="{{ dt_class_full }}">{% trans %}Superseder{% endtrans %}</dt>
20+
<dd class="{{ dd_class_full }}">{{ context.superseder.plain()|u }}</dd>
21+
</div>
22+
<div class="col col-lg-12 row">
23+
<dt class="{{ dt_class_full }}">{% trans %}Nosy list{% endtrans %}</dt>
24+
<dd class="{{ dd_class_full }}">{{ context.nosy.plain()|u }}</dd>
25+
</div>
26+
<div class="col row">
27+
<dt class="{{ dt_class_half }}">{% trans %}Assigned to{% endtrans %}</dt>
28+
<dd class="{{ dd_class_half }}">{{ context.assignedto.plain()|u }}</dd>
29+
</div>
30+
<div class="col row">
31+
<dt class="{{ dt_class_half }}">{% trans %}Keywords{% endtrans %}</dt>
32+
<dd class="{{ dd_class_half }}">{{ context.keyword.plain()|u }}</dd>
33+
</div>
1634
</dl>

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
<tr>
6363
<th>{% trans %}Title:{% endtrans %}</th>
6464
<td>{{ input('title') }}</td>
65-
<td>{{ display_column('title') }}</td>
66-
<td>{{ sort_column('title') }}</td>
65+
<td class="text-center">{{ display_column('title') }}</td>
66+
<td class="text-center">{{ sort_column('title') }}</td>
6767
<td>&nbsp;</td>
6868
</tr>
6969

@@ -77,32 +77,32 @@
7777
{{ option_value('keyword', keyword.id, keyword.name.plain()) }}
7878
{% endfor %}
7979
</select></td>
80-
<td>{{ display_column('id') }}</td>
81-
<td>{{ sort_column('id') }}</td>
80+
<td class="text-center">{{ display_column('id') }}</td>
81+
<td class="text-center">{{ sort_column('id') }}</td>
8282
<td>&nbsp;</td>
8383
</tr>
8484

8585
<tr>
8686
<th>{% trans %}ID:{% endtrans %}</th>
8787
<td>{{ input('id') }}</td>
88-
<td>{{ display_column('id') }}</td>
89-
<td>{{ sort_column('id') }}</td>
88+
<td class="text-center">{{ display_column('id') }}</td>
89+
<td class="text-center">{{ sort_column('id') }}</td>
9090
<td>&nbsp;</td>
9191
</tr>
9292

9393
<tr>
9494
<th>{% trans %}Creation Date:{% endtrans %}</th>
9595
<td>{{ input('creation') }}</td>
96-
<td>{{ display_column('creation') }}</td>
97-
<td>{{ sort_column('creation') }}</td>
98-
<td>{{ group_column('creation') }}</td>
96+
<td class="text-center">{{ display_column('creation') }}</td>
97+
<td class="text-center">{{ sort_column('creation') }}</td>
98+
<td class="text-center">{{ group_column('creation') }}</td>
9999
</tr>
100100

101101
<tr>
102102
<th>{% trans %}Activity:{% endtrans %}</th>
103103
<td>{{ input('activity') }}</td>
104-
<td>{{ display_column('activity') }}</td>
105-
<td>{{ sort_column('activity') }}</td>
104+
<td class="text-center">{{ display_column('activity') }}</td>
105+
<td class="text-center">{{ sort_column('activity') }}</td>
106106
<td>&nbsp;</td>
107107
</tr>
108108

@@ -116,9 +116,9 @@
116116
{{ option_value('priority', priority.id, priority.name.plain()) }}
117117
{% endfor %}
118118
</select></td>
119-
<td>{{ display_column('priority') }}</td>
120-
<td>{{ sort_column('priority') }}</td>
121-
<td>{{ group_column('priority') }}</td>
119+
<td class="text-center">{{ display_column('priority') }}</td>
120+
<td class="text-center">{{ sort_column('priority') }}</td>
121+
<td class="text-center">{{ group_column('priority') }}</td>
122122
</tr>
123123

124124
<tr>
@@ -132,25 +132,25 @@
132132
{{ option_value('status', status.id, status.name.plain()) }}
133133
{% endfor %}
134134
</select></td>
135-
<td>{{ display_column('status') }}</td>
136-
<td>{{ sort_column('status') }}</td>
137-
<td>{{ group_column('status') }}</td>
135+
<td class="text-center">{{ display_column('status') }}</td>
136+
<td class="text-center">{{ sort_column('status') }}</td>
137+
<td class="text-center">{{ group_column('status') }}</td>
138138
</tr>
139139

140140
<tr>
141141
<th>{% trans %}Assigned to:{% endtrans %}</th>
142142
<td>{{ input('submitter') }}</td>
143-
<td>{{ display_column('assignedto') }}</td>
144-
<td>{{ sort_column('assignedto') }}</td>
145-
<td>{{ group_column('assignedto') }}</td>
143+
<td class="text-center">{{ display_column('assignedto') }}</td>
144+
<td class="text-center">{{ sort_column('assignedto') }}</td>
145+
<td class="text-center">{{ group_column('assignedto') }}</td>
146146
</tr>
147147

148148
<tr>
149149
<th>{% trans %}No Sort or group:{% endtrans %}</th>
150150
<td>&nbsp;</td>
151151
<td>&nbsp;</td>
152-
<td><input type="radio" name="@sort" value=""></td>
153-
<td><input type="radio" name="@group" value=""></td>
152+
<td class="text-center"><input type="radio" name="@sort" value=""></td>
153+
<td class="text-center"><input type="radio" name="@group" value=""></td>
154154
</tr>
155155

156156
<tr>
@@ -160,7 +160,7 @@
160160

161161
<tr>
162162
<th>{% trans %}Start With:{% endtrans %}</th>
163-
<td><input class="form-control col-4" name="@startwith"" value="{{ request.form.getfirst('@startwith', '0') }}" /></td>
163+
<td><input class="form-control col-4" name="@startwith" value="{{ request.form.getfirst('@startwith', '0') }}" /></td>
164164
</tr>
165165

166166
<tr>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="navbar navbar-ligh bg-light">
1+
<div class="navbar navbar-light bg-light">
22
<a href="/" class='navbar-brand'>
33
<i class='icon-home'></i> {% trans %}Roundup Demo Tracker{% endtrans %}
44
</a>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<div class="form-group">
5050
<input type="hidden" name="@type" value="issue">
5151
<input type="hidden" name="@action" value="show">
52-
<input class="form-control input-sm col-2" type="text" name="@number">
53-
<input type="submit" class="form-control col-auto" value="{% trans %}Show issue{% endtrans %}">
52+
<input class="form-control form-control-sm col-2" type="text" name="@number">
53+
<input class="form-control form-control-sm btn btn-outline-secondary" type="submit" value="{% trans %}Show issue{% endtrans %}">
5454
</div>
5555
</form>
5656
</li>
@@ -117,18 +117,18 @@
117117
<i class='icon-user'></i>{% trans %}Login{% endtrans %}
118118
</li>
119119
<li class="nav-item">
120-
<input class="form-control" type='text' name="__login_name" placeholder='username'>
120+
<input class="form-control form-control-sm" type='text' name="__login_name" placeholder='username'>
121121
</li>
122122
<li class="nav-item">
123-
<input class="form-control" type="password" name="__login_password" placeholder='password'>
123+
<input class="form-control form-control-sm" type="password" name="__login_password" placeholder='password'>
124124
</li>
125125
<li class="nav-item">
126-
<label class="form-control" class='checkbox'>
126+
<label class="form-control form-control-sm" class='checkbox'>
127127
<input type="checkbox" name="remember"> {% trans %}Remember me?{% endtrans %}
128128
</label>
129129
</li>
130130
<li class="nav-item">
131-
<input class="form-control" type="submit" value="{% trans %}Login{% endtrans %}" class='btn btn-inverse'>
131+
<input class="btn btn-secondary form-control-sm" type="submit" value="{% trans %}Login{% endtrans %}">
132132
</li>
133133
<li class='vspace-one'>
134134
{% if request.user.hasPermission('Register', 'user') %}

0 commit comments

Comments
 (0)