diff --git a/app/views/layouts/_join_exit_project.html.erb b/app/views/layouts/_join_exit_project.html.erb
index 1d302babf..9cd376c60 100644
--- a/app/views/layouts/_join_exit_project.html.erb
+++ b/app/views/layouts/_join_exit_project.html.erb
@@ -1,19 +1,24 @@
-
- <% if ( !(User.current.member_of? @project) && User.current.login?) %>
+
+ <% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
<%= watcher_link_for_project(@project, User.current) %>
<% end %>
- <% if ( !(User.current.member_of? @project) && User.current.login?) %>
+ <% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
<%= join_in_project_link(@project, User.current) %>
<% end %>
-
+
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
<%= link_to "#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
<% end %>
- <% if Member.where(:user_id => User.current.id, :project_id=>@project.id).first.roles.first.to_s.include?("Manager") || User.current.admin? %>
+
+ <% if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s.include?("Manager")) || User.current.admin? %>
<%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
- <% else %>
+ <% end %>
+
+ <% if (User.current.member_of? @project) && User.current.login? &&
+ Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s != "Manager" %>
<%= exit_project_link(@project) %>
<% end %>
+