aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin_censor_rule/_form.rhtml2
-rw-r--r--app/views/admin_public_body/import_csv.rhtml33
2 files changed, 22 insertions, 13 deletions
diff --git a/app/views/admin_censor_rule/_form.rhtml b/app/views/admin_censor_rule/_form.rhtml
index d8a8f05d7..ac43de704 100644
--- a/app/views/admin_censor_rule/_form.rhtml
+++ b/app/views/admin_censor_rule/_form.rhtml
@@ -35,4 +35,6 @@ things by individual request or by user by adding the censor rule from the
appropriate page. If you need to redact across a whole
authority, it will be easy enough to make code changes to add it, so do ask.
</p>
+<p><strong>Regexp rules that are hard to process will really slow down request display.</strong> Please only use regexps if you really need to.
+</p>
diff --git a/app/views/admin_public_body/import_csv.rhtml b/app/views/admin_public_body/import_csv.rhtml
index fd652b370..4a03d0665 100644
--- a/app/views/admin_public_body/import_csv.rhtml
+++ b/app/views/admin_public_body/import_csv.rhtml
@@ -9,32 +9,39 @@
<pre id="error"><%=@errors %></pre>
<% end %>
-
<% form_tag 'import_csv', :multipart => true do %>
<p>
- <label for="csv_file">CSV file:</label>
- <%= file_field_tag :csv_file, :size => 40 %>
+ <% if @original_csv_file && @temporary_csv_file %>
+ CSV file:
+ <%= @original_csv_file %>
+ <%= hidden_field_tag :original_csv_file, @original_csv_file %>
+ <%= hidden_field_tag :temporary_csv_file, @temporary_csv_file %>
+ <%= link_to 'Clear current file', 'import_csv', :class => "btn btn-warning" %>
+ <% else %>
+ <label for="csv_file">CSV file:</label>
+ <%= file_field_tag :csv_file, :size => 40 %>
+ <% end %>
</p>
-
+
<p>
<label for="tag">Optional: Tag to add entries to / alter entries for:</label>
<%= text_field_tag 'tag', params[:tag] %>
</p>
-
+
<p>
<label for="tag_behaviour">What to do with existing tags?</label>
- <%= select_tag 'tag_behaviour',
+ <%= select_tag 'tag_behaviour',
"<option value='add' selected>Add new tags to existing ones</option>
- <option value='replace'>Replace existing tags with new ones</option>"
+ <option value='replace'>Replace existing tags with new ones</option>"
%>
</p>
- <p><strong>CSV file format:</strong> A first row with the list of fields,
+ <p><strong>CSV file format:</strong> A first row with the list of fields,
starting with '#', is optional but highly recommended. The fields 'name'
and 'request_email' are required; additionally, translated values are supported by
adding the locale name to the field name, e.g. 'name.es', 'name.de'... Example:
</p>
-
+
<blockquote>
<p>
&#35;id,name,request_email,name.es,tag_string<br/>
@@ -43,16 +50,16 @@
<p>
</blockquote>
- <p>Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n),
+ <p>Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n),
publication_scheme (i18n), home_page, tag_string (tags separated by spaces).</p>
-
+
<p><strong>Note:</strong> Choose <strong>dry run</strong> to test, without
actually altering the database. Choose <strong>upload</strong> to actually
make the changes. In either case, you will be shown any errors, or details
of the changes. When uploading, any changes since last import will be
overwritten - e.g. email addresses changed back.
</p>
-
+
<p><strong>Note:</strong> The import tag will also be added to the imported bodies
if no tags are provided in the CSV file or if the import mode is set to
"Add new tags to existing ones".
@@ -63,7 +70,7 @@
<hr>
-<p>Standard tags:
+<p>Standard tags:
<% for category, description in PublicBodyCategories::get().by_tag() %>
<% if category != "other" %>
<strong><%= category %></strong>=<%= description %>;