← Back to team overview

widelands-dev team mailing list archive

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

 

kaputtnik has proposed merging lp:~widelands-dev/widelands-website/mv_templates into lp:widelands-website.

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

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/mv_templates/+merge/362221

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.

-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/mv_templates into lp:widelands-website.
=== added directory 'check_input/templates'
=== renamed directory 'templates/check_input' => 'check_input/templates/check_input'
=== modified file 'check_input/templates/check_input/moderate_info.html'
--- templates/check_input/moderate_info.html	2018-10-14 13:24:15 +0000
+++ check_input/templates/check_input/moderate_info.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends 'base.html' %}
+{% extends "mainpage/base.html" %}
 
 {% block content_header %}
     <h1>All comments have to be moderated</h1>

=== added directory 'mainpage/templates'
=== renamed directory 'templates/mainpage' => 'mainpage/templates/mainpage'
=== renamed file 'templates/base.html' => 'mainpage/templates/mainpage/base.html'
--- templates/base.html	2018-11-22 11:08:51 +0000
+++ mainpage/templates/mainpage/base.html	2019-01-24 21:37:39 +0000
@@ -26,9 +26,7 @@
 
 		<!-- Javascript Bread & Butter Scripts -->
 		<script type="text/javascript" src="{% static 'js/jquery-3.2.1.js' %}"></script>
-		<script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
 		<script type="text/javascript" src="{% static 'js/jquery_csrf_ajax.js' %}"></script>
-		<script type="text/javascript" src="{% static 'js/search.js' %}"></script>
 		{% block extra_head %}{% endblock %}
 	</head>
 
@@ -36,16 +34,16 @@
 		<a id="top"></a>
 		<div id="wrapper">
 			<div id="header">
-				{% include "header.html" %}
+				{% include "mainpage/header.html" %}
 			</div>
 			<div id="topmenu">
 				<!-- Navigation -->
-				{% include "navigation.html" %}
+				{% include "mainpage/navigation.html" %}
 			</div>
 			<div id="main" class="clear">
 				<div id="rightColumn" class="posRight">
                     <!-- below navigation: right side -->
-					{% include "right_boxes.html" %}
+					{% include "mainpage/right_boxes.html" %}
 				</div>
 				<div id="content">
 				<!-- below navigation: left side -->
@@ -67,7 +65,7 @@
 			<div class="clear"></div>
 
 		<!-- Footer -->
-		{% include "footer.html" %}
+		{% include "mainpage/footer.html" %}
 
 		</div>
 	</body>

=== modified file 'mainpage/templates/mainpage/changelog.html'
--- templates/mainpage/changelog.html	2018-10-14 13:24:15 +0000
+++ mainpage/templates/mainpage/changelog.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load wl_markdown %}
 
 {% block title %}Changelog - {{ block.super }}{% endblock %}

=== modified file 'mainpage/templates/mainpage/developers.html'
--- templates/mainpage/developers.html	2018-11-22 11:08:51 +0000
+++ mainpage/templates/mainpage/developers.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load static %}
 {% block title %}Widelands Development Team - {{ block.super }}{% endblock %}
 

=== renamed file 'templates/footer.html' => 'mainpage/templates/mainpage/footer.html'
=== renamed file 'templates/header.html' => 'mainpage/templates/mainpage/header.html'
=== modified file 'mainpage/templates/mainpage/legal_notice.html'
--- templates/mainpage/legal_notice.html	2018-10-14 13:24:15 +0000
+++ mainpage/templates/mainpage/legal_notice.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load wl_markdown %}
 
 {% block title %}Legal notice {{ block.super }}{% endblock %}

=== modified file 'mainpage/templates/mainpage/legal_notice_thanks.html'
--- templates/mainpage/legal_notice_thanks.html	2018-10-14 13:24:15 +0000
+++ mainpage/templates/mainpage/legal_notice_thanks.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load wl_markdown %}
 
 {% block title %}Impressum (Legal note) {{ block.super }}{% endblock %}

=== renamed file 'templates/mainpage.html' => 'mainpage/templates/mainpage/mainpage.html'
--- templates/mainpage.html	2018-11-22 11:08:51 +0000
+++ mainpage/templates/mainpage/mainpage.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 
 {% comment %}
  vim:ft=htmldjango:

=== renamed file 'templates/navigation.html' => 'mainpage/templates/mainpage/navigation.html'
--- templates/navigation.html	2018-12-07 10:32:15 +0000
+++ mainpage/templates/mainpage/navigation.html	2019-01-24 21:37:39 +0000
@@ -11,6 +11,18 @@
 			$(this).next("ul").css("display", "block");
 		});
 	});
