diff options
-rw-r--r-- | templates/web/base/admin/template_edit.html | 31 | ||||
-rw-r--r-- | templates/web/base/admin/templates.html | 24 | ||||
-rw-r--r-- | templates/web/zurich/admin/templates.html | 28 |
3 files changed, 67 insertions, 16 deletions
diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html index 76de70dcc..2014ac2fb 100644 --- a/templates/web/base/admin/template_edit.html +++ b/templates/web/base/admin/template_edit.html @@ -9,20 +9,25 @@ accept-charset="utf-8" class="validate"> + <div class="admin-hint"> + <p> + [% loc('This is a <strong>private</strong> name for this template so you can identify it when updating reports or editing in the admin.') %] + </p> + </div> <p> <strong>[% loc('Title:') %] </strong> <input type="text" name="title" class="required form-control" size="30" value="[% rt.title| html %]"> </p> + + <div class="admin-hint"> + <p> + [% loc('This is the <strong>public</strong> text that will be shown on the site.') %] + </p> + </div> <p> <strong>[% loc('Text:') %] </strong> <textarea class="form-control" name="text" class="required">[% rt.text |html %]</textarea> </p> - <p> - <label> - <strong>[% loc('Auto-response:') %]</strong> - <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] /> - </label> - </p> <div class="admin-hint"> <p> @@ -41,13 +46,25 @@ [% INCLUDE 'admin/state_groups_select.html' current_state=rt.state include_empty=1 %] </p> + <div class="admin-hint"> + <p> + [% loc('If ticked, this template will be used for Open311 updates that put problems in this state.') %] + </p> + </div> + <p> + <label> + <strong>[% loc('Auto-response:') %]</strong> + <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] /> + </label> + </p> + <p> <input type="hidden" name="token" value="[% csrf_token %]" > <input type="submit" class="btn" name="Edit templates" value="[% rt.id ? loc('Save changes') : loc('Create template') %]" > </p> [% IF rt.id %] <p> - <input class="delete btn-danger" type="submit" name="delete_template" value="[% loc('Delete template') %]"> + <input class="delete btn-danger" type="submit" name="delete_template" value="[% loc('Delete template') %]" data-confirm="[% loc('Are you sure?') %]"> </p> [% END %] </form> diff --git a/templates/web/base/admin/templates.html b/templates/web/base/admin/templates.html index f9dda7a4c..444f2734d 100644 --- a/templates/web/base/admin/templates.html +++ b/templates/web/base/admin/templates.html @@ -1,24 +1,30 @@ [% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%] -[% IF c.cobrand.moniker == 'zurich' %] - <h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2> -[% END %] - <table> <thead> <tr> <th> [% loc('Title') %] </th> - <th> [% loc('Text') %] </th> - <th> [% loc('Created') %] </th> + <th> [% loc('Categories') %] </th> + <th> [% loc('State') %] </th> + <th> [% loc('Auto Response') %] </th> <th> </th> </tr> </thead> <tbody> [% FOR t IN response_templates %] <tr> - <td> [% t.title %] </td> - <td> [% t.text %] </td> - <td> [% t.created %] </td> + <td> [% t.title | html %] </td> + <td> + [% UNLESS t.contacts.size %] + <em>[% loc('All categories') %]</em> + [% ELSE %] + [% FOR contact IN t.contacts %] + [% contact.category_display %][% ',' UNLESS loop.last %] + [% END %] + [% END %] + </td> + <td> [% t.state | html %] </td> + <td> [% IF t.auto_response %]X[% END %] </td> <td> <a href="[% c.uri_for('templates', body.id, t.id) %]" class="btn">[% loc('Edit') %]</a> </td> </tr> [% END %] diff --git a/templates/web/zurich/admin/templates.html b/templates/web/zurich/admin/templates.html new file mode 100644 index 000000000..2db9e2e34 --- /dev/null +++ b/templates/web/zurich/admin/templates.html @@ -0,0 +1,28 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%] + +<h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2> + +<table> + <thead> + <tr> + <th> [% loc('Title') %] </th> + <th> [% loc('Text') %] </th> + <th> [% loc('Created') %] </th> + <th> </th> + </tr> + </thead> + <tbody> +[% FOR t IN response_templates %] + <tr> + <td> [% t.title %] </td> + <td> [% t.text %] </td> + <td> [% t.created %] </td> + <td> <a href="[% c.uri_for('templates', body.id, t.id) %]" class="btn">[% loc('Edit') %]</a> </td> + </tr> +[% END %] + </tbody> +</table> + +<a href="[% c.uri_for('templates', body.id, 'new') %]" class="btn">[% loc('New template') %]</a> + +[% INCLUDE 'admin/footer.html' %] |