aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2009-01-29 12:29:17 +0000
committerfrancis <francis>2009-01-29 12:29:17 +0000
commit2d4b0774e0b9ddebe5adc823042dbc41a9fa203c (patch)
tree1110d18887251be8853537ad08a3ef5959c8635c
parent3c7f3002464f5de7d24bc322d98a44ce1db5618e (diff)
These now in general
-rw-r--r--app/views/admin/debug.rhtml33
-rw-r--r--app/views/admin/index.rhtml77
-rw-r--r--app/views/admin/stats.rhtml26
-rw-r--r--app/views/admin/timeline.rhtml94
4 files changed, 0 insertions, 230 deletions
diff --git a/app/views/admin/debug.rhtml b/app/views/admin/debug.rhtml
deleted file mode 100644
index 3229c0bd4..000000000
--- a/app/views/admin/debug.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-<% @title = "Debug" %>
-
-<h1><%=@title%></h1>
-
-<p>You are <%= h @http_auth_user %></p>
-
-<p><a href="balancer-manager">Apache load balancing configuration</a></p>
-
-<h2>Version numbers</h2>
-
-<p>Rails::VERSION::STRING <%=Rails::VERSION::STRING%>
-<br>
-TMail::VERSION::STRING <%=TMail::VERSION::STRING%>
-<br>
-Xapian::version_string <%=Xapian::version_string%>
-<br>
-Spec::VERSION::NAME/STRING <%=Spec::VERSION::NAME%> <%=Spec::VERSION::STRING%>
-</p>
-
-<h2>Environment variables</h2>
-<pre>
-<%= @request_env.to_yaml %>
-</pre>
-
-<h2>Parameters</h2>
-<pre>
-<%= params.to_yaml %>
-</pre>
-
-<h2>Session</h2>
-<pre>
-<%= session.to_yaml %>
-</pre>
diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml
deleted file mode 100644
index 7dce7373c..000000000
--- a/app/views/admin/index.rhtml
+++ /dev/null
@@ -1,77 +0,0 @@
-<% @title = "Summary" %>
-
-<h1><%=@title%></h1>
-
-<ul>
-<li><%=@public_body_count%> public authorities</li>
-<li><%=@info_request_count%> requests</li>
-<li><%=@user_count%> users</li>
-<li><%=@track_thing_count%> tracked things</li>
-<li><%=@comment_count%> annotations</li>
-</ul>
-
-<hr>
-
-<h1>Things to do</h1>
-
-<% if @holding_pen_messages.size > 0 %>
- <h3>Put misdelivered responses with the right request (<%=@holding_pen_messages.size%> total)</h3>
-
- <ul>
- <% for message in @holding_pen_messages %>
- <li>
- <% 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)%>)
- </li>
- <% end %>
- </ul>
-
-<% end %>
-
-<% if @ten_days_old_unclassified.size > 0 %>
- <h3>Classify responses that are still unclassified ten days after response (<%=@ten_days_old_unclassified.size%> total)</h3>
-
- <ul>
- <% for @request in @ten_days_old_unclassified %>
- <li>
- <%= request_both_links(@request) %>
- &ndash; <%=simple_date(@request.get_last_event.created_at)%>
- </li>
- <% end %>
- </ul>
-<% end %>
-
-<% if @requires_admin_requests.size > 0 %>
- <h3>Work out what to do with these unusual responses (a new category?) (<%=@requires_admin_requests.size%> total)</h3>
-
- <ul>
- <% for @request in @requires_admin_requests %>
- <li>
- <%= request_both_links(@request)%>
- &ndash; <%=simple_date(@request.get_last_event.created_at)%>
- </li>
- <% end %>
- </ul>
-<% end %>
-
-<% if @blank_contacts.size > 0 %>
- <h3>Find missing FOI email for these public authorities (try phoning!) (<%=@blank_contacts.size%> total)</h3>
- <ul>
- <% for @blank_contact in @blank_contacts %>
- <li>
- <%= public_body_both_links(@blank_contact)%>
- &ndash; <%=simple_date(@blank_contact.updated_at)%>
- </li>
- <% end %>
- </ul>
-<% end %>
-
-<% if @holding_pen_messages.size == 0 && @ten_days_old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %>
- <p>No pending administration required.</p>
-<% end %>
-
-
diff --git a/app/views/admin/stats.rhtml b/app/views/admin/stats.rhtml
deleted file mode 100644
index 9aca960d1..000000000
--- a/app/views/admin/stats.rhtml
+++ /dev/null
@@ -1,26 +0,0 @@
-<% @title = "Statistics" %>
-
-<h1>Statistics</h1>
-
-<h2>Chart of requests (excluding backpaged)</h2>
-
-<p>
- <img src="<%= main_url("/foi-live-creation.png")%>">
-</p>
-
-<h2>State of requests (includes backpaged)</h2>
-
-<table>
-<% for state, count in @request_by_state %>
-<tr> <td><%=state %></td><td><%= count %></td> </tr>
-<% end %>
-</table>
-
-<h2>Tracks by type</h2>
-
-<table>
-<% for state, count in @tracks_by_type %>
-<tr> <td><%=state %></td><td><%= count %></td> </tr>
-<% end %>
-</table>
-
diff --git a/app/views/admin/timeline.rhtml b/app/views/admin/timeline.rhtml
deleted file mode 100644
index 25e871232..000000000
--- a/app/views/admin/timeline.rhtml
+++ /dev/null
@@ -1,94 +0,0 @@
-<% @title = "Timeline" %>
-
-<h1><%=h @events_title%></h1>
-
-<p>
-<a href="?">Two days</a>
-| <a href="?week=1">Week</a>
-| <a href="?month=1">Month</a>
-| <a href="?all=1">All time</a></p>
-
-<% last_date = nil %>
-<% for event in @events %>
- <% if last_date != event.created_at.to_date %>
- <% if last_date.nil? %>
- <p>
- <% end %>
- <h3><%= simple_date(event.created_at) %></h3>
- <p>
- <% else %>
- <br>
- <% end %>
- <% last_date = event.created_at.to_date %>
-
-
- <% if event.class.to_s == 'InfoRequestEvent' %>
- <%= request_both_links(event.info_request) %>
- <% if event.event_type == 'edit' %>
- was edited by administrator <strong><%=h event.params[:editor] %></strong>.
- <% 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_messages = OutgoingMessage.find(:all, event.params[:outgoing_message_id].to_i) %>
- had outgoing message edited by administrator <strong><%=h event.params[:editor] %></strong>.
- <% if outgoing_messages.size > 0 %>
- <% outgoing_message = outgoing_messages[0] %>
- <% 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' %>
- <% comments = Comment.find(:all, event.params[:comment_id].to_i) %>
- had annotation edited by administrator <strong><%=h event.params[:editor] %></strong>.
- <% if comments.size > 0 %>
- <% comment = comments[0] %>
- <% 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 <strong><%=h event.params[:editor] %></strong>.
- <% elsif event.event_type == 'redeliver_incoming' %>
- had incoming message redelivered to another request by administrator <strong><%=h event.params[:editor] %></strong>.
- <% elsif event.event_type == 'response' %>
- <% incoming_message = event.incoming_message %>
- received
- <%= link_to 'a response',
- main_url(show_response_url(:id => incoming_message.info_request.id, :incoming_message_id => incoming_message.id, :only_path => true)) %>
-
- 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 %>.
- <% 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 <strong><%=h event.last_edit_editor %></strong>
- <% end %>
-<% end %>
-<% if not @events.empty? %>
-</p>
-<% end %>
-
-