aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/zurich/admin/_index_table.html20
-rw-r--r--templates/web/zurich/admin/index-dm.html27
-rw-r--r--templates/web/zurich/admin/index-sdm.html26
-rw-r--r--templates/web/zurich/admin/reports/index.html17
4 files changed, 28 insertions, 62 deletions
diff --git a/templates/web/zurich/admin/_index_table.html b/templates/web/zurich/admin/_index_table.html
new file mode 100644
index 000000000..d523f4a20
--- /dev/null
+++ b/templates/web/zurich/admin/_index_table.html
@@ -0,0 +1,20 @@
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Description') %]</th>
+ [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
+ <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
+ [% END %]
+ [% IF include_subdiv %]
+ <th>[% loc('Subdivision/Body') %]</th>
+ [% END %]
+ <th>[% loc('Photo') %]</th>
+ [% IF NOT no_edit %]
+ <th class='edit'>*</th>
+ [% END %]
+ </tr>
+ <tr class="filter-row">
+ <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
+ </tr>
+[% INCLUDE 'admin/problem_row.html' %]
+</table>
diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html
index 39fa34dcb..eb791e8d2 100644
--- a/templates/web/zurich/admin/index-dm.html
+++ b/templates/web/zurich/admin/index-dm.html
@@ -6,34 +6,13 @@
</div>
<h2 id="submitted">[% loc('Submitted') %]</h2>
-[% INCLUDE list, problems = submitted.all, hash = 'submitted' %]
+[% INCLUDE 'admin/_index_table.html' problems=submitted.all hash='submitted' %]
<h2 id="feedback_pending">Rückmeldung ausstehend</h2>
-[% INCLUDE list, problems = approval.all, hash = 'feedback_pending' %]
+[% INCLUDE 'admin/_index_table.html' problems=approval.all hash='feedback_pending' %]
<h2 id="alle">[% loc('All reports') %]</h2>
-[% INCLUDE list, problems = other.all, include_subdiv = 1, hash = 'alle' %]
+[% INCLUDE 'admin/_index_table.html' problems=other.all include_subdiv=1 hash='alle' %]
[% INCLUDE 'pagination.html', admin = 1, param = 'p', hash = 'alle' %]
[% INCLUDE 'admin/footer.html' %]
-
-[% BLOCK list %]
-<table cellspacing="0" cellpadding="2" border="1">
- <tr>
- <th>[% loc('ID') %]</th>
- <th>[% loc('Description') %]</th>
- [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
- <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
- [% END %]
- [% IF include_subdiv %]
- <th>[% loc('Subdivision/Body') %]</th>
- [% END %]
- <th>[% loc('Photo') %]</th>
- <th class='edit'>*</th>
- </tr>
- <tr class="filter-row">
- <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
- </tr>
-[% INCLUDE 'admin/problem_row.html' %]
-</table>
-[% END %]
diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html
index 68a2fcf62..6155f6a39 100644
--- a/templates/web/zurich/admin/index-sdm.html
+++ b/templates/web/zurich/admin/index-sdm.html
@@ -2,33 +2,13 @@
[% PROCESS 'admin/report_blocks.html' %]
<h2 id="new">[% loc('New reports') %]</h2>
-[% INCLUDE list, problems = reports_new.all, hash = 'new' %]
+[% INCLUDE 'admin/_index_table.html' problems=reports_new.all hash='new' %]
<h2 id="wait">[% loc('Reports awaiting approval') %]</h2>
-[% INCLUDE list, problems = reports_unpublished.all, hash = 'wait' %]
+[% INCLUDE 'admin/_index_table.html' problems=reports_unpublished.all hash='wait' %]
<h2 id="alle">[% loc('Reports published') %]</h2>
-[% INCLUDE list, problems = reports_published.all, no_edit = 1, hash = 'alle' %]
+[% INCLUDE 'admin/_index_table.html' problems=reports_published.all no_edit=1 hash='alle' %]
[% INCLUDE 'pagination.html', admin = 1, param = 'p', hash = 'alle' %]
[% INCLUDE 'admin/footer.html' %]
-
-[% BLOCK list %]
-<table cellspacing="0" cellpadding="2" border="1">
- <tr>
- <th>[% loc('ID') %]</th>
- <th>[% loc('Description') %]</th>
- [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
- <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
- [% END %]
- <th>[% loc('Photo') %]</th>
- [% IF NOT no_edit %]
- <th class='edit'>*</th>
- [% END %]
- </tr>
- <tr class="filter-row">
- <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
- </tr>
-[% INCLUDE 'admin/problem_row.html' %]
-</table>
-[% END %]
diff --git a/templates/web/zurich/admin/reports/index.html b/templates/web/zurich/admin/reports/index.html
index 481dfb49d..ecb7c9519 100644
--- a/templates/web/zurich/admin/reports/index.html
+++ b/templates/web/zurich/admin/reports/index.html
@@ -6,21 +6,8 @@
</form>
[% IF problems.size %]
-<table cellspacing="0" cellpadding="2" border="1">
- <tr>
- <th>[% loc('ID') %]</th>
- <th>[% loc('Description') %]</th>
- [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
- <th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
- [% END %]
- <th>[% loc('Photo') %]</th>
- <th class='edit'>*</th>
- </tr>
- [% INCLUDE 'admin/problem_row.html' %]
-</table>
-
-[% INCLUDE 'pagination.html', admin = 1, param = 'p', pager = problems_pager %]
-
+ [% PROCESS 'admin/_index_table.html' %]
+ [% INCLUDE 'pagination.html', admin = 1, param = 'p', pager = problems_pager %]
[% END %]
[% INCLUDE 'admin/list_updates.html' %]