merge r17141:17256 from trunk
This commit is contained in:
commit
c6bf21a9d0
21 changed files with 334 additions and 135 deletions
|
@ -1,17 +1,15 @@
|
|||
<h1>Authorize access to your account</h1>
|
||||
<p><%= t('oauth.client_application.request_access', :app_name => link_to(@token.client_application.name,@token.client_application.url)) %></p>
|
||||
<p><%= t('oauth.oauthorize.request_access', :app_name => link_to(@token.client_application.name,@token.client_application.url)) %></p>
|
||||
<% form_tag authorize_url do %>
|
||||
<%= hidden_field_tag "oauth_token", @token.token %>
|
||||
<%- if params[:oauth_callback] -%>
|
||||
<%= hidden_field_tag "oauth_callback", params[:oauth_callback] %>
|
||||
<%- end -%>
|
||||
<p><%= t 'oauth.client_application.allow_to' %></p>
|
||||
<ul style="list-style:none">
|
||||
<% @token.client_application.permissions.each do |perm| %>
|
||||
<li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t "oauth.client_application.#{perm}" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p>
|
||||
<%= submit_tag %>
|
||||
</p>
|
||||
<%= hidden_field_tag "oauth_callback", params[:oauth_callback] %>
|
||||
<%- end -%>
|
||||
<p><%= t 'oauth.oauthorize.allow_to' %></p>
|
||||
<ul style="list-style:none">
|
||||
<% @token.client_application.permissions.each do |perm| %>
|
||||
<li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t "oauth.oauthorize.#{perm}" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p><%= submit_tag %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<div class="field">
|
||||
<label for="client_application_name"><%= t'oauth.client_application.form.name' %> (<%= t'oauth.client_application.form.required' %>)</label><br/>
|
||||
<%= f.text_field :name %>
|
||||
<label for="client_application_name"><%= t'oauth_clients.form.name' %> (<%= t'oauth_clients.form.required' %>)</label><br/>
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="client_application_url"><%= t'oauth.client_application.form.url' %> (<%= t'oauth.client_application.form.required' %>)</label><br/>
|
||||
<%= f.text_field :url %>
|
||||
<label for="client_application_url"><%= t'oauth_clients.form.url' %> (<%= t'oauth_clients.form.required' %>)</label><br/>
|
||||
<%= f.text_field :url %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="client_application_callback_url"><%= t'oauth.client_application.form.callback_url' %></label><br/>
|
||||
<%= f.text_field :callback_url %>
|
||||
<label for="client_application_callback_url"><%= t'oauth_clients.form.callback_url' %></label><br/>
|
||||
<%= f.text_field :callback_url %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="client_application_support_url"><%= t'oauth.client_application.form.support_url' %></label><br/>
|
||||
<%= f.text_field :support_url %>
|
||||
<label for="client_application_support_url"><%= t'oauth_clients.form.support_url' %></label><br/>
|
||||
<%= f.text_field :support_url %>
|
||||
</div>
|
||||
<p><%= t'oauth.client_application.form.requests' %></p>
|
||||
<p><%= t'oauth_clients.form.requests' %></p>
|
||||
<% ClientApplication.all_permissions.each do |perm| %>
|
||||
<div class="field">
|
||||
<%= f.check_box perm %>
|
||||
<label for="client_application_<%= perm.to_s %>"><%= t('oauth.client_application.form.' + perm.to_s) %></label><br/>
|
||||
<label for="client_application_<%= perm.to_s %>"><%= t('oauth_clients.form.' + perm.to_s) %></label><br/>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h1><%= t'oauth.client_application.edit.title' %></h1>
|
||||
<h1><%= t'oauth_clients.edit.title' %></h1>
|
||||
<% 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 } %>
|
||||
<br/>
|
||||
<%= submit_tag t'oauth.client_application.edit.submit' %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<br/>
|
||||
<%= submit_tag t'oauth_clients.edit.submit' %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<h1><%= t'oauth.client_application.index.title' %></h1>
|
||||
<h1><%= t'oauth_clients.index.title' %></h1>
|
||||
<% unless @tokens.empty? %>
|
||||
<h3><%= t'oauth.client_application.index.my_tokens' %></h3>
|
||||
<p><%= t'oauth.client_application.index.list_tokens' %></p>
|
||||
<h3><%= t'oauth_clients.index.my_tokens' %></h3>
|
||||
<p><%= t'oauth_clients.index.list_tokens' %></p>
|
||||
<table>
|
||||
<tr><th><%= t'oauth.client_application.index.application' %></th>
|
||||
<th><%= t'oauth.client_application.index.issued_at' %></th><th> </th></tr>
|
||||
<tr><th><%= t'oauth_clients.index.application' %></th>
|
||||
<th><%= t'oauth_clients.index.issued_at' %></th><th> </th></tr>
|
||||
<% @tokens.each do |token|%>
|
||||
<% content_tag_for :tr, token do %>
|
||||
<td><%= link_to token.client_application.name, token.client_application.url %></td>
|
||||
|
@ -12,22 +12,22 @@
|
|||
<td>
|
||||
<% form_tag :controller => 'oauth', :action => 'revoke' do %>
|
||||
<%= hidden_field_tag 'token', token.token %>
|
||||
<%= submit_tag t('oauth.client_application.index.revoke') %>
|
||||
<%= submit_tag t('oauth_clients.index.revoke') %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
<h3><%= t'oauth.client_application.index.my_apps' %></h3>
|
||||
<h3><%= t'oauth_clients.index.my_apps' %></h3>
|
||||
<% if @client_applications.empty? %>
|
||||
<p><%= t('oauth.client_application.index.no_apps', :oauth => "<a href=\"http://oauth.net\">OAuth</a>") %></p>
|
||||
<p><%= t('oauth_clients.index.no_apps', :oauth => "<a href=\"http://oauth.net\">OAuth</a>") %></p>
|
||||
<% else %>
|
||||
<p><%= t'oauth.client_application.index.registered_apps' %></p>
|
||||
<p><%= t'oauth_clients.index.registered_apps' %></p>
|
||||
<% @client_applications.each do |client|%>
|
||||
<% div_for client do %>
|
||||
<%= link_to client.name, :action => :show, :id => client.id %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3><%= link_to t('oauth.client_application.index.register_new'), :action => :new %></h3>
|
||||
<h3><%= link_to t('oauth_clients.index.register_new'), :action => :new %></h3>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h1><%= t'oauth.client_application.new.title' %></h1>
|
||||
<h1><%= t'oauth_clients.new.title' %></h1>
|
||||
<% form_for :client_application, :url => { :action => :create } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<br />
|
||||
<%= submit_tag t'oauth.client_application.new.submit' %>
|
||||
<%= submit_tag t('oauth_clients.new.submit') %>
|
||||
<% end %>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<p><%= t('oauth.client_application.not_found', :type => @type) %></p>
|
||||
<p><%= t('oauth_clients.not_found.sorry', :type => @type) %></p>
|
||||
|
|
|
@ -1,28 +1,27 @@
|
|||
<h1><%= t('oauth.client_application.show.title', :app_name => @client_application.name) %></h1>
|
||||
<h1><%= t('oauth_clients.show.title', :app_name => @client_application.name) %></h1>
|
||||
<p>
|
||||
<b><%= t'oauth.client_application.show.key' %></b> <%=@client_application.key %>
|
||||
<b><%= t'oauth_clients.show.key' %></b> <%=@client_application.key %>
|
||||
</p>
|
||||
<p>
|
||||
<b><%= t'oauth.client_application.show.secret' %></b> <%=@client_application.secret %>
|
||||
<b><%= t'oauth_clients.show.secret' %></b> <%=@client_application.secret %>
|
||||
</p>
|
||||
<p>
|
||||
<b><%= t'oauth.client_application.show.url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
|
||||
<b><%= t'oauth_clients.show.url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
|
||||
</p>
|
||||
<p>
|
||||
<b><%= t'oauth.client_application.show.access_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
|
||||
<b><%= t'oauth_clients.show.access_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
|
||||
</p>
|
||||
<p>
|
||||
<b><%= t'oauth.client_application.show.authorize_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
|
||||
<b><%= t'oauth_clients.show.authorize_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
|
||||
</p>
|
||||
|
||||
<p><%= t'oauth.client_application.show.requests' %></p>
|
||||
<p><%= t'oauth_clients.show.requests' %></p>
|
||||
<ul><% @client_application.permissions.each do |perm| %>
|
||||
<div class="field">
|
||||
<li><%= t('oauth.client_application.form.' + perm.to_s) %></li>
|
||||
<li><%= t('oauth_clients.form.' + perm.to_s) %></li>
|
||||
</div>
|
||||
<% end %></ul>
|
||||
|
||||
<p><%= t'oauth.client_application.show.support_notice' %></p>
|
||||
|
||||
<p><%= link_to t('oauth.client_application.show.edit'), edit_oauth_client_url(@client_application.user.display_name, @client_application) %></p>
|
||||
<p><%= t'oauth_clients.show.support_notice' %></p>
|
||||
|
||||
<p><%= link_to t('oauth_clients.show.edit'), edit_oauth_client_url(@client_application.user.display_name, @client_application) %></p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h1><%= t 'user.login.heading' %></h1>
|
||||
|
||||
<p><%= t 'user.login.please login', :create_user_link => link_to(t('user.login.create_account'), :controller => 'user', :action => 'new') %></p>
|
||||
<p><%= t 'user.login.please login', :create_user_link => link_to(t('user.login.create_account'), :controller => 'user', :action => 'new', :referer => params[:referer]) %></p>
|
||||
|
||||
<% form_tag :action => 'login' do %>
|
||||
<%= hidden_field_tag('referer', h(params[:referer])) %>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<%= error_messages_for 'user' %>
|
||||
|
||||
<% form_tag :action => 'save' do %>
|
||||
<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %>
|
||||
<table id="loginForm">
|
||||
<tr><td class="fieldName"><%= t 'user.new.email address' %></td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255, :tabindex => 1}) %></td></tr>
|
||||
<tr><td class="fieldName"><%= t 'user.new.confirm email address' %></td><td><%= text_field('user', 'email_confirmation',{:size => 50, :maxlength => 255, :tabindex => 2}) %></td></tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue