Revert r16046.

DO NOT COMMIT MAJOR ENHANCEMENTS TO TRUNK WITHOUT TALKING TO ME FIRST.
This commit is contained in:
Tom Hughes 2009-06-23 02:48:38 +00:00
parent 7551e8a0c1
commit f4571eeb7c
85 changed files with 9 additions and 3278 deletions

View file

@ -1,14 +0,0 @@
<h1>Authorize access to your account</h1>
<p>Would you like to authorize <%= link_to @token.client_application.name,@token.client_application.url %> (<%= link_to @token.client_application.url,@token.client_application.url %>) to access your account?</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>
<%= check_box_tag 'authorize' %> authorize access
</p>
<p>
<%= submit_tag %>
</p>
<% end %>

View file

@ -1 +0,0 @@
<h1>You have disallowed this request</h1>

View file

@ -1 +0,0 @@
<h1>You have allowed this request</h1>

View file

@ -1,17 +0,0 @@
<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>
<% 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>
<% end %>

View file

@ -1,40 +0,0 @@
<div class="field">
<label for="client_application_name">Name*</label><br/>
<%= f.text_field :name %>
</div>
<div class="field">
<label for="client_application_url">Main Application URL*</label><br/>
<%= f.text_field :url %>
</div>
<div class="field">
<label for="client_application_callback_url">Callback URL*</label><br/>
<%= f.text_field :callback_url %>
</div>
<div class="field">
<label for="client_application_support_url">Support URL</label><br/>
<%= f.text_field :support_url %>
</div>
<div class="field">
<%= f.check_box :allow_read_prefs %>
<label for="client_application_allow_read_prefs">Request permission to read the user preferences.</label><br/>
</div>
<div class="field">
<%= f.check_box :allow_write_prefs %>
<label for="client_application_allow_write_prefs">Request permission to write the user preferences.</label><br/>
</div>
<div class="field">
<%= f.check_box :allow_write_diary %>
<label for="client_application_allow_write_diary">Request permission to create diary entries, comments and friends.</label><br/>
</div>
<div class="field">
<%= f.check_box :allow_write_api %>
<label for="client_application_allow_write_api">Request permission to write the API on the user's behalf.</label><br/>
</div>
<div class="field">
<%= f.check_box :allow_read_gpx %>
<label for="client_application_allow_read_gpx">Request permission to read the user's private GPS traces.</label><br/>
</div>
<div class="field">
<%= f.check_box :allow_write_gpx %>
<label for="client_application_allow_write_gpx">Request permission to upload GPS traces as the user.</label><br/>
</div>

View file

@ -1,5 +0,0 @@
<h1>Edit your application</h1>
<% form_for :client_application do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
<%= submit_tag "Edit" %>
<% end %>

View file

@ -1,39 +0,0 @@
<div class="flash"><%= flash[:notice] %></div>
<h1>OAuth Client Applications</h1>
<% unless @tokens.empty? %>
<p>The following tokens have been issued to applications in your name</p>
<table>
<tr><th>Application</th><th>Issued</th><th>&nbsp;</th></tr>
<% @tokens.each do |token|%>
<% content_tag_for :tr, token do %>
<td><%= link_to token.client_application.name, token.client_application.url %></td>
<td><%= token.authorized_at %></td>
<td>
<% form_tag :controller => 'oauth', :action => 'revoke' do %>
<%= hidden_field_tag 'token', token.token %>
<%= submit_tag "Revoke!" %>
<% end %>
</td>
<% end %>
<% end %>
</table>
<% end %>
<h3>Application Developers</h3>
<% if @client_applications.empty? %>
<p>
Do you have an application you would like to register for use with us using the <a href="http://oauth.net">OAuth</a> standard?
</p>
<p>
You must register your web application before it can make OAuth requests to this service
</p>
<% else %>
<p>
You have the following client applications registered:
</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 "Register your application", :action => :new %></h3>

View file

@ -1,6 +0,0 @@
<h1>Register a new application</h1>
<% form_for :client_application, :url => { :action => :create } do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
<br />
<%= submit_tag "Register" %>
<% end %>

View file

@ -1 +0,0 @@
<p>Sorry, that <%= @type -%> could not be found.</p>

View file

@ -1,20 +0,0 @@
<h1>OAuth details for <%=@client_application.name %></h1>
<p>
<b>Consumer Key:</b> <%=@client_application.key %>
</p>
<p>
<b>Consumer Secret:</b> <%=@client_application.secret %>
</p>
<p>
<b>Request Token URL</b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
</p>
<p>
<b>Access Token URL</b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
</p>
<p>
<b>Authorize URL</b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
</p>
<p>
We support hmac-sha1 (recommended) as well as plain text in ssl mode.
</p>

View file

@ -29,7 +29,7 @@
<div id="map" style="border:1px solid black; position:relative; width:500px; height:400px;"></div>
</td></tr>
<tr><td></td><td align=right><br/><%= submit_tag t('user.account.save changes button') %></td></tr>
<tr><td></td><td align=right><br/></br><%= submit_tag t('user.account.save changes button') %></td></tr>
</table>
<br/>
@ -46,39 +46,6 @@
<br /><br />
<%= button_to t('user.account.make all my edits public button'), :action => :go_public %>
<% end %>
<h2><%= t 'user.account.my apps' %></h2>
<% if @tokens.empty? %>
<p><%= t 'oauth.token.none' %></p>
<% else %>
<table>
<tr><th><%= t 'oauth.token.application' %></th><th><%= t 'oauth.token.issued' %></th><th>&nbsp;</th></tr>
<% @tokens.each do |token|%>
<% content_tag_for :tr, token do %>
<td><%= link_to token.client_application.name, token.client_application.url %></td>
<td><%= token.authorized_at %></td>
<td>
<% form_tag :controller => 'oauth', :action => 'revoke' do %>
<%= hidden_field_tag 'token', token.token %>
<%= submit_tag t('oauth.token.revoke') %>
<% end %>
</td>
<% end %>
<% end %>
</table>
<% end %>
<h2><%= t 'user.account.developers' %></h2>
<% if @user.client_applications.empty? %>
<p><%= t 'user.account.dev_intro', :link => "<a href=\"http://oauth.net\">OAuth</a>" %></p>
<p><%= link_to t('user.account.register_app'), :controller => 'oauth_clients', :action => :new %></p>
<% else %>
<p><%= t 'user.account.apps_registered' %></p>
<ul><% @user.client_applications.each do |client| %>
<li><% div_for client do %>
<%= link_to client.name, :controller => 'oauth_clients', :action => :show, :id => client.id %>
<% end %></li>
<% end %></ul>
<p><%= link_to t('user.account.register_another_app'), :controller => 'oauth_clients', :action => :new %></p>
<% end %>
<br/>
<br/>
<%= link_to t('user.account.return to profile'), :controller => 'user', :action => @user.display_name %>