Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
34179d60db
7 changed files with 15 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ class PeopleController < ApplicationController
|
|||
|
||||
@person = Person.find(params[:id].to_id)
|
||||
@post_type = :all
|
||||
|
||||
@aspect = :none
|
||||
if @person
|
||||
@profile = @person.profile
|
||||
@contact = current_user.contact_for(@person)
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ class PhotosController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
@aspect = :none
|
||||
@photo = current_user.find_visible_post_by_id params[:id]
|
||||
unless @photo
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class StatusMessagesController < ApplicationController
|
|||
|
||||
def index
|
||||
@aspect = :profile
|
||||
@post_type = :status_message
|
||||
@post_type = :status_messages
|
||||
|
||||
@person = Person.find(params[:person_id].to_id)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
- if aspect == :all
|
||||
%h3=t('.nobody')
|
||||
%h4= link_to t('.add_friend'), aspects_manage_path
|
||||
%h4= link_to t('.invite'), aspects_manage_path
|
||||
%h4= link_to t('.invite'), "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => t('.invite')
|
||||
- else
|
||||
%h3=t('.nobody_in_aspect', :aspect_name => aspect.name)
|
||||
%h4= link_to t('.add_friend_to', :aspect_name => aspect.name), "#add_request_pane", :class => "add_request_button"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
});
|
||||
});
|
||||
|
||||
.span-24.last
|
||||
.span-15.last
|
||||
#thumbnails
|
||||
- for photo in photos
|
||||
.image_thumb
|
||||
|
|
|
|||
|
|
@ -16,3 +16,4 @@
|
|||
= link_to t('.view_profile'), person_path(person)
|
||||
= link_to t('_photos'), person_photos_path(person)
|
||||
= link_to 'status messages', person_status_messages_path(person)
|
||||
= "viewing: #{@post_type.to_s.titleize}" if defined?(@post_type)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ describe ServicesController do
|
|||
|
||||
before do
|
||||
sign_in :user, user
|
||||
@controller.stub!(:current_user).and_return(user)
|
||||
mock_access_token.stub!(:token).and_return("12345")
|
||||
mock_access_token.stub!(:secret).and_return("56789")
|
||||
end
|
||||
|
|
@ -40,11 +41,17 @@ describe ServicesController do
|
|||
end
|
||||
|
||||
it 'should redirect to getting started if the user still getting started' do
|
||||
|
||||
user.getting_started = true
|
||||
request.env['omniauth.auth'] = omniauth_auth
|
||||
post :create
|
||||
response.should redirect_to getting_started_path(:step => 3)
|
||||
end
|
||||
|
||||
it 'should redirect to services url' do
|
||||
|
||||
user.getting_started = false
|
||||
request.env['omniauth.auth'] = omniauth_auth
|
||||
post :create
|
||||
response.should redirect_to services_url
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue