[PATCH 3/6] templates: Keep only whole templates in the top-level

Stephen Finucane stephen at that.guru
Tue Sep 18 00:17:47 AEST 2018


Again, this should make this a little more understandable as it ensures
a rough mapping exists between views and template names.

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 patchwork/templates/patchwork/bundle.html                   | 2 +-
 patchwork/templates/patchwork/list.html                     | 2 +-
 .../patchwork/{ => partials}/download-buttons.html          | 0
 patchwork/templates/patchwork/{ => partials}/filters.html   | 0
 .../templates/patchwork/{ => partials}/pagination.html      | 0
 .../templates/patchwork/{ => partials}/patch-list.html      | 6 +++---
 patchwork/templates/patchwork/submission.html               | 4 ++--
 patchwork/templates/patchwork/todo-list.html                | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
 rename patchwork/templates/patchwork/{ => partials}/download-buttons.html (100%)
 rename patchwork/templates/patchwork/{ => partials}/filters.html (100%)
 rename patchwork/templates/patchwork/{ => partials}/pagination.html (100%)
 rename patchwork/templates/patchwork/{ => partials}/patch-list.html (98%)

diff --git a/patchwork/templates/patchwork/bundle.html b/patchwork/templates/patchwork/bundle.html
index 2042cb96..b5c9f90a 100644
--- a/patchwork/templates/patchwork/bundle.html
+++ b/patchwork/templates/patchwork/bundle.html
@@ -40,6 +40,6 @@ project.</p>
 <div style="clear: both; padding: 1em;"></div>
 {% endif %}
 
-{% include "patchwork/patch-list.html" %}
+{% include "patchwork/partials/patch-list.html" %}
 
 {% endblock %}
diff --git a/patchwork/templates/patchwork/list.html b/patchwork/templates/patchwork/list.html
index 180c5607..5d3d82aa 100644
--- a/patchwork/templates/patchwork/list.html
+++ b/patchwork/templates/patchwork/list.html
@@ -18,6 +18,6 @@ while updating patches:</p>
 </ul>
 {% endif %}
 
-{% include "patchwork/patch-list.html" %}
+{% include "patchwork/partials/patch-list.html" %}
 
 {% endblock %}
diff --git a/patchwork/templates/patchwork/download-buttons.html b/patchwork/templates/patchwork/partials/download-buttons.html
similarity index 100%
rename from patchwork/templates/patchwork/download-buttons.html
rename to patchwork/templates/patchwork/partials/download-buttons.html
diff --git a/patchwork/templates/patchwork/filters.html b/patchwork/templates/patchwork/partials/filters.html
similarity index 100%
rename from patchwork/templates/patchwork/filters.html
rename to patchwork/templates/patchwork/partials/filters.html
diff --git a/patchwork/templates/patchwork/pagination.html b/patchwork/templates/patchwork/partials/pagination.html
similarity index 100%
rename from patchwork/templates/patchwork/pagination.html
rename to patchwork/templates/patchwork/partials/pagination.html
diff --git a/patchwork/templates/patchwork/patch-list.html b/patchwork/templates/patchwork/partials/patch-list.html
similarity index 98%
rename from patchwork/templates/patchwork/patch-list.html
rename to patchwork/templates/patchwork/partials/patch-list.html
index 71c1ba92..53d577de 100644
--- a/patchwork/templates/patchwork/patch-list.html
+++ b/patchwork/templates/patchwork/partials/patch-list.html
@@ -4,9 +4,9 @@
 {% load project %}
 {% load static %}
 
-{% include "patchwork/filters.html" %}
+{% include "patchwork/partials/filters.html" %}
 
-{% include "patchwork/pagination.html" %}
+{% include "patchwork/partials/pagination.html" %}
 
 {% if order.editable %}
 <table class="patchlist">
@@ -218,7 +218,7 @@ $(document).ready(function() {
 </table>
 
 {% if page.paginator.count %}
-{% include "patchwork/pagination.html" %}
+{% include "patchwork/partials/pagination.html" %}
 
 <div class="patchforms" id="patchforms">
 
diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html
index 6e189b27..eb5e3583 100644
--- a/patchwork/templates/patchwork/submission.html
+++ b/patchwork/templates/patchwork/submission.html
@@ -28,7 +28,7 @@ function toggle_div(link_id, headers_id)
 </script>
 
 <h1>{{ submission.name }}
-{% include "patchwork/download-buttons.html" %}
+{% include "patchwork/partials/download-buttons.html" %}
 </h1>
 
 <table class="patchmeta">
@@ -285,7 +285,7 @@ function toggle_div(link_id, headers_id)
 {% if submission.diff %}
 <h2>
  Patch
- {% include "patchwork/download-buttons.html" %}
+ {% include "patchwork/partials/download-buttons.html" %}
 </h2>
 
 <div id="patch" class="patch">
diff --git a/patchwork/templates/patchwork/todo-list.html b/patchwork/templates/patchwork/todo-list.html
index 444baa01..1ec2713d 100644
--- a/patchwork/templates/patchwork/todo-list.html
+++ b/patchwork/templates/patchwork/todo-list.html
@@ -12,6 +12,6 @@ are in an "action required" state
 ({% for state in action_required_states %}{% if forloop.last and not forloop.first %} or {% endif %}{{ state }}{% if not forloop.last and not forloop.first %}, {%endif %}{% endfor %}), and are not archived.
 </p>
 
-{% include "patchwork/patch-list.html" %}
+{% include "patchwork/partials/patch-list.html" %}
 
 {% endblock %}
-- 
2.17.1



More information about the Patchwork mailing list