+
+	/* Change the placeholder to show which section to search for */
+	$( function() {
+      $("#selector").change(function() {
+        input = $('#id_nav_search');
+        /* Run the search if a search string is already given */
+        if ( input[0].value !== "") {
+          input[0].form.submit();
+        }
+        input.attr("placeholder", "Search "+this.value);
+      });
+});
 </script>
 
 <ul class="menu posLeft">

=== renamed file 'templates/privacy_policy.html' => 'mainpage/templates/mainpage/privacy_policy.html'
--- templates/privacy_policy.html	2018-11-22 11:08:51 +0000
+++ mainpage/templates/mainpage/privacy_policy.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load wl_markdown %}
 {% load static %}
 {% block title %}Privacy policy {{ cur_lang }} {{ block.super }}{% endblock %}

=== renamed file 'templates/right_boxes.html' => 'mainpage/templates/mainpage/right_boxes.html'
=== modified file 'mainpage/views.py'
--- mainpage/views.py	2018-11-08 20:11:19 +0000
+++ mainpage/views.py	2019-01-24 21:37:39 +0000
@@ -14,7 +14,7 @@
 
 
 def mainpage(request):
-    return render(request, 'mainpage.html',)
+    return render(request, 'mainpage/mainpage.html',)
 
 
 def legal_notice(request):

=== added directory 'news/templates'
=== renamed directory 'templates/news' => 'news/templates/news'
=== modified file 'news/templates/news/base_news.html'
--- templates/news/base_news.html	2018-11-22 11:08:51 +0000
+++ news/templates/news/base_news.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load static %}
 
 {% block title %}News Archive {% endblock %}

=== added directory 'notification/templates'
=== renamed directory 'templates/notification' => 'notification/templates/notification'
=== added directory 'pybb/templates'
=== renamed directory 'templates/pybb' => 'pybb/templates/pybb'
=== modified file 'pybb/templates/pybb/base.html'
--- templates/pybb/base.html	2018-11-22 11:08:51 +0000
+++ pybb/templates/pybb/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load i18n %}
 {% load static %}
 

=== modified file 'templates/404.html'
--- templates/404.html	2018-10-14 14:20:48 +0000
+++ templates/404.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 
 {% block title %}
 Not found - {{ block.super}}

=== modified file 'templates/500.html'
--- templates/500.html	2018-10-14 14:20:48 +0000
+++ templates/500.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 
 {% block title %}
 Internal server error - {{ block.super}}

=== modified file 'templates/registration/base.html'
--- templates/registration/base.html	2018-11-22 11:08:51 +0000
+++ templates/registration/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% comment %}
    vim:ft=htmldjango
 {% endcomment %}

=== modified file 'templates/search/search.html'
--- templates/search/search.html	2018-11-22 11:08:51 +0000
+++ templates/search/search.html	2019-01-24 21:37:39 +0000
@@ -1,9 +1,11 @@
-{% extends 'base.html' %}
+{% extends "mainpage/base.html" %}
 {% load custom_date %}
 {% load static %}
 
 {% block extra_head %}
 <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/search.css' %}" />
+<script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
+<script type="text/javascript" src="{% static 'js/search.js' %}"></script>
 {{block.super}}
 {% endblock %}
 

=== added directory 'threadedcomments/templates'
=== renamed directory 'templates/threadedcomments' => 'threadedcomments/templates/threadedcomments'
=== modified file 'threadedcomments/templates/threadedcomments/preview_comment.html'
--- templates/threadedcomments/preview_comment.html	2018-11-22 11:08:51 +0000
+++ threadedcomments/templates/threadedcomments/preview_comment.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 
 {% load threadedcommentstags %}
 {% load static %}

=== added directory 'wiki/templates'
=== renamed directory 'templates/wiki' => 'wiki/templates/wiki'
=== modified file 'wiki/templates/wiki/base.html'
--- templates/wiki/base.html	2018-11-22 11:08:51 +0000
+++ wiki/templates/wiki/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load i18n %}
 {% load static %}
 

=== added directory 'wlggz/templates'
=== renamed directory 'templates/wlggz' => 'wlggz/templates/wlggz'
=== modified file 'wlggz/templates/wlggz/edit_ggz.html'
--- templates/wlggz/edit_ggz.html	2018-10-14 13:24:15 +0000
+++ wlggz/templates/wlggz/edit_ggz.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 
 {% load i18n %}
 

