Mobile authorizations index view
This commit is contained in:
parent
7f69714d08
commit
9a77d3518f
2 changed files with 29 additions and 1 deletions
24
app/views/authorizations/index.mobile.haml
Normal file
24
app/views/authorizations/index.mobile.haml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
%h3
|
||||
= t('_applications')
|
||||
#applications_stream.stream
|
||||
- if @applications.count > 0
|
||||
- for app in @applications
|
||||
.stream_element{:id => app.id}
|
||||
.right
|
||||
= link_to t('.revoke_access'), authorization_path(:id => app.id), :method => :delete, :confirm => 'are you sure?', :class => "button"
|
||||
|
||||
- if app.icon_url
|
||||
= image_tag(app.application_base_url + app.icon_url, :class => "avatar")
|
||||
|
||||
.content
|
||||
%div.from
|
||||
= link_to app.name, app.application_base_url
|
||||
= app.description
|
||||
|
||||
- else
|
||||
You haven't registered any applications yet.
|
||||
%br
|
||||
|
|
@ -81,7 +81,7 @@ describe AuthorizationsController do
|
|||
post :token, @params_hash
|
||||
response.code.should == "200"
|
||||
end
|
||||
|
||||
|
||||
it 'renders something for localhost' do
|
||||
prepare_manifest("http://localhost:3423/")
|
||||
@controller.stub!(:verify).and_return('ok')
|
||||
|
|
@ -133,6 +133,10 @@ describe AuthorizationsController do
|
|||
get :index
|
||||
response.should be_success
|
||||
end
|
||||
it 'succeeds on a phone' do
|
||||
get :index, :format => :mobile
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
it 'assigns the auth. & apps for the current user' do
|
||||
app1 = Factory.create(:app, :name => "Authorized App")
|
||||
|
|
|
|||
Loading…
Reference in a new issue