Merge lp:~widelands-dev/widelands-website/mv_templates into lp:widelands-website

Proposed by kaputtnik
Status: Merged
Merged at revision: 514
Proposed branch: lp:~widelands-dev/widelands-website/mv_templates
Merge into: lp:widelands-website
Diff against target: 392 lines (+44/-43)
29 files modified
check_input/templates/check_input/moderate_info.html (+1/-1)
mainpage/templates/mainpage/base.html (+4/-6)
mainpage/templates/mainpage/changelog.html (+1/-1)
mainpage/templates/mainpage/developers.html (+1/-1)
mainpage/templates/mainpage/legal_notice.html (+1/-1)
mainpage/templates/mainpage/legal_notice_thanks.html (+1/-1)
mainpage/templates/mainpage/mainpage.html (+1/-1)
mainpage/templates/mainpage/navigation.html (+12/-0)
mainpage/templates/mainpage/privacy_policy.html (+1/-1)
mainpage/views.py (+1/-1)
news/templates/news/base_news.html (+1/-1)
pybb/templates/pybb/base.html (+1/-1)
templates/404.html (+1/-1)
templates/500.html (+1/-1)
templates/registration/base.html (+1/-1)
templates/search/search.html (+3/-1)
threadedcomments/templates/threadedcomments/preview_comment.html (+1/-1)
wiki/templates/wiki/base.html (+1/-1)
wlggz/templates/wlggz/edit_ggz.html (+1/-1)
wlhelp/templates/wlhelp/base.html (+1/-1)
wlimages/templates/wlimages/upload.html (+1/-1)
wlmaps/templates/wlmaps/base.html (+1/-1)
wlpoll/templates/wlpoll/base.html (+1/-1)
wlpoll/templates/wlpoll/poll_list.html (+1/-1)
wlprofile/templates/wlprofile/base.html (+1/-1)
wlscheduling/templates/wlscheduling/base.html (+1/-0)
wlscreens/templates/wlscreens/base.html (+1/-1)
wlsearch/static/js/search.js (+0/-12)
wlwebchat/templates/wlwebchat/index.html (+1/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/mv_templates
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+362221@code.launchpad.net

Commit message

Moved templates and js-scripts to the places where they belong to.

Description of the change

This should make working with the code a bit easier, because the templates are now part of of the corresponding app, e.g. templates for 'wiki' are now below the directory 'wiki/templates/wiki/' instead of 'templates/wiki/'.

Looks a bit odd having a directory 'news/templates/news/*.html', but this what django suggests.

To post a comment you must log in.
Revision history for this message
GunChleoc (gunchleoc) wrote :

LGTM, let's have it :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'check_input/templates'
2=== renamed directory 'templates/check_input' => 'check_input/templates/check_input'
3=== modified file 'check_input/templates/check_input/moderate_info.html'
4--- templates/check_input/moderate_info.html 2018-10-14 13:24:15 +0000
5+++ check_input/templates/check_input/moderate_info.html 2019-01-24 21:37:39 +0000
6@@ -1,4 +1,4 @@
7-{% extends 'base.html' %}
8+{% extends "mainpage/base.html" %}
9
10 {% block content_header %}
11 <h1>All comments have to be moderated</h1>
12
13=== added directory 'mainpage/templates'
14=== renamed directory 'templates/mainpage' => 'mainpage/templates/mainpage'
15=== renamed file 'templates/base.html' => 'mainpage/templates/mainpage/base.html'
16--- templates/base.html 2018-11-22 11:08:51 +0000
17+++ mainpage/templates/mainpage/base.html 2019-01-24 21:37:39 +0000
18@@ -26,9 +26,7 @@
19
20 <!-- Javascript Bread & Butter Scripts -->
21 <script type="text/javascript" src="{% static 'js/jquery-3.2.1.js' %}"></script>
22- <script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
23 <script type="text/javascript" src="{% static 'js/jquery_csrf_ajax.js' %}"></script>
24- <script type="text/javascript" src="{% static 'js/search.js' %}"></script>
25 {% block extra_head %}{% endblock %}
26 </head>
27
28@@ -36,16 +34,16 @@
29 <a id="top"></a>
30 <div id="wrapper">
31 <div id="header">
32- {% include "header.html" %}
33+ {% include "mainpage/header.html" %}
34 </div>
35 <div id="topmenu">
36 <!-- Navigation -->
37- {% include "navigation.html" %}
38+ {% include "mainpage/navigation.html" %}
39 </div>
40 <div id="main" class="clear">
41 <div id="rightColumn" class="posRight">
42 <!-- below navigation: right side -->
43- {% include "right_boxes.html" %}
44+ {% include "mainpage/right_boxes.html" %}
45 </div>
46 <div id="content">
47 <!-- below navigation: left side -->
48@@ -67,7 +65,7 @@
49 <div class="clear"></div>
50
51 <!-- Footer -->
52- {% include "footer.html" %}
53+ {% include "mainpage/footer.html" %}
54
55 </div>
56 </body>
57
58=== modified file 'mainpage/templates/mainpage/changelog.html'
59--- templates/mainpage/changelog.html 2018-10-14 13:24:15 +0000
60+++ mainpage/templates/mainpage/changelog.html 2019-01-24 21:37:39 +0000
61@@ -1,4 +1,4 @@
62-{% extends "base.html" %}
63+{% extends "mainpage/base.html" %}
64 {% load wl_markdown %}
65
66 {% block title %}Changelog - {{ block.super }}{% endblock %}
67
68=== modified file 'mainpage/templates/mainpage/developers.html'
69--- templates/mainpage/developers.html 2018-11-22 11:08:51 +0000
70+++ mainpage/templates/mainpage/developers.html 2019-01-24 21:37:39 +0000
71@@ -1,4 +1,4 @@
72-{% extends "base.html" %}
73+{% extends "mainpage/base.html" %}
74 {% load static %}
75 {% block title %}Widelands Development Team - {{ block.super }}{% endblock %}
76
77
78=== renamed file 'templates/footer.html' => 'mainpage/templates/mainpage/footer.html'
79=== renamed file 'templates/header.html' => 'mainpage/templates/mainpage/header.html'
80=== modified file 'mainpage/templates/mainpage/legal_notice.html'
81--- templates/mainpage/legal_notice.html 2018-10-14 13:24:15 +0000
82+++ mainpage/templates/mainpage/legal_notice.html 2019-01-24 21:37:39 +0000
83@@ -1,4 +1,4 @@
84-{% extends "base.html" %}
85+{% extends "mainpage/base.html" %}
86 {% load wl_markdown %}
87
88 {% block title %}Legal notice {{ block.super }}{% endblock %}
89
90=== modified file 'mainpage/templates/mainpage/legal_notice_thanks.html'
91--- templates/mainpage/legal_notice_thanks.html 2018-10-14 13:24:15 +0000
92+++ mainpage/templates/mainpage/legal_notice_thanks.html 2019-01-24 21:37:39 +0000
93@@ -1,4 +1,4 @@
94-{% extends "base.html" %}
95+{% extends "mainpage/base.html" %}
96 {% load wl_markdown %}
97
98 {% block title %}Impressum (Legal note) {{ block.super }}{% endblock %}
99
100=== renamed file 'templates/mainpage.html' => 'mainpage/templates/mainpage/mainpage.html'
101--- templates/mainpage.html 2018-11-22 11:08:51 +0000
102+++ mainpage/templates/mainpage/mainpage.html 2019-01-24 21:37:39 +0000
103@@ -1,4 +1,4 @@
104-{% extends "base.html" %}
105+{% extends "mainpage/base.html" %}
106
107 {% comment %}
108 vim:ft=htmldjango:
109
110=== renamed file 'templates/navigation.html' => 'mainpage/templates/mainpage/navigation.html'
111--- templates/navigation.html 2018-12-07 10:32:15 +0000
112+++ mainpage/templates/mainpage/navigation.html 2019-01-24 21:37:39 +0000
113@@ -11,6 +11,18 @@
114 $(this).next("ul").css("display", "block");
115 });
116 });
117+
118+ /* Change the placeholder to show which section to search for */
119+ $( function() {
120+ $("#selector").change(function() {
121+ input = $('#id_nav_search');
122+ /* Run the search if a search string is already given */
123+ if ( input[0].value !== "") {
124+ input[0].form.submit();
125+ }
126+ input.attr("placeholder", "Search "+this.value);
127+ });
128+});
129 </script>
130
131 <ul class="menu posLeft">
132
133=== renamed file 'templates/privacy_policy.html' => 'mainpage/templates/mainpage/privacy_policy.html'
134--- templates/privacy_policy.html 2018-11-22 11:08:51 +0000
135+++ mainpage/templates/mainpage/privacy_policy.html 2019-01-24 21:37:39 +0000
136@@ -1,4 +1,4 @@
137-{% extends "base.html" %}
138+{% extends "mainpage/base.html" %}
139 {% load wl_markdown %}
140 {% load static %}
141 {% block title %}Privacy policy {{ cur_lang }} {{ block.super }}{% endblock %}
142
143=== renamed file 'templates/right_boxes.html' => 'mainpage/templates/mainpage/right_boxes.html'
144=== modified file 'mainpage/views.py'
145--- mainpage/views.py 2018-11-08 20:11:19 +0000
146+++ mainpage/views.py 2019-01-24 21:37:39 +0000
147@@ -14,7 +14,7 @@
148
149
150 def mainpage(request):
151- return render(request, 'mainpage.html',)
152+ return render(request, 'mainpage/mainpage.html',)
153
154
155 def legal_notice(request):
156
157=== added directory 'news/templates'
158=== renamed directory 'templates/news' => 'news/templates/news'
159=== modified file 'news/templates/news/base_news.html'
160--- templates/news/base_news.html 2018-11-22 11:08:51 +0000
161+++ news/templates/news/base_news.html 2019-01-24 21:37:39 +0000
162@@ -1,4 +1,4 @@
163-{% extends "base.html" %}
164+{% extends "mainpage/base.html" %}
165 {% load static %}
166
167 {% block title %}News Archive {% endblock %}
168
169=== added directory 'notification/templates'
170=== renamed directory 'templates/notification' => 'notification/templates/notification'
171=== added directory 'pybb/templates'
172=== renamed directory 'templates/pybb' => 'pybb/templates/pybb'
173=== modified file 'pybb/templates/pybb/base.html'
174--- templates/pybb/base.html 2018-11-22 11:08:51 +0000
175+++ pybb/templates/pybb/base.html 2019-01-24 21:37:39 +0000
176@@ -1,4 +1,4 @@
177-{% extends "base.html" %}
178+{% extends "mainpage/base.html" %}
179 {% load i18n %}
180 {% load static %}
181
182
183=== modified file 'templates/404.html'
184--- templates/404.html 2018-10-14 14:20:48 +0000
185+++ templates/404.html 2019-01-24 21:37:39 +0000
186@@ -1,4 +1,4 @@
187-{% extends "base.html" %}
188+{% extends "mainpage/base.html" %}
189
190 {% block title %}
191 Not found - {{ block.super}}
192
193=== modified file 'templates/500.html'
194--- templates/500.html 2018-10-14 14:20:48 +0000
195+++ templates/500.html 2019-01-24 21:37:39 +0000
196@@ -1,4 +1,4 @@
197-{% extends "base.html" %}
198+{% extends "mainpage/base.html" %}
199
200 {% block title %}
201 Internal server error - {{ block.super}}
202
203=== modified file 'templates/registration/base.html'
204--- templates/registration/base.html 2018-11-22 11:08:51 +0000
205+++ templates/registration/base.html 2019-01-24 21:37:39 +0000
206@@ -1,4 +1,4 @@
207-{% extends "base.html" %}
208+{% extends "mainpage/base.html" %}
209 {% comment %}
210 vim:ft=htmldjango
211 {% endcomment %}
212
213=== modified file 'templates/search/search.html'
214--- templates/search/search.html 2018-11-22 11:08:51 +0000
215+++ templates/search/search.html 2019-01-24 21:37:39 +0000
216@@ -1,9 +1,11 @@
217-{% extends 'base.html' %}
218+{% extends "mainpage/base.html" %}
219 {% load custom_date %}
220 {% load static %}
221
222 {% block extra_head %}
223 <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/search.css' %}" />
224+<script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
225+<script type="text/javascript" src="{% static 'js/search.js' %}"></script>
226 {{block.super}}
227 {% endblock %}
228
229
230=== added directory 'threadedcomments/templates'
231=== renamed directory 'templates/threadedcomments' => 'threadedcomments/templates/threadedcomments'
232=== modified file 'threadedcomments/templates/threadedcomments/preview_comment.html'
233--- templates/threadedcomments/preview_comment.html 2018-11-22 11:08:51 +0000
234+++ threadedcomments/templates/threadedcomments/preview_comment.html 2019-01-24 21:37:39 +0000
235@@ -1,4 +1,4 @@
236-{% extends "base.html" %}
237+{% extends "mainpage/base.html" %}
238
239 {% load threadedcommentstags %}
240 {% load static %}
241
242=== added directory 'wiki/templates'
243=== renamed directory 'templates/wiki' => 'wiki/templates/wiki'
244=== modified file 'wiki/templates/wiki/base.html'
245--- templates/wiki/base.html 2018-11-22 11:08:51 +0000
246+++ wiki/templates/wiki/base.html 2019-01-24 21:37:39 +0000
247@@ -1,4 +1,4 @@
248-{% extends "base.html" %}
249+{% extends "mainpage/base.html" %}
250 {% load i18n %}
251 {% load static %}
252
253
254=== added directory 'wlggz/templates'
255=== renamed directory 'templates/wlggz' => 'wlggz/templates/wlggz'
256=== modified file 'wlggz/templates/wlggz/edit_ggz.html'
257--- templates/wlggz/edit_ggz.html 2018-10-14 13:24:15 +0000
258+++ wlggz/templates/wlggz/edit_ggz.html 2019-01-24 21:37:39 +0000
259@@ -1,4 +1,4 @@
260-{% extends "base.html" %}
261+{% extends "mainpage/base.html" %}
262
263 {% load i18n %}
264
265
266=== added directory 'wlhelp/templates'
267=== renamed directory 'templates/wlhelp' => 'wlhelp/templates/wlhelp'
268=== modified file 'wlhelp/templates/wlhelp/base.html'
269--- templates/wlhelp/base.html 2018-11-22 11:08:51 +0000
270+++ wlhelp/templates/wlhelp/base.html 2019-01-24 21:37:39 +0000
271@@ -1,4 +1,4 @@
272-{% extends "base.html" %}
273+{% extends "mainpage/base.html" %}
274 {% load static %}
275
276 {% block title %}
277
278=== added directory 'wlimages/templates'
279=== renamed directory 'templates/wlimages' => 'wlimages/templates/wlimages'
280=== modified file 'wlimages/templates/wlimages/upload.html'
281--- templates/wlimages/upload.html 2018-03-11 11:06:46 +0000
282+++ wlimages/templates/wlimages/upload.html 2019-01-24 21:37:39 +0000
283@@ -1,4 +1,4 @@
284-{% extends "base.html" %}
285+{% extends "mainpage/base.html" %}
286 {% comment %}
287 vim:ft=htmldjango
288 {% endcomment %}
289
290=== added directory 'wlmaps/templates'
291=== renamed directory 'templates/wlmaps' => 'wlmaps/templates/wlmaps'
292=== modified file 'wlmaps/templates/wlmaps/base.html'
293--- templates/wlmaps/base.html 2018-11-22 11:08:51 +0000
294+++ wlmaps/templates/wlmaps/base.html 2019-01-24 21:37:39 +0000
295@@ -1,4 +1,4 @@
296-{% extends "base.html" %}
297+{% extends "mainpage/base.html" %}
298 {% load static %}
299 {% comment %}
300 vim:ft=htmldjango
301
302=== added directory 'wlpoll/templates'
303=== renamed directory 'templates/wlpoll' => 'wlpoll/templates/wlpoll'
304=== modified file 'wlpoll/templates/wlpoll/base.html'
305--- templates/wlpoll/base.html 2018-11-22 11:08:51 +0000
306+++ wlpoll/templates/wlpoll/base.html 2019-01-24 21:37:39 +0000
307@@ -1,4 +1,4 @@
308-{% extends "base.html" %}
309+{% extends "mainpage/base.html" %}
310 {% comment %}
311 vim:ft=htmldjango
312 {% endcomment %}
313
314=== modified file 'wlpoll/templates/wlpoll/poll_list.html'
315--- templates/wlpoll/poll_list.html 2018-11-22 11:08:51 +0000
316+++ wlpoll/templates/wlpoll/poll_list.html 2019-01-24 21:37:39 +0000
317@@ -1,4 +1,4 @@
318-{% extends "base.html" %}
319+{% extends "mainpage/base.html" %}
320 {% comment %}
321 vim:ft=htmldjango
322 {% endcomment %}
323
324=== added directory 'wlprofile/templates'
325=== renamed directory 'templates/wlprofile' => 'wlprofile/templates/wlprofile'
326=== modified file 'wlprofile/templates/wlprofile/base.html'
327--- templates/wlprofile/base.html 2018-11-22 11:08:51 +0000
328+++ wlprofile/templates/wlprofile/base.html 2019-01-24 21:37:39 +0000
329@@ -1,4 +1,4 @@
330-{% extends "base.html" %}
331+{% extends "mainpage/base.html" %}
332
333 {% comment %}
334 vim:ft=htmldjango
335
336=== added directory 'wlscheduling/templates'
337=== renamed directory 'templates/wlscheduling' => 'wlscheduling/templates/wlscheduling'
338=== modified file 'wlscheduling/templates/wlscheduling/base.html'
339--- templates/wlscheduling/base.html 2018-11-22 17:50:41 +0000
340+++ wlscheduling/templates/wlscheduling/base.html 2019-01-24 21:37:39 +0000
341@@ -5,6 +5,7 @@
342 <link rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui.multidatespicker.css' %}" >
343 <link rel="stylesheet" type="text/css" href="{% static 'css/scheduling.css' %}" >
344
345+<script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
346 <script src="{% static 'js/jquery-ui.multidatespicker.js' %}" type="text/javascript"></script>
347 <script src="{% static 'js/scheduling.js' %}" type="text/javascript"></script>
348 {% endblock %}
349
350=== added directory 'wlscreens/templates'
351=== renamed directory 'templates/wlscreens' => 'wlscreens/templates/wlscreens'
352=== modified file 'wlscreens/templates/wlscreens/base.html'
353--- templates/wlscreens/base.html 2018-11-22 11:08:51 +0000
354+++ wlscreens/templates/wlscreens/base.html 2019-01-24 21:37:39 +0000
355@@ -1,4 +1,4 @@
356-{% extends "base.html" %}
357+{% extends "mainpage/base.html" %}
358 {% comment %}
359 vim:ft=htmldjango
360 {% endcomment %}
361
362=== modified file 'wlsearch/static/js/search.js'
363--- wlsearch/static/js/search.js 2018-11-22 17:50:41 +0000
364+++ wlsearch/static/js/search.js 2019-01-24 21:37:39 +0000
365@@ -20,15 +20,3 @@
366 }
367 });
368 });
369-
370-/* Change the placeholder to show which section to search for */
371-$( function() {
372- $("#selector").change(function() {
373- input = $('#id_nav_search');
374- /* Run the search if a search string is already given */
375- if ( input[0].value !== "") {
376- input[0].form.submit();
377- }
378- input.attr("placeholder", "Search "+this.value);
379- });
380-});
381
382=== added directory 'wlwebchat/templates'
383=== renamed directory 'templates/wlwebchat' => 'wlwebchat/templates/wlwebchat'
384=== modified file 'wlwebchat/templates/wlwebchat/index.html'
385--- templates/wlwebchat/index.html 2018-10-14 14:20:48 +0000
386+++ wlwebchat/templates/wlwebchat/index.html 2019-01-24 21:37:39 +0000
387@@ -1,4 +1,4 @@
388-{% extends "base.html" %}
389+{% extends "mainpage/base.html" %}
390 {% comment %}
391 vim:ft=htmldjango:
392 {% endcomment %}

Subscribers

People subscribed via source and target branches