From 835b51c1de0d49e652fe9c9a60f0974275de070c Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Wed, 27 Feb 2013 10:34:47 +1100 Subject: Rename ALL THE TEMPLATES!!1!!!one!!1!! .rhtml is deprecated in favour of .erb in Rails 3 --- app/views/admin_censor_rule/_form.html.erb | 40 ++++++++++++++++++++++++++++++ app/views/admin_censor_rule/_form.rhtml | 40 ------------------------------ app/views/admin_censor_rule/_show.html.erb | 39 +++++++++++++++++++++++++++++ app/views/admin_censor_rule/_show.rhtml | 39 ----------------------------- app/views/admin_censor_rule/edit.html.erb | 16 ++++++++++++ app/views/admin_censor_rule/edit.rhtml | 16 ------------ app/views/admin_censor_rule/new.html.erb | 9 +++++++ app/views/admin_censor_rule/new.rhtml | 9 ------- 8 files changed, 104 insertions(+), 104 deletions(-) create mode 100644 app/views/admin_censor_rule/_form.html.erb delete mode 100644 app/views/admin_censor_rule/_form.rhtml create mode 100644 app/views/admin_censor_rule/_show.html.erb delete mode 100644 app/views/admin_censor_rule/_show.rhtml create mode 100644 app/views/admin_censor_rule/edit.html.erb delete mode 100644 app/views/admin_censor_rule/edit.rhtml create mode 100644 app/views/admin_censor_rule/new.html.erb delete mode 100644 app/views/admin_censor_rule/new.rhtml (limited to 'app/views/admin_censor_rule') diff --git a/app/views/admin_censor_rule/_form.html.erb b/app/views/admin_censor_rule/_form.html.erb new file mode 100644 index 000000000..ac43de704 --- /dev/null +++ b/app/views/admin_censor_rule/_form.html.erb @@ -0,0 +1,40 @@ +<%= error_messages_for 'censor_rule' %> + +

Applies to: + <% if !info_request.nil? %> + <%=request_both_links(info_request)%> request + <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %> + <% end %> + <% if !user.nil? %> + <%=user_both_links(user)%> user + <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %> + <% end %> +

+ +

(Leave unchecked if you are not sure about this)
+<%= check_box 'censor_rule', 'regexp' %>

+ +

(that you want to remove, case sensitive)
+<%= text_field 'censor_rule', 'text', :size => 60 %>

+ +

