diff options
-rw-r--r-- | app/views/admin_public_body/edit.rhtml | 7 | ||||
-rw-r--r-- | app/views/admin_public_body/list.rhtml | 4 | ||||
-rw-r--r-- | app/views/admin_public_body/new.rhtml | 2 | ||||
-rw-r--r-- | app/views/admin_public_body/show.rhtml | 4 | ||||
-rw-r--r-- | config/routes.rb | 4 | ||||
-rw-r--r-- | todo.txt | 1 |
6 files changed, 13 insertions, 9 deletions
diff --git a/app/views/admin_public_body/edit.rhtml b/app/views/admin_public_body/edit.rhtml index 1c746522b..775c98a99 100644 --- a/app/views/admin_public_body/edit.rhtml +++ b/app/views/admin_public_body/edit.rhtml @@ -2,10 +2,11 @@ <h1><%=@title%></h1> -<% form_tag :action => 'update', :id => @public_body do %> +<% form_tag '../update/' + @public_body.id.to_s do %> <%= render :partial => 'form' %> <%= submit_tag 'Save' %> <% end %> -<%= link_to 'Show', :action => 'show', :id => @public_body %> | -<%= link_to 'List all', :action => 'list' %> +<%= link_to 'Show', '../show/' + @public_body.id.to_s %> | +<%= link_to 'List all', '../list' %> + diff --git a/app/views/admin_public_body/list.rhtml b/app/views/admin_public_body/list.rhtml index 6f3b8886a..1b4f6db38 100644 --- a/app/views/admin_public_body/list.rhtml +++ b/app/views/admin_public_body/list.rhtml @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<p><%= link_to 'New public body', :action => 'new' %></p> +<p><%= link_to 'New public body', 'new' %></p> <table> <tr> @@ -13,7 +13,7 @@ <% for public_body in @public_bodies %> <tr class="<%= cycle('odd', 'even') %>"> - <td><%= link_to h(public_body.name), :action => 'show', :id => public_body %></td> + <td><%= link_to h(public_body.name), 'show/' + public_body.id.to_s %></td> <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name" ] %> <td><%=h public_body.send(column) %></td> <% end %> diff --git a/app/views/admin_public_body/new.rhtml b/app/views/admin_public_body/new.rhtml index 813c46bf1..8de25f294 100644 --- a/app/views/admin_public_body/new.rhtml +++ b/app/views/admin_public_body/new.rhtml @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<% form_tag :action => 'create' do %> +<% form_tag 'create' do %> <%= render :partial => 'form' %> <%= submit_tag "Create" %> <% end %> diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml index 098aaeaf7..26b49cf80 100644 --- a/app/views/admin_public_body/show.rhtml +++ b/app/views/admin_public_body/show.rhtml @@ -9,8 +9,8 @@ <% end %> </p> -<%= link_to 'Edit', :action => 'edit', :id => @public_body %> | -<%= link_to 'List all', :action => 'list' %> +<%= link_to 'Edit', '../edit/' + @public_body.id.to_s %> | +<%= link_to 'List all', '../list' %> <h2>History</h2> <table border="1"> diff --git a/config/routes.rb b/config/routes.rb index 467f21358..7d3c48f9b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: routes.rb,v 1.23 2007-11-23 12:01:20 francis Exp $ +# $Id: routes.rb,v 1.24 2007-11-28 19:20:39 francis Exp $ ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. @@ -32,6 +32,8 @@ ActionController::Routing::Routes.draw do |map| map.show_public_body "/body/:simple_short_name", :controller => 'body', :action => 'show' + # NB: We don't use routes to *construct* admin URLs, as they need to be relative + # paths to work on the live site proxied over HTTPS to secure.mysociety.org map.connect '/admin/:action', :controller => 'admin', :action => 'index' map.connect '/admin/body/:action/:id', :controller => 'admin_public_body' @@ -1,3 +1,4 @@ +Check the template going to users Form for requestor to choose what happened |