From: Matt Amos Date: Tue, 4 Aug 2009 13:07:11 +0000 (+0000) Subject: Moved oauth_clients page to a sub-page of the user - makes it more obvious that the... X-Git-Tag: live~6754^2~6 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/e470d8a6593d1a5496e854e76ad7940be034cadf Moved oauth_clients page to a sub-page of the user - makes it more obvious that the oauth_clients page is for that specific user. --- diff --git a/app/views/oauth_clients/edit.html.erb b/app/views/oauth_clients/edit.html.erb index d3b2c8c8a..855fc03d8 100644 --- a/app/views/oauth_clients/edit.html.erb +++ b/app/views/oauth_clients/edit.html.erb @@ -1,5 +1,5 @@

<%= t'oauth.client_application.edit.title' %>

-<% form_for :client_application, @client_application, :url => oauth_client_path(@client_application), :html => { :method => :put } do |f| %> +<% form_for :client_application, @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %> <%= render :partial => "form", :locals => { :f => f } %>
<%= submit_tag t'oauth.client_application.edit.submit' %> diff --git a/app/views/oauth_clients/show.html.erb b/app/views/oauth_clients/show.html.erb index 281af5222..df8fbc248 100644 --- a/app/views/oauth_clients/show.html.erb +++ b/app/views/oauth_clients/show.html.erb @@ -24,5 +24,5 @@

<%= t'oauth.client_application.show.support_notice' %>

-

<%= link_to t('oauth.client_application.show.edit'), edit_oauth_client_url(@client_application) %>

+

<%= link_to t('oauth.client_application.show.edit'), edit_oauth_client_url(@client_application.user.display_name, @client_application) %>

diff --git a/config/routes.rb b/config/routes.rb index 0ce2f051d..0bc0d8cd3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -196,7 +196,7 @@ ActionController::Routing::Routes.draw do |map| map.connect '/message/delete/:message_id', :controller => 'message', :action => 'delete' # oauth admin pages (i.e: for setting up new clients, etc...) - map.resources :oauth_clients + map.resources :oauth_clients, :path_prefix => '/user/:display_name' map.connect '/oauth/revoke', :controller => 'oauth', :action => 'revoke' map.authorize '/oauth/authorize', :controller => 'oauth', :action => 'oauthorize' map.request_token '/oauth/request_token', :controller => 'oauth', :action => 'request_token'