(put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's)
+<%= text_field 'censor_rule', 'replacement', :size => 60 %>

+ +

(put purpose of the rule, and why the change)
+<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60 %>

+ +

Warning and notes: This does replace text in binary files, but for +most formats only in a naive way. It works well on surprisingly many Word documents. Notably +it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code +which works on some PDFs. Please carefully check all attachments have +changed in the way you expect, and haven't become corrupted. +

+ +

You may need to manually rebuild the search index afterwards. You can redact +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. +

+

Regexp rules that are hard to process will really slow down request display. Please only use regexps if you really need to. +

+ diff --git a/app/views/admin_censor_rule/_form.rhtml b/app/views/admin_censor_rule/_form.rhtml deleted file mode 100644 index ac43de704..000000000 --- a/app/views/admin_censor_rule/_form.rhtml +++ /dev/null @@ -1,40 +0,0 @@ -<%= error_messages_for 'censor_rule' %> - -

Applies to: - <% if !info_request.nil? %> - <%=request_both_links(info_request)%> request - <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %> - <% end %> - <% if !user.nil? %> - <%=user_both_links(user)%> user - <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %> - <% end %> -

- -

(Leave unchecked if you are not sure about this)
-<%= check_box 'censor_rule', 'regexp' %>

- -

(that you want to remove, case sensitive)
-<%= text_field 'censor_rule', 'text', :size => 60 %>

- -

(put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's)
-<%= text_field 'censor_rule', 'replacement', :size => 60 %>

- -

(put purpose of the rule, and why the change)
-<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60 %>

- -

Warning and notes: This does replace text in binary files, but for -most formats only in a naive way. It works well on surprisingly many Word documents. Notably -it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code -which works on some PDFs. Please carefully check all attachments have -changed in the way you expect, and haven't become corrupted. -

- -

You may need to manually rebuild the search index afterwards. You can redact -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. -

-

Regexp rules that are hard to process will really slow down request display. Please only use regexps if you really need to. -

- diff --git a/app/views/admin_censor_rule/_show.html.erb b/app/views/admin_censor_rule/_show.html.erb new file mode 100644 index 000000000..363c3fb6f --- /dev/null +++ b/app/views/admin_censor_rule/_show.html.erb @@ -0,0 +1,39 @@ + +<% if censor_rules.size > 0 %> + + + + <% for column in CensorRule.content_columns %> + + <% end %> + + + + <% for censor_rule in censor_rules %> + + + <% for column in CensorRule.content_columns.map { |c| c.name } %> + + <% end %> + + + <% end %> +
Id<%= column.human_name %>Actions
<%=h censor_rule.id %><%=h censor_rule.send(column) %> + <%= link_to "Edit", '../../censor/edit/' + censor_rule.id.to_s %> +
+<% else %> +

None yet.

+<% end %> + +<% if defined? info_request %> +

+ <%= link_to "New censor rule", '../../censor/new?info_request_id=' + info_request.id.to_s %> (for this request only) +

+<% end %> + +<% if defined? user %> +

+ <%= link_to "New censor rule", '../../censor/new?user_id=' + user.id.to_s %> (for all requests by this user) +

+<% end %> + diff --git a/app/views/admin_censor_rule/_show.rhtml b/app/views/admin_censor_rule/_show.rhtml deleted file mode 100644 index 363c3fb6f..000000000 --- a/app/views/admin_censor_rule/_show.rhtml +++ /dev/null @@ -1,39 +0,0 @@ - -<% if censor_rules.size > 0 %> - - - - <% for column in CensorRule.content_columns %> - - <% end %> - - - - <% for censor_rule in censor_rules %> - - - <% for column in CensorRule.content_columns.map { |c| c.name } %> - - <% end %> - - - <% end %> -
Id<%= column.human_name %>Actions
<%=h censor_rule.id %><%=h censor_rule.send(column) %> - <%= link_to "Edit", '../../censor/edit/' + censor_rule.id.to_s %> -
-<% else %> -

None yet.

-<% end %> - -<% if defined? info_request %> -

- <%= link_to "New censor rule", '../../censor/new?info_request_id=' + info_request.id.to_s %> (for this request only) -

-<% end %> - -<% if defined? user %> -

- <%= link_to "New censor rule", '../../censor/new?user_id=' + user.id.to_s %> (for all requests by this user) -

-<% end %> - diff --git a/app/views/admin_censor_rule/edit.html.erb b/app/views/admin_censor_rule/edit.html.erb new file mode 100644 index 000000000..844908418 --- /dev/null +++ b/app/views/admin_censor_rule/edit.html.erb @@ -0,0 +1,16 @@ +<% @title = 'Edit censor rule' %> + +

<%=@title%>

+ +<%= form_tag '../update/' + @censor_rule.id.to_s do %> + <%= render :partial => 'form', :locals => { :info_request => @censor_rule.info_request, :user => @censor_rule.user } %> +

<%= submit_tag 'Save', :accesskey => 's' %>

+<% end %> + +<%= form_tag('../destroy/' + @censor_rule.id.to_s) do %> +

+ <%= hidden_field_tag(:censor_rule_id, @censor_rule.id) %> + Permanent! --> <%= submit_tag "Destroy rule" %> +

+<% end %> + diff --git a/app/views/admin_censor_rule/edit.rhtml b/app/views/admin_censor_rule/edit.rhtml deleted file mode 100644 index 844908418..000000000 --- a/app/views/admin_censor_rule/edit.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% @title = 'Edit censor rule' %> - -

<%=@title%>

- -<%= form_tag '../update/' + @censor_rule.id.to_s do %> - <%= render :partial => 'form', :locals => { :info_request => @censor_rule.info_request, :user => @censor_rule.user } %> -

<%= submit_tag 'Save', :accesskey => 's' %>

-<% end %> - -<%= form_tag('../destroy/' + @censor_rule.id.to_s) do %> -

- <%= hidden_field_tag(:censor_rule_id, @censor_rule.id) %> - Permanent! --> <%= submit_tag "Destroy rule" %> -

-<% end %> - diff --git a/app/views/admin_censor_rule/new.html.erb b/app/views/admin_censor_rule/new.html.erb new file mode 100644 index 000000000..ad3bf7e8e --- /dev/null +++ b/app/views/admin_censor_rule/new.html.erb @@ -0,0 +1,9 @@ +<% @title = 'New censor rule' %> + +

<%=@title%>

+ +<%= form_tag 'create' do %> + <%= render :partial => 'form', :locals => { :info_request => @info_request, :user => @user } %> +

<%= submit_tag "Create" %>

+<% end %> + diff --git a/app/views/admin_censor_rule/new.rhtml b/app/views/admin_censor_rule/new.rhtml deleted file mode 100644 index ad3bf7e8e..000000000 --- a/app/views/admin_censor_rule/new.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -<% @title = 'New censor rule' %> - -

<%=@title%>

- -<%= form_tag 'create' do %> - <%= render :partial => 'form', :locals => { :info_request => @info_request, :user => @user } %> -

<%= submit_tag "Create" %>

-<% end %> - -- cgit v1.2.3