=== added directory 'wlhelp/templates'
=== renamed directory 'templates/wlhelp' => 'wlhelp/templates/wlhelp'
=== modified file 'wlhelp/templates/wlhelp/base.html'
--- templates/wlhelp/base.html	2018-11-22 11:08:51 +0000
+++ wlhelp/templates/wlhelp/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load static %}
 
 {% block title %}

=== added directory 'wlimages/templates'
=== renamed directory 'templates/wlimages' => 'wlimages/templates/wlimages'
=== modified file 'wlimages/templates/wlimages/upload.html'
--- templates/wlimages/upload.html	2018-03-11 11:06:46 +0000
+++ wlimages/templates/wlimages/upload.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% comment %}
    vim:ft=htmldjango
 {% endcomment %}

=== added directory 'wlmaps/templates'
=== renamed directory 'templates/wlmaps' => 'wlmaps/templates/wlmaps'
=== modified file 'wlmaps/templates/wlmaps/base.html'
--- templates/wlmaps/base.html	2018-11-22 11:08:51 +0000
+++ wlmaps/templates/wlmaps/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% load static %}
 {% comment %}
    vim:ft=htmldjango

=== added directory 'wlpoll/templates'
=== renamed directory 'templates/wlpoll' => 'wlpoll/templates/wlpoll'
=== modified file 'wlpoll/templates/wlpoll/base.html'
--- templates/wlpoll/base.html	2018-11-22 11:08:51 +0000
+++ wlpoll/templates/wlpoll/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% comment %}
    vim:ft=htmldjango
 {% endcomment %}

=== modified file 'wlpoll/templates/wlpoll/poll_list.html'
--- templates/wlpoll/poll_list.html	2018-11-22 11:08:51 +0000
+++ wlpoll/templates/wlpoll/poll_list.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% comment %}
    vim:ft=htmldjango
 {% endcomment %}

=== added directory 'wlprofile/templates'
=== renamed directory 'templates/wlprofile' => 'wlprofile/templates/wlprofile'
=== modified file 'wlprofile/templates/wlprofile/base.html'
--- templates/wlprofile/base.html	2018-11-22 11:08:51 +0000
+++ wlprofile/templates/wlprofile/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 
 {% comment %}
    vim:ft=htmldjango

=== added directory 'wlscheduling/templates'
=== renamed directory 'templates/wlscheduling' => 'wlscheduling/templates/wlscheduling'
=== modified file 'wlscheduling/templates/wlscheduling/base.html'
--- templates/wlscheduling/base.html	2018-11-22 17:50:41 +0000
+++ wlscheduling/templates/wlscheduling/base.html	2019-01-24 21:37:39 +0000
@@ -5,6 +5,7 @@
 <link  rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui.multidatespicker.css' %}" >
 <link  rel="stylesheet" type="text/css" href="{% static 'css/scheduling.css' %}" >
 
+<script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
 <script src="{% static 'js/jquery-ui.multidatespicker.js' %}" type="text/javascript"></script>
 <script src="{% static 'js/scheduling.js' %}" type="text/javascript"></script>
 {% endblock %}

=== added directory 'wlscreens/templates'
=== renamed directory 'templates/wlscreens' => 'wlscreens/templates/wlscreens'
=== modified file 'wlscreens/templates/wlscreens/base.html'
--- templates/wlscreens/base.html	2018-11-22 11:08:51 +0000
+++ wlscreens/templates/wlscreens/base.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% comment %}
    vim:ft=htmldjango
 {% endcomment %}

=== modified file 'wlsearch/static/js/search.js'
--- wlsearch/static/js/search.js	2018-11-22 17:50:41 +0000
+++ wlsearch/static/js/search.js	2019-01-24 21:37:39 +0000
@@ -20,15 +20,3 @@
         }
     });
 });
-
-/* Change the placeholder to show which section to search for */
-$( function() {
-      $("#selector").change(function() {
-        input = $('#id_nav_search');
-        /* Run the search if a search string is already given */
-        if ( input[0].value !== "") {
-          input[0].form.submit();
-        }
-        input.attr("placeholder", "Search "+this.value);
-      });
-});

=== added directory 'wlwebchat/templates'
=== renamed directory 'templates/wlwebchat' => 'wlwebchat/templates/wlwebchat'
=== modified file 'wlwebchat/templates/wlwebchat/index.html'
--- templates/wlwebchat/index.html	2018-10-14 14:20:48 +0000
+++ wlwebchat/templates/wlwebchat/index.html	2019-01-24 21:37:39 +0000
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "mainpage/base.html" %}
 {% comment %}
    vim:ft=htmldjango:
 {% endcomment %}


Follow ups