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_general/_admin_navbar.html.erb | 1 +
app/views/admin_general/_admin_navbar.rhtml | 1 -
app/views/admin_general/debug.html.erb | 52 ++++++++++++
app/views/admin_general/debug.rhtml | 52 ------------
app/views/admin_general/index.html.erb | 109 +++++++++++++++++++++++++
app/views/admin_general/index.rhtml | 109 -------------------------
app/views/admin_general/stats.html.erb | 38 +++++++++
app/views/admin_general/stats.rhtml | 38 ---------
app/views/admin_general/timeline.html.erb | 99 ++++++++++++++++++++++
app/views/admin_general/timeline.rhtml | 99 ----------------------
10 files changed, 299 insertions(+), 299 deletions(-)
create mode 100644 app/views/admin_general/_admin_navbar.html.erb
delete mode 100644 app/views/admin_general/_admin_navbar.rhtml
create mode 100644 app/views/admin_general/debug.html.erb
delete mode 100644 app/views/admin_general/debug.rhtml
create mode 100644 app/views/admin_general/index.html.erb
delete mode 100644 app/views/admin_general/index.rhtml
create mode 100644 app/views/admin_general/stats.html.erb
delete mode 100644 app/views/admin_general/stats.rhtml
create mode 100644 app/views/admin_general/timeline.html.erb
delete mode 100644 app/views/admin_general/timeline.rhtml
(limited to 'app/views/admin_general')
diff --git a/app/views/admin_general/_admin_navbar.html.erb b/app/views/admin_general/_admin_navbar.html.erb
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/app/views/admin_general/_admin_navbar.html.erb
@@ -0,0 +1 @@
+
diff --git a/app/views/admin_general/_admin_navbar.rhtml b/app/views/admin_general/_admin_navbar.rhtml
deleted file mode 100644
index 8b1378917..000000000
--- a/app/views/admin_general/_admin_navbar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/app/views/admin_general/debug.html.erb b/app/views/admin_general/debug.html.erb
new file mode 100644
index 000000000..b0749bedb
--- /dev/null
+++ b/app/views/admin_general/debug.html.erb
@@ -0,0 +1,52 @@
+<% @title = "Debug" %>
+
+<%=@title%>
+
+You are <%= h @admin_current_user %>
+
+Version numbers
+
+
+Alaveteli version: <%= link_to @current_version, @github_origin + @current_version %>
+
+Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>
+
+Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>
+
+RUBY_VERSION <%=h RUBY_VERSION %>
+
+Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>
+
+TMail::VERSION::STRING <%=h TMail::VERSION::STRING%>
+
+Xapian::version_string <%=h Xapian::version_string%>
+
+
+Configuration
+
+environment: <%=h Rails::configuration.environment %>
+
environment_path: <%=h Rails::configuration.environment_path %>
+
framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %>
+
+
+Environment variables
+
+<% for k,v in @request_env %>
+ <%=h k%> | <%=h v%> |
+<% end %>
+
+
+Parameters
+
+<% for k,v in params %>
+ <%=h k%> | <%=h v%> |
+<% end %>
+
+
+Session
+
+<% for k,v in session %>
+ <%=h k%> | <%=h v%> |
+<% end %>
+
+
diff --git a/app/views/admin_general/debug.rhtml b/app/views/admin_general/debug.rhtml
deleted file mode 100644
index b0749bedb..000000000
--- a/app/views/admin_general/debug.rhtml
+++ /dev/null
@@ -1,52 +0,0 @@
-<% @title = "Debug" %>
-
-<%=@title%>
-
-You are <%= h @admin_current_user %>
-
-Version numbers
-
-
-Alaveteli version: <%= link_to @current_version, @github_origin + @current_version %>
-
-Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>
-
-Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>
-
-RUBY_VERSION <%=h RUBY_VERSION %>
-
-Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>
-
-TMail::VERSION::STRING <%=h TMail::VERSION::STRING%>
-
-Xapian::version_string <%=h Xapian::version_string%>
-
-
-Configuration
-
-environment: <%=h Rails::configuration.environment %>
-
environment_path: <%=h Rails::configuration.environment_path %>
-
framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %>
-
-
-Environment variables
-
-<% for k,v in @request_env %>
- <%=h k%> | <%=h v%> |
-<% end %>
-
-
-Parameters
-
-<% for k,v in params %>
- <%=h k%> | <%=h v%> |
-<% end %>
-
-
-Session
-
-<% for k,v in session %>
- <%=h k%> | <%=h v%> |
-<% end %>
-
-
diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb
new file mode 100644
index 000000000..48bd7f694
--- /dev/null
+++ b/app/views/admin_general/index.html.erb
@@ -0,0 +1,109 @@
+<% @title = "Summary" %>
+
+<%=@title%>
+
+
+- <%=@public_body_count%> public authorities
+- <%=@info_request_count%> requests, <%=@outgoing_message_count%> outgoing messages,
+ <%=@incoming_message_count%> incoming messages
+
+- <%=@user_count%> users, <%=@track_thing_count%> tracked things
+- <%=@comment_count%> annotations
+
+
+
+
+Things to do
+
+<% if @holding_pen_messages.size > 0 %>
+ Put misdelivered responses with the right request (<%=@holding_pen_messages.size%> total)
+
+
+ <% for message in @holding_pen_messages %>
+ -
+ <% if message.get_body_for_quoting.strip.size == 0 %>
+ <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %>
+ <% else %>
+ <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %>
+ <% end %>
+ (<%=simple_date(message.sent_at)%>)
+
+ <% end %>
+
+
+<% end %>
+
+<% if @error_message_requests.size > 0 %>
+ Fix these delivery and other errors (<%=@error_message_requests.size%> total)
+
+
+ <% for @request in @error_message_requests %>
+ -
+ <%= request_both_links(@request)%>
+ – <%=simple_date(@request.get_last_event.created_at)%>
+
+ <% end %>
+
+<% end %>
+
+<% if @attention_requests.size > 0 %>
+ Review requests which have been marked as requiring your attention by users (<%=@error_message_requests.size%> total)
+
+
+ <% for @request in @attention_requests %>
+ -
+ <%= request_both_links(@request)%>
+ – <%=simple_date(@request.get_last_event.created_at)%>
+
+ <% end %>
+
+<% end %>
+
+
+<% if @requires_admin_requests.size > 0 %>
+ These require administrator attention (<%=@requires_admin_requests.size%> total)
+
+
+ <% for @request in @requires_admin_requests %>
+ -
+ <%= request_both_links(@request)%>
+ – <%=simple_date(@request.get_last_event.created_at)%>
+
+ <% end %>
+
+<% end %>
+
+<% if @blank_contacts.size > 0 %>
+ Find missing FOI email for these public authorities (try phoning!) (<%=@blank_contacts.size%> total)
+
+ <% for @blank_contact in @blank_contacts %>
+ -
+ <%= public_body_both_links(@blank_contact)%>
+ – <%=simple_date(@blank_contact.updated_at)%>
+
+ <% end %>
+
+<% end %>
+
+<% if @old_unclassified.size > 0 %>
+ Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response
+
+
+ <% for @request in @old_unclassified %>
+ -
+ <%= request_both_links(@request) %>
+ – <%=simple_date(@request.get_last_response_event.created_at)%>
+
+ <% end %>
+
+
+ (<%= link_to "Full list", admin_url("unclassified") %>, or play public
+ <%= link_to "Categorisation game", main_url(play_url(:only_path => true)) %>)
+
+<% end %>
+
+<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %>
+ No pending administration required.
+<% end %>
+
+
diff --git a/app/views/admin_general/index.rhtml b/app/views/admin_general/index.rhtml
deleted file mode 100644
index 48bd7f694..000000000
--- a/app/views/admin_general/index.rhtml
+++ /dev/null
@@ -1,109 +0,0 @@
-<% @title = "Summary" %>
-
-<%=@title%>
-
-
-- <%=@public_body_count%> public authorities
-- <%=@info_request_count%> requests, <%=@outgoing_message_count%> outgoing messages,
- <%=@incoming_message_count%> incoming messages
-
-- <%=@user_count%> users, <%=@track_thing_count%> tracked things
-- <%=@comment_count%> annotations
-
-
-
-
-Things to do
-
-<% if @holding_pen_messages.size > 0 %>
- Put misdelivered responses with the right request (<%=@holding_pen_messages.size%> total)
-
-
- <% for message in @holding_pen_messages %>
- -
- <% if message.get_body_for_quoting.strip.size == 0 %>
- <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %>
- <% else %>
- <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %>
- <% end %>
- (<%=simple_date(message.sent_at)%>)
-
- <% end %>
-
-
-<% end %>
-
-<% if @error_message_requests.size > 0 %>
- Fix these delivery and other errors (<%=@error_message_requests.size%> total)
-
-
- <% for @request in @error_message_requests %>
- -
- <%= request_both_links(@request)%>
- – <%=simple_date(@request.get_last_event.created_at)%>
-
- <% end %>
-
-<% end %>
-
-<% if @attention_requests.size > 0 %>
- Review requests which have been marked as requiring your attention by users (<%=@error_message_requests.size%> total)
-
-
- <% for @request in @attention_requests %>
- -
- <%= request_both_links(@request)%>
- – <%=simple_date(@request.get_last_event.created_at)%>
-
- <% end %>
-
-<% end %>
-
-
-<% if @requires_admin_requests.size > 0 %>
- These require administrator attention (<%=@requires_admin_requests.size%> total)
-
-
- <% for @request in @requires_admin_requests %>
- -
- <%= request_both_links(@request)%>
- – <%=simple_date(@request.get_last_event.created_at)%>
-
- <% end %>
-
-<% end %>
-
-<% if @blank_contacts.size > 0 %>
- Find missing FOI email for these public authorities (try phoning!) (<%=@blank_contacts.size%> total)
-
- <% for @blank_contact in @blank_contacts %>
- -
- <%= public_body_both_links(@blank_contact)%>
- – <%=simple_date(@blank_contact.updated_at)%>
-
- <% end %>
-
-<% end %>
-
-<% if @old_unclassified.size > 0 %>
- Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response
-
-
- <% for @request in @old_unclassified %>
- -
- <%= request_both_links(@request) %>
- – <%=simple_date(@request.get_last_response_event.created_at)%>
-
- <% end %>
-
-
- (<%= link_to "Full list", admin_url("unclassified") %>, or play public
- <%= link_to "Categorisation game", main_url(play_url(:only_path => true)) %>)
-
-<% end %>
-
-<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %>
- No pending administration required.
-<% end %>
-
-
diff --git a/app/views/admin_general/stats.html.erb b/app/views/admin_general/stats.html.erb
new file mode 100644
index 000000000..b22adb581
--- /dev/null
+++ b/app/views/admin_general/stats.html.erb
@@ -0,0 +1,38 @@
+<% @title = "Statistics" %>
+
+Statistics
+
+Chart of requests (excluding backpaged)
+
+
+
">
+
+
+State of requests (includes backpaged)
+
+
+<% for state, count in @request_by_state %>
+ <%=state %> | <%= count %> |
+<% end %>
+
+
+Chart of users
+
+
+
">
+
+
+Tracks by type
+
+
+<% for state, count in @tracks_by_type %>
+ <%=state %> | <%= count %> |
+<% end %>
+
+
+Web analytics
+
+
+
+
+
diff --git a/app/views/admin_general/stats.rhtml b/app/views/admin_general/stats.rhtml
deleted file mode 100644
index b22adb581..000000000
--- a/app/views/admin_general/stats.rhtml
+++ /dev/null
@@ -1,38 +0,0 @@
-<% @title = "Statistics" %>
-
-Statistics
-
-Chart of requests (excluding backpaged)
-
-
-
">
-
-
-State of requests (includes backpaged)
-
-
-<% for state, count in @request_by_state %>
- <%=state %> | <%= count %> |
-<% end %>
-
-
-Chart of users
-
-
-
">
-
-
-Tracks by type
-
-
-<% for state, count in @tracks_by_type %>
- <%=state %> | <%= count %> |
-<% end %>
-
-
-Web analytics
-
-
-
-
-
diff --git a/app/views/admin_general/timeline.html.erb b/app/views/admin_general/timeline.html.erb
new file mode 100644
index 000000000..e84539970
--- /dev/null
+++ b/app/views/admin_general/timeline.html.erb
@@ -0,0 +1,99 @@
+<% @title = "Timeline" %>
+
+<%=h @events_title%>
+
+
+Hour
+| Day
+| 2 days
+| Week
+| Month
+| All time
+
+<% last_date = nil %>
+<% for event, event_at in @events %>
+ <% if last_date != event_at.to_date %>
+ <% if last_date.nil? %>
+
+ <% end %>
+
<%= simple_date(event_at) %>
+
+ <% else %>
+
+ <% end %>
+ <% last_date = event_at.to_date %>
+
+ <%= simple_time(event_at) %>
+
+ <% if event.is_a? InfoRequestEvent %>
+ <%= request_both_links(event.info_request) %>
+ <% if event.event_type == 'edit' %>
+ was edited by administrator <%=h event.params[:editor] %>.
+ <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
+ if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
+ %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
+ end
+ end
+ %>
+ <% elsif event.event_type == 'edit_outgoing' %>
+ <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %>
+ had outgoing message edited by administrator <%=h event.params[:editor] %>.
+ <% if outgoing_message %>
+ <% for p in ['body']
+ if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
+ %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
+ end
+ end
+ %>
+ <% else %>
+ Missing outgoing message, internal error.
+ <% end %>
+ <% elsif event.event_type == 'edit_comment' %>
+ <% comment = Comment.find(event.params[:comment_id].to_i) %>
+ had annotation edited by administrator <%=h event.params[:editor] %>.
+ <% if comment %>
+ <% for p in ['body']
+ if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
+ %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
+ end
+ end
+ %>
+ <% else %>
+ Missing annotation, internal error.
+ <% end %>
+ <% elsif event.event_type == 'destroy_incoming' %>
+ had incoming message deleted by administrator <%=h event.params[:editor] %>.
+ <% elsif event.event_type == 'destroy_outgoing' %>
+ had outgoing message deleted by administrator <%=h event.params[:editor] %>.
+ <% elsif event.event_type == 'hide' %>
+ was hidden by administrator <%=h event.params[:editor] %>.
+ <% elsif event.event_type == 'redeliver_outgoing' %>
+ had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
+ <% elsif event.event_type == 'response' %>
+ <% incoming_message = event.incoming_message %>
+ received
+ <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %>
+ from <%=h event.info_request.public_body.name %>.
+ <% elsif event.event_type == 'sent' %>
+ was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
+ <% elsif event.event_type == 'resent' %>
+ had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
+ <% elsif event.event_type == 'followup_sent' %>
+ had a follow up message sent to <%=h event.info_request.public_body.name %>.
+ <% elsif event.event_type == 'comment' %>
+ had an annotation posted by <%=h event.comment.user.name %>.
+ <% elsif event.event_type == 'status_update' %>
+ had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
+ <% else %>
+ had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
+ <% end %>
+ <% else %>
+ <%= public_body_both_links(event.public_body) %>
+ was created/updated by administrator <%=h event.last_edit_editor %>
+ <% end %>
+<% end %>
+<% if not @events.empty? %>
+
+<% end %>
+<%= will_paginate(@events) %>
+
diff --git a/app/views/admin_general/timeline.rhtml b/app/views/admin_general/timeline.rhtml
deleted file mode 100644
index e84539970..000000000
--- a/app/views/admin_general/timeline.rhtml
+++ /dev/null
@@ -1,99 +0,0 @@
-<% @title = "Timeline" %>
-
-<%=h @events_title%>
-
-
-Hour
-| Day
-| 2 days
-| Week
-| Month
-| All time
-
-<% last_date = nil %>
-<% for event, event_at in @events %>
- <% if last_date != event_at.to_date %>
- <% if last_date.nil? %>
-
- <% end %>
-
<%= simple_date(event_at) %>
-
- <% else %>
-
- <% end %>
- <% last_date = event_at.to_date %>
-
- <%= simple_time(event_at) %>
-
- <% if event.is_a? InfoRequestEvent %>
- <%= request_both_links(event.info_request) %>
- <% if event.event_type == 'edit' %>
- was edited by administrator <%=h event.params[:editor] %>.
- <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
- if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
- %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
- end
- end
- %>
- <% elsif event.event_type == 'edit_outgoing' %>
- <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %>
- had outgoing message edited by administrator <%=h event.params[:editor] %>.
- <% if outgoing_message %>
- <% for p in ['body']
- if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
- %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
- end
- end
- %>
- <% else %>
- Missing outgoing message, internal error.
- <% end %>
- <% elsif event.event_type == 'edit_comment' %>
- <% comment = Comment.find(event.params[:comment_id].to_i) %>
- had annotation edited by administrator <%=h event.params[:editor] %>.
- <% if comment %>
- <% for p in ['body']
- if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
- %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
- end
- end
- %>
- <% else %>
- Missing annotation, internal error.
- <% end %>
- <% elsif event.event_type == 'destroy_incoming' %>
- had incoming message deleted by administrator <%=h event.params[:editor] %>.
- <% elsif event.event_type == 'destroy_outgoing' %>
- had outgoing message deleted by administrator <%=h event.params[:editor] %>.
- <% elsif event.event_type == 'hide' %>
- was hidden by administrator <%=h event.params[:editor] %>.
- <% elsif event.event_type == 'redeliver_outgoing' %>
- had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>.
- <% elsif event.event_type == 'response' %>
- <% incoming_message = event.incoming_message %>
- received
- <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %>
- from <%=h event.info_request.public_body.name %>.
- <% elsif event.event_type == 'sent' %>
- was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
- <% elsif event.event_type == 'resent' %>
- had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>.
- <% elsif event.event_type == 'followup_sent' %>
- had a follow up message sent to <%=h event.info_request.public_body.name %>.
- <% elsif event.event_type == 'comment' %>
- had an annotation posted by <%=h event.comment.user.name %>.
- <% elsif event.event_type == 'status_update' %>
- had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'.
- <% else %>
- had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>.
- <% end %>
- <% else %>
- <%= public_body_both_links(event.public_body) %>
- was created/updated by administrator <%=h event.last_edit_editor %>
- <% end %>
-<% end %>
-<% if not @events.empty? %>
-
-<% end %>
-<%= will_paginate(@events) %>
-
--
cgit v1.2.3