Replace ERB by HAML, added locales, corrected Gemfile

This commit is contained in:
Augier 2015-07-11 10:51:39 +02:00 committed by theworldbright
parent 3d26cbf657
commit c6eb722517
6 changed files with 30 additions and 25 deletions

View file

@ -0,0 +1,7 @@
= form_tag openid_connect_authorizations_path, class: action do
- if action == :approve
= submit_tag t(".approve")
= hidden_field_tag :approve, true
- else
= submit_tag t(".deny")
= hidden_field_tag :approve, false

View file

@ -1,9 +0,0 @@
<%= form_tag openid_connect_authorizations_path, class: action do %>
<% if action == :approve %>
<%= submit_tag "Approve" %>
<%= hidden_field_tag :approve, true %>
<% else %>
<%= submit_tag "Deny" %>
<%= hidden_field_tag :approve, false %>
<% end %>
<% end %>

View file

@ -1,15 +0,0 @@
<h2><%= @client.name %></h2>
<p>You will be redirected to <%= @redirect_uri %> with an id token if approved or an error if denied</p>
<ul>
<% @scopes.each do |scope| %>
<li><%= scope.name %></li>
<% end %>
<% if @request_object %>
<li>Request Objects (Currently not supported)</li>
<ul>
<pre><%= JSON.pretty_generate @request_object.as_json %></pre>
</ul>
<% end %>
</ul>
<%= render 'openid_connect/authorizations/form', action: :approve %>
<%= render 'openid_connect/authorizations/form', action: :deny %>

View file

@ -0,0 +1,14 @@
%h2= @client.name
%p= t(".will_be_redirected")
= @redirect_uri
= t(".with_id_token")
%ul
- @scopes.each do |scope|
%li= scope.name
- if @request_object
%li= t(".requested_objects")
%ul
%pre= JSON.pretty_generate @request_object.as_json
= render 'openid_connect/authorizations/form', action: :approve
= render 'openid_connect/authorizations/form', action: :deny

View file

@ -31,7 +31,6 @@ module Diaspora
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W{#{config.root}/app}
config.autoload_once_paths += %W{#{config.root}/lib}
config.autoload_paths += %W{#{config.root}/lib/openid}
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.

View file

@ -881,6 +881,15 @@ en:
Hoping to see you again,
The diaspora* email robot!
openid_connect:
authorizations:
new:
will_be_redirected: "You will be redirected to"
with_id_token: "with an id token if approved or an error if denied"
requested_objects: "Request Objects (Currently not supported)"
form:
approve: "Approve"
deny: "Deny"
people:
zero: "No people"
one: "1 person"