diff options
Diffstat (limited to 'templates/web/base/admin')
-rw-r--r-- | templates/web/base/admin/bodies.html | 4 | ||||
-rw-r--r-- | templates/web/base/admin/body-form.html | 2 | ||||
-rw-r--r-- | templates/web/base/admin/body.html | 4 | ||||
-rw-r--r-- | templates/web/base/admin/category-checkboxes.html | 2 | ||||
-rw-r--r-- | templates/web/base/admin/config_page.html | 4 | ||||
-rw-r--r-- | templates/web/base/admin/index.html | 4 | ||||
-rw-r--r-- | templates/web/base/admin/list_updates.html | 6 | ||||
-rw-r--r-- | templates/web/base/admin/open311-form-fields.html | 119 | ||||
-rw-r--r-- | templates/web/base/admin/problem_row.html | 6 | ||||
-rw-r--r-- | templates/web/base/admin/report-category.html | 6 | ||||
-rw-r--r-- | templates/web/base/admin/report_edit.html | 12 | ||||
-rw-r--r-- | templates/web/base/admin/stats/index.html | 3 | ||||
-rw-r--r-- | templates/web/base/admin/template_edit.html | 22 | ||||
-rw-r--r-- | templates/web/base/admin/templates.html | 5 | ||||
-rw-r--r-- | templates/web/base/admin/update_edit.html | 3 | ||||
-rw-r--r-- | templates/web/base/admin/user_import.html | 76 |
16 files changed, 227 insertions, 51 deletions
diff --git a/templates/web/base/admin/bodies.html b/templates/web/base/admin/bodies.html index 9bd85940b..9f4b81340 100644 --- a/templates/web/base/admin/bodies.html +++ b/templates/web/base/admin/bodies.html @@ -16,11 +16,11 @@ [% IF c.config.STAGING_SITE and !c.config.STAGING_FLAGS.send_reports %] <p class="fms-admin-warning"> - [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %] + [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='https://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %] </p> [% END %] - <table cellspacing="0" cellpadding="2" border="1"> + <table cellspacing="0" cellpadding="2" border="1" id="admin_bodies"> <tr> <th>[% loc('Name') %]</th> [% IF c.cobrand.moniker == 'zurich' %] diff --git a/templates/web/base/admin/body-form.html b/templates/web/base/admin/body-form.html index 54445a282..958ea5d78 100644 --- a/templates/web/base/admin/body-form.html +++ b/templates/web/base/admin/body-form.html @@ -70,7 +70,7 @@ your config file is not pointing to a live MapIt service.") %] [% END %] <br> - [% loc("For more information, see <a href='http://fixmystreet.org/customising/fms_and_mapit' class='admin-offsite-link'>How FixMyStreet uses Mapit</a>.")%] + [% loc("For more information, see <a href='https://fixmystreet.org/customising/fms_and_mapit' class='admin-offsite-link'>How FixMyStreet uses Mapit</a>.")%] </p> </div> <p> diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html index 7fa446f44..2d77f10ce 100644 --- a/templates/web/base/admin/body.html +++ b/templates/web/base/admin/body.html @@ -61,13 +61,13 @@ </p> [% ELSIF c.config.STAGING_SITE and !c.config.STAGING_FLAGS.send_reports %] <p class="fms-admin-warning"> - [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %] + [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='https://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %] </p> [% END %] <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <table cellspacing="0" cellpadding="2" border="1"> + <table cellspacing="0" cellpadding="2" border="1" id="admin_contacts"> <tr> <th>[% loc('Category') %]</th> <th>[% loc('State') %]</th> diff --git a/templates/web/base/admin/category-checkboxes.html b/templates/web/base/admin/category-checkboxes.html index 63acd4112..f2167e955 100644 --- a/templates/web/base/admin/category-checkboxes.html +++ b/templates/web/base/admin/category-checkboxes.html @@ -9,7 +9,7 @@ </li> [% FOR contact IN contacts %] <li> - <label> + <label title="[% contact.email | html %]"> <input type="checkbox" name="contacts[[% contact.id %]]" [% 'checked' IF contact.active %]/> [% contact.category %] </label> diff --git a/templates/web/base/admin/config_page.html b/templates/web/base/admin/config_page.html index d448d2a63..8e8d562ff 100644 --- a/templates/web/base/admin/config_page.html +++ b/templates/web/base/admin/config_page.html @@ -139,7 +139,7 @@ running version <strong>[% git_version || 'unknown' %]</strong>. Other things can be changed on a cobrand basis by using functions in an (optional) Cobrand .pm module, as explained in the -<a href="http://fixmystreet.org/customising/" class="admin-offsite-link">customising section of our +<a href="https://fixmystreet.org/customising/" class="admin-offsite-link">customising section of our documentation</a>. If you wish to add new functionality just for your cobrand that can't be done simply by changes to your cobrand's templates, you might need to add a new Cobrand function. @@ -147,7 +147,7 @@ need to add a new Cobrand function. <p>Examples of cobrand functions are below; this is not exhaustive. Many were added for one specific cobrand, so didn't need a general configuration option. Please feel free to discuss on <a -href="http://fixmystreet.org/community/" class="admin-offsite-link">our mailing list</a> if you think +href="https://fixmystreet.org/community/" class="admin-offsite-link">our mailing list</a> if you think something should be moved to the general.yml file, done differently, or have any questions.</p> diff --git a/templates/web/base/admin/index.html b/templates/web/base/admin/index.html index 8498055b1..8691dbcf8 100644 --- a/templates/web/base/admin/index.html +++ b/templates/web/base/admin/index.html @@ -3,11 +3,11 @@ <div class="fms-admin-info fms-admin-floated"> This is the administration interface for [% site_name %]. If you -need any help or guidance, there is <a href="http://fixmystreet.org/">plenty of +need any help or guidance, there is <a href="https://fixmystreet.org/">plenty of online documentation</a>. The FixMyStreet Platform is <a href="https://github.com/mysociety/fixmystreet">actively supported</a> by its developers, and has a community of people using or working on the code. -Please <a href="http://fixmystreet.org/community/">sign up to the mailing list +Please <a href="https://fixmystreet.org/community/">sign up to the mailing list or get in touch</a> to let us know about your use of the FixMyStreet Platform, and to receive notices of updates. </div> diff --git a/templates/web/base/admin/list_updates.html b/templates/web/base/admin/list_updates.html index d759a2354..4b8b26d3c 100644 --- a/templates/web/base/admin/list_updates.html +++ b/templates/web/base/admin/list_updates.html @@ -39,7 +39,11 @@ <br>[% loc('Confirmed:') %] [% PROCESS format_time time=update.confirmed %] </small></td> <td>[% update.text | html %]</td> - <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> + <td> + [% IF c.user.has_permission_to('report_edit', update.problem.bodies_str_ids) %] + <a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a> + [% END %] + </td> </tr> [% END -%] </table> diff --git a/templates/web/base/admin/open311-form-fields.html b/templates/web/base/admin/open311-form-fields.html index d1067205c..b716cf175 100644 --- a/templates/web/base/admin/open311-form-fields.html +++ b/templates/web/base/admin/open311-form-fields.html @@ -49,6 +49,17 @@ </p> [% IF show_body_fields %] + <div class="admin-hint"> + <p> + [% loc( + "Enabling this will suppress the error message that is normally emitted when an update has no description" + ) %] + </p> + </div> + <p> + <input type="checkbox" id="blank_updates_permitted" name="blank_updates_permitted"[% ' checked' IF object.blank_updates_permitted %]> + <label for="blank_updates_permitted" class="inline">[% loc('Permit blank updates') %]</label> + </p> [%# These fields aren't shown for contacts %] <div class="admin-hint"> <p> @@ -65,48 +76,94 @@ <label for="send_comments" class="inline">[% loc('Use Open311 update-sending extension') %]</label> </p> - <div class="admin-hint"> - <p> - [% loc( - "If you've enabled Open311 update-sending above, you must identify which - FixMyStreet <strong>user</strong> will be attributed as the creator of those updates - when they are shown on the site. Enter the ID (number) of that user." - ) %] - </p> + <div class="admin-open311-section"> + <div class="admin-hint"> + <p> + [% loc( + "If you've enabled Open311 update-sending above, you must identify which + FixMyStreet <strong>user</strong> will be attributed as the creator of those updates + when they are shown on the site. Enter the ID (number) of that user." + ) %] + </p> + </div> + <p> + <label for"comment_user_id">[% loc('User ID to attribute fetched comments to') %]</label> + <input type="text" class="form-control" name="comment_user_id" value="[% object.comment_user_id %]"> + [% IF object.comment_user_id %] + <a href="[% c.uri_for('user_edit', object.comment_user_id) %]">[% loc('edit user') %]</a> + [% END %] + </p> + + <div class="admin-hint"> + <p> + [% loc( + "If you've enabled Open311 update-sending above, enable <strong>suppression of alerts</strong> + if you do <strong>not</strong> want that user to be notified whenever these updates are created." + ) %] + </p> + </div> + <p> + <input type="checkbox" id="suppress_alerts" name="suppress_alerts"[% ' checked' IF object.suppress_alerts %]> + <label for="suppress_alerts" class="inline">[% loc('Do not send email alerts on fetched comments to problem creator') %]</label> + </p> + + <div class="admin-hint"> + <p> + [% loc( + "If you've enabled Open311 update-sending above, Open311 usually only accepts OPEN or CLOSED status in + its updates. Enable <strong>extended Open311 stauses</strong> if you want to allow extra states to be passed. + Check that your cobrand supports this feature before switching it on." + ) %] + </p> + </div> + <p> + <input type="checkbox" id="send_extended_statuses" name="send_extended_statuses"[% ' checked' IF object.send_extended_statuses %]> + <label for="send_extended_statuses" class="inline">[% loc('Send extended Open311 statuses with service request updates') %]</label> + </p> </div> - <p> - <label for"comment_user_id">[% loc('User ID to attribute fetched comments to') %]</label> - <input type="text" class="form-control" name="comment_user_id" value="[% object.comment_user_id %]"> - [% IF object.comment_user_id %] - <a href="[% c.uri_for('user_edit', object.comment_user_id) %]">[% loc('edit user') %]</a> - [% END %] - </p> <div class="admin-hint"> <p> [% loc( - "If you've enabled Open311 update-sending above, enable <strong>suppression of alerts</strong> - if you do <strong>not</strong> want that user to be notified whenever these updates are created." + "Enable <strong>Open311 problem-fetching</strong> if you want to display reports created at + the endpoint to FixMyStreet. If you're not sure, you probably do not, so leave this unchecked. + For more information, see + <a href='https://www.mysociety.org/2013/02/20/open311-extended/' class='admin-offsite-link'>this article</a>." ) %] </p> </div> <p> - <input type="checkbox" id="suppress_alerts" name="suppress_alerts"[% ' checked' IF object.suppress_alerts %]> - <label for="suppress_alerts" class="inline">[% loc('Do not send email alerts on fetched comments to problem creator') %]</label> + <input type="checkbox" id="fetch_problems" name="fetch_problems"[% ' checked' IF object.fetch_problems %]> + <label for="fetch_problems" class="inline">[% loc('Use Open311 problem fetching') %]</label> </p> - <div class="admin-hint"> - <p> - [% loc( - "If you've enabled Open311 update-sending above, Open311 usually only accepts OPEN or CLOSED status in - its updates. Enable <strong>extended Open311 stauses</strong> if you want to allow extra states to be passed. - Check that your cobrand supports this feature before switching it on." - ) %] - </p> + <div class="admin-open311-section"> + <div class="admin-hint"> + <p> + [% loc( + "Enable <strong>Convert location from Easting/Northing</strong> if you've enabled Open311 problem-fetching above + and problems fetching from the endpoint have the location in Easting/Northings and not Latitude/Longitude." + ) %] + </p> + </div> + <p> + <input type="checkbox" id="convert_latlong" name="convert_latlong"[% ' checked' IF object.convert_latlong %]> + <label for="convert_latlong" class="inline">[% loc('Convert location from Easting/Northing') %]</label> + </p> + + <div class="admin-hint"> + <p> + [% loc( + "Enable <strong>Always fetch all problems</strong> if you've enabled Open311 problem-fetching above + and the endpoint always returns a list of all problems. This will suppress error messages about + bad dates in the problems fetched." + ) %] + </p> + </div> + <p> + <input type="checkbox" id="fetch_all_problems" name="fetch_all_problems"[% ' checked' IF object.get_extra_metadata('fetch_all_problems') %]> + <label for="fetch_all_problems" class="inline">[% loc('Always fetch all problems') %]</label> + </p> </div> - <p> - <input type="checkbox" id="send_extended_statuses" name="send_extended_statuses"[% ' checked' IF object.send_extended_statuses %]> - <label for="send_extended_statuses" class="inline">[% loc('Send extended Open311 statuses with service request updates') %]</label> - </p> [% END %] </div> diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html index 446e94d66..99142af4e 100644 --- a/templates/web/base/admin/problem_row.html +++ b/templates/web/base/admin/problem_row.html @@ -38,6 +38,10 @@ [%- IF problem.is_closed %]<br>[% prettify_state('closed') %]: [% PROCESS format_time time=problem.lastupdate %][% END -%] [%- IF problem.is_open %]<br>[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%] </small></td> - <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> + <td> + [% IF c.user.has_permission_to('report_edit', problem.bodies_str_ids) %] + <a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a> + [% END %] + </td> </tr> [%- END -%] diff --git a/templates/web/base/admin/report-category.html b/templates/web/base/admin/report-category.html index a2290089b..0416d71c0 100644 --- a/templates/web/base/admin/report-category.html +++ b/templates/web/base/admin/report-category.html @@ -4,10 +4,10 @@ <option selected value="[% problem.category | html %]">[% (problem.category_display OR '-') | html %]</option> </optgroup> [% END %] - [% IF category_options_copy.size %] + [% IF category_options.size %] <optgroup label="[% loc('Available categories') %]"> - [% FOREACH cat IN category_options_copy %] - <option value="[% cat.name | html %]"[% ' selected' IF problem.category == cat.name %]>[% cat.value | html %]</option> + [% FOREACH cat IN category_options %] + <option value="[% cat.category | html %]"[% ' selected' IF problem.category == cat.category %]>[% cat.category_display | html %]</option> [% END %] </optgroup> [% END %] diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index 911f4094e..10eb0eea1 100644 --- a/templates/web/base/admin/report_edit.html +++ b/templates/web/base/admin/report_edit.html @@ -1,4 +1,5 @@ [% + PROCESS "report/photo-js.html" IF problem.photo; PROCESS "maps/${map.type}.html" admin = 1; SET bodyclass = 'mappage with-notes'; INCLUDE 'admin/header.html' @@ -91,7 +92,6 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> <li>[% loc('Cobrand:') %] [% problem.cobrand %] <br><small>[% loc('Cobrand data:') %] [% cobrand_data OR '<em>' _ loc('None') _ '</em>' %]</small> </li> -<li>[% loc('Extra data:') %] [% problem.extra ? 'Yes' : 'No' %]</li> <li>[% loc('Going to send questionnaire?') %] [% IF problem.send_questionnaire %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</li> <li><label for="external_id">[% loc('External ID') %]:</label> @@ -101,6 +101,12 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> <li><label for="external_team">[% loc('External team') %]:</label> <input type="text" class="form-control" name="external_team" team="external_team" value="[% problem.external_team | html %]"> +[% IF problem.get_extra_metadata('external_status_code') %] +<li> + <label for="external_status_code">[% loc('External status code') %]:</label> + <span>[% problem.get_extra_metadata('external_status_code') %]</span> +</li> +[% END %] </ul> </div> @@ -119,6 +125,7 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> <li><label class="inline-text" for="category">[% loc('Category:') %]</label> [% INCLUDE 'admin/report-category.html' %] </li> +<li>[% loc('Extra data:') %] [% IF extra_fields.size %]<ul>[% FOREACH field IN extra_fields %]<li><strong>[% field.name %]</strong>: [% field.val %]</li>[% END %]</ul>[% ELSE %]No[% END %]</li> <li><label class="inline-text" for="anonymous">[% loc('Anonymous:') %]</label> <select class="form-control" name="anonymous" id="anonymous"> <option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option> @@ -165,6 +172,9 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> </li> [% END %] +<li><label class="inline-text" for="closed_updates">[% loc('Closed to updates') %]:</label> + <input type="checkbox" id="closed_updates" name="closed_updates"[% ' checked' IF problem.extra.closed_updates %]></li> + </ul> <input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]"> </form> diff --git a/templates/web/base/admin/stats/index.html b/templates/web/base/admin/stats/index.html index 6ea1ae403..d47054427 100644 --- a/templates/web/base/admin/stats/index.html +++ b/templates/web/base/admin/stats/index.html @@ -5,6 +5,9 @@ <li><a href="[% c.uri_for_action('admin/stats/state') %]">[% loc('Problem breakdown by state') %]</a></li> <li><a href="[% c.uri_for_action('admin/stats/fix_rate') %]">[% loc('Category fix rate for problems > 4 weeks old') %]</a></li> <li><a href="[% c.uri_for_action('dashboard/index') %]">[% loc('Summary statistics') %]</a></li> +[% IF c.cobrand.moniker == 'fixmystreet' %] +<li><a href="[% c.uri_for_action('admin/stats/refused') %]">Refused</a></li> +[% END %] </ul> [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html index 3e436dbf9..0cfd5406a 100644 --- a/templates/web/base/admin/template_edit.html +++ b/templates/web/base/admin/template_edit.html @@ -21,7 +21,7 @@ </div> <p> <strong>[% loc('Title:') %] </strong> - <input type="text" name="title" class="required form-control" size="30" value="[% rt.title| html %]"> + <input type="text" name="title" class="required form-control" size="30" value="[% rt.title | html %]"> </p> <div class="admin-hint"> @@ -31,7 +31,7 @@ </div> <p> <strong>[% loc('Text:') %] </strong> - <textarea class="form-control" name="text" class="required">[% rt.text |html %]</textarea> + <textarea class="form-control" name="text" class="required">[% rt.text | html %]</textarea> </p> <div class="admin-hint"> @@ -41,6 +41,9 @@ </div> [% INCLUDE 'admin/category-checkboxes.html' %] + [% IF errors.state %] + <div class="form-error">[% errors.state %]</div> + [% END %] <div class="admin-hint"> <p> [% loc('If you want to use this template to prefill the update field when changing a report’s state, select the state here.') %] @@ -48,7 +51,20 @@ </div> <p> <label for="state">[% loc('State') %]</label> - [% INCLUDE 'admin/state_groups_select.html' current_state=rt.state include_empty=1 %] + [% INCLUDE 'report/inspect/state_groups_select.html' current_state=rt.state include_empty=1 %] + </p> + + [% IF errors.external_status_code %] + <div class="form-error">[% errors.external_status_code %]</div> + [% END %] + <div class="admin-hint"> + <p> + [% loc('If you want to use this template to prefill the update field when a report’s <strong>external</strong> (e.g. Confirm) status code changes, enter the status code here.') %] + </p> + </div> + <p> + <label for="external_status_code">[% loc('External status code') %]</label> + <input type="text" name="external_status_code" class="form-control" size="30" value="[% rt.external_status_code | html %]"> </p> [% IF errors.auto_response %] diff --git a/templates/web/base/admin/templates.html b/templates/web/base/admin/templates.html index 444f2734d..21e4eea25 100644 --- a/templates/web/base/admin/templates.html +++ b/templates/web/base/admin/templates.html @@ -23,7 +23,10 @@ [% END %] [% END %] </td> - <td> [% t.state | html %] </td> + <td> + [% IF t.state %][% t.state | html %][% END %] + [% IF t.external_status_code %][% t.external_status_code | html %] (external)[% END %] + </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> diff --git a/templates/web/base/admin/update_edit.html b/templates/web/base/admin/update_edit.html index 34e64310f..cb420fc67 100644 --- a/templates/web/base/admin/update_edit.html +++ b/templates/web/base/admin/update_edit.html @@ -53,6 +53,9 @@ <li>[% loc('Cobrand:') %] [% update.cobrand %]</li> <li>[% loc('Cobrand data:') %] [% update.cobrand_data %]</li> <li>[% loc('Created:') %] [% PROCESS format_time time=update.created %]</li> +[% IF update.get_extra_metadata('external_status_code') %] +<li>[% loc('External status code:') %] [% update.get_extra_metadata('external_status_code') | html %]</li> +[% END %] [% IF update.photo %] <li> diff --git a/templates/web/base/admin/user_import.html b/templates/web/base/admin/user_import.html new file mode 100644 index 000000000..f866ed955 --- /dev/null +++ b/templates/web/base/admin/user_import.html @@ -0,0 +1,76 @@ +[% INCLUDE 'admin/header.html' title=loc("User Import") -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% status_message %] + +<form method="post" id="user_edit" action="[% c.uri_for( 'user_import' ) %]" enctype="multipart/form-data" accept-charset="utf-8"> + <input type="hidden" name="token" value="[% csrf_token %]" > + <input type="hidden" name="submit" value="1" > + + <p> + <label> + [% loc('CSV File') %] + <input type="file" name="csvfile" id="form_csvfile" /> + </label> + <input type="submit" class="btn" name="Import users" value="[% loc('Import users') %]" /> + </p> +</form> + +[% IF new_users %] + <h2>[% tprintf(loc('Created %d new users'), new_users.size ) %]</h2> + <table> + <tr> + <th>[% loc('Name') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Body') %]</th> + </tr> + [% FOREACH user IN new_users %] + <tr> + <td> + <a href="[% c.uri_for_action( 'admin/user_edit', user.id ) %]"> + [% user.name %] + </a> + </td> + <td>[% user.email %]</td> + <td>[% user.from_body.name %]</td> + </tr> + [% END %] + </table> +[% END %] + +[% IF existing_users %] + <h2>[% tprintf(loc("%d users already existed"), existing_users.size) %]</h2> + <p>[% loc("These users weren't updated.") %]</p> + <table> + <tr> + <th>[% loc('Name') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Body') %]</th> + </tr> + [% FOREACH user IN existing_users %] + <tr> + <td> + <a href="[% c.uri_for_action( 'admin/user_edit', user.id ) %]"> + [% user.name %] + </a> + </td> + <td>[% user.email %]</td> + <td>[% user.from_body.name %]</td> + </tr> + [% END %] + </table> +[% END %] + +<h2>[% loc('Usage notes') %]</h2> +<p>[% loc('This page is a quick way to create many new staff users in one go.') %]</p> +<p>[% loc("Existing users won't be modified.") %]</p> +<p> + [% loc("The uploaded CSV file must contain a header row, and records must have the following fields (in this order):") %] + <pre>name,email,from_body,permissions</pre> + <ul> + <li><code>from_body</code>: [% loc("the database id of the body to associate that user with, e.g. <code>2217</code> for Buckinghamshire.") %]</li> + <li><code>permissions</code>: [% loc("a colon-separated list of permissions to grant that user, e.g. <code>contribute_as_body:moderate:user_edit</code>.") %]</li> + </ul> +</p> + +[% INCLUDE 'admin/footer.html' %] |