aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base/admin')
-rw-r--r--templates/web/base/admin/_translations.html19
-rw-r--r--templates/web/base/admin/body-form.html2
-rw-r--r--templates/web/base/admin/body.html7
-rw-r--r--templates/web/base/admin/category-checkboxes.html2
-rw-r--r--templates/web/base/admin/category-multiselect.html2
-rw-r--r--templates/web/base/admin/contact-form.html4
-rw-r--r--templates/web/base/admin/council_contacts.txt2
-rw-r--r--templates/web/base/admin/defecttypes/list.html2
-rw-r--r--templates/web/base/admin/problem_row.html2
-rw-r--r--templates/web/base/admin/report-category.html8
-rw-r--r--templates/web/base/admin/responsepriorities/list.html2
11 files changed, 38 insertions, 14 deletions
diff --git a/templates/web/base/admin/_translations.html b/templates/web/base/admin/_translations.html
new file mode 100644
index 000000000..d2e0ba322
--- /dev/null
+++ b/templates/web/base/admin/_translations.html
@@ -0,0 +1,19 @@
+[% IF languages.size > 1 %]
+<h2>[% loc('Translations') %]</h2>
+ <input type="hidden" name="token" value="[% csrf_token %]" >
+<table>
+ <tr>
+ <th>[% loc('Language') %]</th>
+ <th>[% loc('Translation') %]</th>
+ </tr>
+ [% FOREACH language IN languages.keys %]
+ <tr>
+ <td>
+ <label for="translation_[% language %]">[% languages.$language.name %] ([% language %])</label>
+ <input type="hidden" name="translation_id_[% language %]" value="[% translations.$language.id %]">
+ </td>
+ <td><input type="text" name="translation_[% language %]" id="translation_[% language %]" value="[% translations.$language.msgstr %]"></td>
+ </tr>
+ [% END %]
+</table>
+[% END %]
diff --git a/templates/web/base/admin/body-form.html b/templates/web/base/admin/body-form.html
index 6c750bcaf..55d0e500c 100644
--- a/templates/web/base/admin/body-form.html
+++ b/templates/web/base/admin/body-form.html
@@ -25,6 +25,8 @@
<input type="text" class="form-control" name="name" id="name" value="[% body.name | html %]" size="50">
</p>
+ [% INCLUDE 'admin/_translations.html' %]
+
<div class="admin-hint">
<p>
[% loc(
diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html
index 82032c0c3..7fa446f44 100644
--- a/templates/web/base/admin/body.html
+++ b/templates/web/base/admin/body.html
@@ -79,7 +79,7 @@
</tr>
[% WHILE ( cat = contacts.next ) %]
<tr [% IF cat.state == 'deleted' %]class="is-deleted"[% END %]>
- <td class="contact-category"><a href="[% c.uri_for( 'body', body_id, cat.category ) %]">[% cat.category | html %]</a>
+ <td class="contact-category"><a href="[% c.uri_for( 'body', body_id, cat.category ) %]">[% cat.category_display | html %]</a>
<br>[% cat.email | html %]</td>
<td>
[% cat.state %]
@@ -130,9 +130,10 @@
<div class="fms-admin-warning">
[% errors.values.join('<br>') %]
</div>
+ [% INCLUDE 'admin/contact-form.html' translations=contact_translations %]
+ [% ELSE %]
+ [% INCLUDE 'admin/contact-form.html' translations={} %]
[% END %]
-
- [% INCLUDE 'admin/contact-form.html' %]
</div>
[% IF NOT errors and c.user.is_superuser %]
diff --git a/templates/web/base/admin/category-checkboxes.html b/templates/web/base/admin/category-checkboxes.html
index 63acd4112..9d5ab17ea 100644
--- a/templates/web/base/admin/category-checkboxes.html
+++ b/templates/web/base/admin/category-checkboxes.html
@@ -11,7 +11,7 @@
<li>
<label>
<input type="checkbox" name="contacts[[% contact.id %]]" [% 'checked' IF contact.active %]/>
- [% contact.category %]
+ [% contact.category_display %]
</label>
</li>
[% END %]
diff --git a/templates/web/base/admin/category-multiselect.html b/templates/web/base/admin/category-multiselect.html
index 98416204f..4e4eceeed 100644
--- a/templates/web/base/admin/category-multiselect.html
+++ b/templates/web/base/admin/category-multiselect.html
@@ -4,7 +4,7 @@
<p>
<select class="form-control js-multiple" name="categories" id="categories" multiple data-all="[% loc('All categories') %]">
[% FOR contact IN contacts %]
- <option value="[% contact.id %]" [% 'selected' IF contact.active %]>[% contact.category | html %]</option>
+ <option value="[% contact.id %]" [% 'selected' IF contact.active %]>[% contact.category_display | html %]</option>
[% END %]
</select>
</p>
diff --git a/templates/web/base/admin/contact-form.html b/templates/web/base/admin/contact-form.html
index 0694459cb..375b3eb99 100644
--- a/templates/web/base/admin/contact-form.html
+++ b/templates/web/base/admin/contact-form.html
@@ -2,7 +2,7 @@
[% IF contact.in_storage %]
<p>
- <h1>[% contact.category | html %]</h2>
+ <h1>[% contact.category_display | html %]</h1>
<input type="hidden" name="category" value="[% contact.category | html %]" >
</p>
[% ELSE %]
@@ -20,6 +20,8 @@
</p>
[% END %]
+ [% INCLUDE 'admin/_translations.html' %]
+
<div class="admin-hint">
<p>
[% loc("The <strong>email address</strong> is the destination to which reports about this category will be sent.
diff --git a/templates/web/base/admin/council_contacts.txt b/templates/web/base/admin/council_contacts.txt
index ffab83ab6..f11615789 100644
--- a/templates/web/base/admin/council_contacts.txt
+++ b/templates/web/base/admin/council_contacts.txt
@@ -1,4 +1,4 @@
[% WHILE ( contact = contacts.next ) -%]
[%- NEXT IF contact.state != 'confirmed' %]
-[% contact.category %] [% contact.email %]
+[% contact.category_display %] [% contact.email %]
[%- END %]
diff --git a/templates/web/base/admin/defecttypes/list.html b/templates/web/base/admin/defecttypes/list.html
index 783bd085c..ffff89eff 100644
--- a/templates/web/base/admin/defecttypes/list.html
+++ b/templates/web/base/admin/defecttypes/list.html
@@ -20,7 +20,7 @@
<em>[% ('All categories') %]</em>
[% ELSE %]
[% FOR contact IN d.contacts %]
- [% contact.category %][% ',' UNLESS loop.last %]
+ [% contact.category_display %][% ',' UNLESS loop.last %]
[% END %]
[% END %]
</td>
diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html
index e7e18dee9..def6ce60f 100644
--- a/templates/web/base/admin/problem_row.html
+++ b/templates/web/base/admin/problem_row.html
@@ -20,7 +20,7 @@
<br>[% loc('Anonymous') %]: [% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
</td>
<td>
- [% PROCESS value_or_nbsp value=problem.category %]
+ [% PROCESS value_or_nbsp value=problem.category_display %]
<br>[%- IF edit_body_contacts -%]
[% FOR body IN problem.bodies.values %]
<a href="[% c.uri_for('body', body.id ) %]">[% PROCESS value_or_nbsp value=body.name %]</a>
diff --git a/templates/web/base/admin/report-category.html b/templates/web/base/admin/report-category.html
index 1e39236d7..a2290089b 100644
--- a/templates/web/base/admin/report-category.html
+++ b/templates/web/base/admin/report-category.html
@@ -1,13 +1,13 @@
<select class="form-control" name="category" id="category">
[% IF NOT problem.category OR NOT categories_hash.${problem.category} %]
<optgroup label="[% loc('Existing category') %]">
- <option selected value="[% problem.category | html %]">[% (problem.category OR '-') | html %]</option>
+ <option selected value="[% problem.category | html %]">[% (problem.category_display OR '-') | html %]</option>
</optgroup>
[% END %]
- [% IF categories.size %]
+ [% IF category_options_copy.size %]
<optgroup label="[% loc('Available categories') %]">
- [% FOREACH cat IN categories %]
- <option[% ' selected' IF problem.category == cat %]>[% cat | html %]</option>
+ [% FOREACH cat IN category_options_copy %]
+ <option value="[% cat.name | html %]"[% ' selected' IF problem.category == cat.name %]>[% cat.value | html %]</option>
[% END %]
</optgroup>
[% END %]
diff --git a/templates/web/base/admin/responsepriorities/list.html b/templates/web/base/admin/responsepriorities/list.html
index 4c05ca14d..80d4e2cee 100644
--- a/templates/web/base/admin/responsepriorities/list.html
+++ b/templates/web/base/admin/responsepriorities/list.html
@@ -19,7 +19,7 @@
<em>[% loc('All categories') %]</em>
[% ELSE %]
[% FOR contact IN p.contacts %]
- [% contact.category %][% ',' UNLESS loop.last %]
+ [% contact.category_display %][% ',' UNLESS loop.last %]
[% END %]
[% END %]
</td>