From fa150314f54777ca96bf38e57cef09d843c3de3c Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 26 Nov 2014 11:01:47 -0300 Subject: [PATCH] oauth_provider: style added in athorization view --- plugins/oauth_provider/controllers/oauth_provider_authorizations_controller.rb | 9 +++++++++ plugins/oauth_provider/lib/oauth_provider_plugin.rb | 7 ++++++- plugins/oauth_provider/public/style.css | 10 ++++++++++ plugins/oauth_provider/views/doorkeeper/authorizations/new.html.erb | 7 +++++-- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 plugins/oauth_provider/controllers/oauth_provider_authorizations_controller.rb create mode 100644 plugins/oauth_provider/public/style.css diff --git a/plugins/oauth_provider/controllers/oauth_provider_authorizations_controller.rb b/plugins/oauth_provider/controllers/oauth_provider_authorizations_controller.rb new file mode 100644 index 0000000..a48b70d --- /dev/null +++ b/plugins/oauth_provider/controllers/oauth_provider_authorizations_controller.rb @@ -0,0 +1,9 @@ +class OauthProviderAuthorizationsController < Doorkeeper::AuthorizationsController + + no_design_blocks + layout :get_layout + + def index + end + +end diff --git a/plugins/oauth_provider/lib/oauth_provider_plugin.rb b/plugins/oauth_provider/lib/oauth_provider_plugin.rb index a733c5d..2b7bc10 100644 --- a/plugins/oauth_provider/lib/oauth_provider_plugin.rb +++ b/plugins/oauth_provider/lib/oauth_provider_plugin.rb @@ -8,6 +8,10 @@ class OauthProviderPlugin < Noosfero::Plugin _("Oauth Provider.") end + def stylesheet? + true + end + Doorkeeper.configure do orm :active_record @@ -36,7 +40,8 @@ class OauthProviderPlugin < Noosfero::Plugin use_doorkeeper do controllers ({ :applications => 'oauth_provider_applications', - :authorized_applications => 'oauth_provider_authorized_applications' + :authorized_applications => 'oauth_provider_authorized_applications', + :authorizations => 'oauth_provider_authorizations' }) end end diff --git a/plugins/oauth_provider/public/style.css b/plugins/oauth_provider/public/style.css new file mode 100644 index 0000000..adbfc5a --- /dev/null +++ b/plugins/oauth_provider/public/style.css @@ -0,0 +1,10 @@ +.oauth-provider-authorize .actions form { + display: inline-block; +} +.oauth-provider-authorize .h4 { + font-size: 14px; + color: rgb(36, 36, 36) +} +.oauth-provider-authorize #oauth-permissions { + color: rgb(92, 92, 92); +} diff --git a/plugins/oauth_provider/views/doorkeeper/authorizations/new.html.erb b/plugins/oauth_provider/views/doorkeeper/authorizations/new.html.erb index 6be5fab..9326365 100644 --- a/plugins/oauth_provider/views/doorkeeper/authorizations/new.html.erb +++ b/plugins/oauth_provider/views/doorkeeper/authorizations/new.html.erb @@ -1,3 +1,5 @@ +
+ @@ -26,7 +28,7 @@ <%= hidden_field_tag :state, @pre_auth.state %> <%= hidden_field_tag :response_type, @pre_auth.response_type %> <%= hidden_field_tag :scope, @pre_auth.scope %> - <%= submit_tag _("Authorize"), class: "btn btn-success btn-lg btn-block" %> + <%= submit_button :ok, _("Authorize") %> <% end %> <%= form_tag oauth_authorization_path, method: :delete do %> <%= hidden_field_tag :client_id, @pre_auth.client.uid %> @@ -34,7 +36,8 @@ <%= hidden_field_tag :state, @pre_auth.state %> <%= hidden_field_tag :response_type, @pre_auth.response_type %> <%= hidden_field_tag :scope, @pre_auth.scope %> - <%= submit_tag _("Deny"), class: "btn btn-danger btn-lg btn-block" %> + <%= submit_button :cancel, _("Deny") %> <% end %>
+ -- libgit2 0.21.2