Commit 21770e81a7b9d9b9a423a1ec1d94e9e75d54fdf9

Authored by Victor Costa
2 parents f84ac88b b6477500

Merge branch 'oauth_rails3' into stable

lib/tasks/ci.rake
@@ -35,7 +35,7 @@ namespace :ci do @@ -35,7 +35,7 @@ namespace :ci do
35 35
36 sh 'testrb', '-Itest', *tests unless tests.empty? 36 sh 'testrb', '-Itest', *tests unless tests.empty?
37 sh 'cucumber', *features unless features.empty? 37 sh 'cucumber', *features unless features.empty?
38 - sh 'cucumber', '-p', 'selenium', *features unless features.empty? 38 + sh 'xvfb-run', 'cucumber', '-p', 'selenium', *features unless features.empty?
39 39
40 changed_plugins.each do |plugin| 40 changed_plugins.each do |plugin|
41 task = "test:noosfero_plugins:#{plugin}" 41 task = "test:noosfero_plugins:#{plugin}"
plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb
@@ -19,3 +19,6 @@ @@ -19,3 +19,6 @@
19 </tr> 19 </tr>
20 <% end %> 20 <% end %>
21 </table> 21 </table>
  22 +<div class="actions">
  23 + <%= button(:back, _('Go back'), {:controller => 'plugins', :action => 'index'}) %>
  24 +</div>
plugins/oauth_provider/controllers/oauth_provider_authorizations_controller.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +class OauthProviderAuthorizationsController < Doorkeeper::AuthorizationsController
  2 +
  3 + no_design_blocks
  4 + layout :get_layout
  5 +
  6 + def index
  7 + end
  8 +
  9 +end
plugins/oauth_provider/lib/oauth_provider_plugin.rb
@@ -8,6 +8,10 @@ class OauthProviderPlugin &lt; Noosfero::Plugin @@ -8,6 +8,10 @@ class OauthProviderPlugin &lt; Noosfero::Plugin
8 _("Oauth Provider.") 8 _("Oauth Provider.")
9 end 9 end
10 10
  11 + def stylesheet?
  12 + true
  13 + end
  14 +
11 Doorkeeper.configure do 15 Doorkeeper.configure do
12 orm :active_record 16 orm :active_record
13 17
@@ -36,7 +40,8 @@ class OauthProviderPlugin &lt; Noosfero::Plugin @@ -36,7 +40,8 @@ class OauthProviderPlugin &lt; Noosfero::Plugin
36 use_doorkeeper do 40 use_doorkeeper do
37 controllers ({ 41 controllers ({
38 :applications => 'oauth_provider_applications', 42 :applications => 'oauth_provider_applications',
39 - :authorized_applications => 'oauth_provider_authorized_applications' 43 + :authorized_applications => 'oauth_provider_authorized_applications',
  44 + :authorizations => 'oauth_provider_authorizations'
40 }) 45 })
41 end 46 end
42 end 47 end
plugins/oauth_provider/public/style.css 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +.oauth-provider-authorize .actions form {
  2 + display: inline-block;
  3 +}
  4 +.oauth-provider-authorize .h4 {
  5 + font-size: 14px;
  6 + color: rgb(36, 36, 36)
  7 +}
  8 +.oauth-provider-authorize #oauth-permissions {
  9 + color: rgb(92, 92, 92);
  10 +}
  11 +.oauth-provider .actions {
  12 + margin-top: 10px;
  13 +}
plugins/oauth_provider/views/doorkeeper/applications/index.html.erb
  1 +<div class="oauth-provider">
1 <div class="page-header"> 2 <div class="page-header">
2 <h3><%= link_to _('Oauh Provider'), '/admin/plugin/oauth_provider' %></h3> 3 <h3><%= link_to _('Oauh Provider'), '/admin/plugin/oauth_provider' %></h3>
3 </div> 4 </div>
@@ -24,3 +25,7 @@ @@ -24,3 +25,7 @@
24 <% end %> 25 <% end %>
25 </tbody> 26 </tbody>
26 </table> 27 </table>
  28 +<div class="actions">
  29 + <%= button(:back, _('Go back'), {:controller => 'oauth_provider_plugin_admin', :action => 'index'}) %>
  30 +</div>
  31 +</div>
plugins/oauth_provider/views/doorkeeper/authorizations/new.html.erb
  1 +<div class="oauth-provider-authorize">
  2 +
1 <header class="page-header" role="banner"> 3 <header class="page-header" role="banner">
2 <h1><%= _('Authorize required') %></h1> 4 <h1><%= _('Authorize required') %></h1>
3 </header> 5 </header>
@@ -26,7 +28,7 @@ @@ -26,7 +28,7 @@
26 <%= hidden_field_tag :state, @pre_auth.state %> 28 <%= hidden_field_tag :state, @pre_auth.state %>
27 <%= hidden_field_tag :response_type, @pre_auth.response_type %> 29 <%= hidden_field_tag :response_type, @pre_auth.response_type %>
28 <%= hidden_field_tag :scope, @pre_auth.scope %> 30 <%= hidden_field_tag :scope, @pre_auth.scope %>
29 - <%= submit_tag _("Authorize"), class: "btn btn-success btn-lg btn-block" %> 31 + <%= submit_button :ok, _("Authorize") %>
30 <% end %> 32 <% end %>
31 <%= form_tag oauth_authorization_path, method: :delete do %> 33 <%= form_tag oauth_authorization_path, method: :delete do %>
32 <%= hidden_field_tag :client_id, @pre_auth.client.uid %> 34 <%= hidden_field_tag :client_id, @pre_auth.client.uid %>
@@ -34,7 +36,8 @@ @@ -34,7 +36,8 @@
34 <%= hidden_field_tag :state, @pre_auth.state %> 36 <%= hidden_field_tag :state, @pre_auth.state %>
35 <%= hidden_field_tag :response_type, @pre_auth.response_type %> 37 <%= hidden_field_tag :response_type, @pre_auth.response_type %>
36 <%= hidden_field_tag :scope, @pre_auth.scope %> 38 <%= hidden_field_tag :scope, @pre_auth.scope %>
37 - <%= submit_tag _("Deny"), class: "btn btn-danger btn-lg btn-block" %> 39 + <%= submit_button :cancel, _("Deny") %>
38 <% end %> 40 <% end %>
39 </div> 41 </div>
40 </main> 42 </main>
  43 +</div>
plugins/oauth_provider/views/doorkeeper/authorized_applications/index.html.erb
  1 +<div class="oauth-provider">
1 <header class="page-header"> 2 <header class="page-header">
2 <h1>Your authorized applications</h1> 3 <h1>Your authorized applications</h1>
3 </header> 4 </header>
@@ -23,3 +24,8 @@ @@ -23,3 +24,8 @@
23 </tbody> 24 </tbody>
24 </table> 25 </table>
25 </main> 26 </main>
  27 +
  28 +<div class="actions">
  29 + <%= button(:back, _('Go back'), :back) %>
  30 +</div>
  31 +</div>
plugins/oauth_provider/views/oauth_provider_plugin_admin/index.html.erb
@@ -8,4 +8,7 @@ @@ -8,4 +8,7 @@
8 <%= link_to _('Authorized Applications'), oauth_authorized_applications_path %> 8 <%= link_to _('Authorized Applications'), oauth_authorized_applications_path %>
9 </div> 9 </div>
10 10
  11 + <div class="actions">
  12 + <%= button(:back, _('Go back'), {:controller => 'plugins', :action => 'index'}) %>
  13 + </div>
11 </div> 14 </div>