change root_path and root_url to multi_path
This commit is contained in:
parent
52aaf33296
commit
6be778b9b2
9 changed files with 14 additions and 14 deletions
|
|
@ -94,7 +94,7 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
def redirect_unless_admin
|
||||
unless current_user.admin?
|
||||
redirect_to root_url, :notice => 'you need to be an admin to do that'
|
||||
redirect_to multi_url, :notice => 'you need to be an admin to do that'
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class PostsController < ApplicationController
|
|||
current_user.retract(@post)
|
||||
respond_to do |format|
|
||||
format.js {render 'destroy'}
|
||||
format.all {redirect_to root_url}
|
||||
format.all {redirect_to multi_path}
|
||||
end
|
||||
else
|
||||
Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class StatusMessagesController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.js { render :create, :status => 201}
|
||||
format.html { redirect_to :back}
|
||||
format.mobile{ redirect_to root_url}
|
||||
format.mobile{ redirect_to multi_path}
|
||||
end
|
||||
else
|
||||
unless photos.empty?
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class UsersController < ApplicationController
|
|||
current_user.lock_access!
|
||||
sign_out current_user
|
||||
flash[:notice] = I18n.t 'users.destroy.success'
|
||||
redirect_to root_path
|
||||
redirect_to multi_path
|
||||
else
|
||||
if params[:user].present? && params[:user][:current_password].present?
|
||||
flash[:error] = t 'users.destroy.wrong_password'
|
||||
|
|
@ -109,7 +109,7 @@ class UsersController < ApplicationController
|
|||
format.any { redirect_to person_path(user.person.id) }
|
||||
end
|
||||
else
|
||||
redirect_to root_url, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
|
||||
redirect_to multi_path, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -125,14 +125,14 @@ class UsersController < ApplicationController
|
|||
def logged_out
|
||||
@page = :logged_out
|
||||
if user_signed_in?
|
||||
redirect_to root_path
|
||||
redirect_to multi_path
|
||||
end
|
||||
end
|
||||
|
||||
def getting_started_completed
|
||||
user = current_user
|
||||
user.update_attributes(:getting_started => false)
|
||||
redirect_to root_path
|
||||
redirect_to multi_path
|
||||
end
|
||||
|
||||
def export
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class VannaController < Vanna::Base
|
|||
|
||||
def redirect_unless_admin
|
||||
unless current_user.admin?
|
||||
redirect_to root_url, :notice => 'you need to be an admin to do that'
|
||||
redirect_to multi_path, :notice => 'you need to be an admin to do that'
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
.container{:style => "position:relative;"}
|
||||
- if current_user
|
||||
= link_to image_tag('logo_small.png', :height => "16px", :width => "161px", :class => "diaspora_header_logo"), root_path
|
||||
= link_to image_tag('logo_small.png', :height => "16px", :width => "161px", :class => "diaspora_header_logo"), multi_path
|
||||
- else
|
||||
= link_to image_tag('logo_large.png', :height => "32px", :width => "321px", :class => "diaspora_header_logo"), root_path
|
||||
= link_to image_tag('logo_large.png', :height => "32px", :width => "321px", :class => "diaspora_header_logo"), multi_path
|
||||
|
||||
- if !current_user
|
||||
.right
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
%h4
|
||||
= t('.simply_visit')
|
||||
%strong
|
||||
= link_to AppConfig[:pod_url], root_url
|
||||
= link_to AppConfig[:pod_url], multi_path
|
||||
= t('.on_your_mobile_device')
|
||||
|
||||
%p.dull
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ DIASPORA* ALPHA
|
|||
<li><a href="http://twitter.com/joindiaspora">@joindiaspora</a></li>
|
||||
<li><a href="https://github.com/diaspora/diaspora">github</a></li>
|
||||
<li><a href="http://blog.joindiaspora.com/">blog</a></li>
|
||||
<li><a href="/users/sign_in" class="login">log in</a></li>
|
||||
<li><a href="/users/sign_in" class="login">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ describe AdminsController do
|
|||
context 'admin not signed in' do
|
||||
it 'is behind redirect_unless_admin' do
|
||||
get :user_search
|
||||
response.should redirect_to root_url
|
||||
response.should redirect_to multi_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ describe AdminsController do
|
|||
context 'admin not signed in' do
|
||||
it 'is behind redirect_unless_admin' do
|
||||
get :admin_inviter
|
||||
response.should redirect_to root_url
|
||||
response.should redirect_to multi_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue