<%= SITE_TITLE %> Site Administration Page <%= help_link('site_admin') %>

Edit Entry <%= help_link('edit_resource') %> <%= form_tag :action => "edit_entry" %>
<%= collection_select :resource, :id, Resource.find(:all, :order => 'name'), "id", "name", :include_blank => true -%> <%= submit_tag 'Edit Entry'%>
<%= end_form_tag -%> ( <%= Resource.find(:all, :order => 'name', :conditions => "viewable = false").length %> HIDDEN NOW ) <%= help_link('viewable') %> <%= form_tag :action => "edit_entry" %>
<%= collection_select :resource, :id, Resource.find(:all, :order => 'name', :conditions => "viewable = false"), "id", "complex_name", :include_blank => true -%> <%= submit_tag 'Edit Entry'%>
<%= end_form_tag -%> Delete Entry <%= help_link('delete_entry') %> <%= form_tag :action => "delete_entry" %>
<%= collection_select :resource, :id, Resource.find(:all, :order => 'name'), "id", "name", :include_blank => true -%> <%= submit_tag 'Delete Entry'%>
<%= end_form_tag -%>
__

USERS:
<%= link_to "Show Users Table" , :action =>'show_users' %>

Delete User <%= help_link('delete_user') -%> <%= start_form_tag :action => "delete_user" %>
<%= select_tag "id", ["\n"] + User.find(:all, :order => 'fullname').collect {|e| "\n" } %> <%= submit_tag 'Delete User'%>
<%= end_form_tag -%>

ROLES
<%= link_to "Show Role Table" , :action =>'show_roles' %>


Site Admin Authority <%= help_link('admin_promote') %> <%= start_form_tag :action => "promote_user" %>
<%= select_tag "id", ["\n"] + User.find(:all, :order => 'fullname').collect {|e| "\n" } %> <%= submit_tag 'Promote User to Site Admin'%>
<%= end_form_tag -%>
<%= start_form_tag :action => "demote_user" %>
<%= select_tag "id", ["\n"] + Role.find_by_name('site_admin').users.collect {|e| "\n" } %> <%= submit_tag 'Demote User Authority'%>
<%= end_form_tag -%>

PENDING FLAGS: <%= help_link('pending_flags') %>

<% @flags_list.each do |f| %> <%= f.created_at %>
<%= f.flag_type %> <%= link_to Resource.find(f.resource_id).name + ", id = " + f.resource_id.to_s , :controller => '/resource', :action =>'show', :id => f.resource_id %>
Comment: <%= f.comment %>
<%= link_to "Delete Flag", :controller => '/site_admin', :action =>'delete_flag', :id => f.id %> <%= link_to "Forward to Owner", :controller => '/site_admin', :action =>'forward_flag', :id => f.id %>
<% end %> <% if @flags_list.empty? %> None. <% end %>