diff --git a/app/models/user.rb b/app/models/user.rb index 351e7be..304b58e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -112,6 +112,7 @@ # returns the first organisation id of the user or nil # # @return [Integer, nil] the id of the user's organisation +=begin def organisation_id if self.organisations.count > 0 then return self.organisations.first.id @@ -119,7 +120,8 @@ return nil end end - +=end + ## # returns the organisation of the user or nil # diff --git a/app/views/layouts/_dmponline_signin_signout.html.erb b/app/views/layouts/_dmponline_signin_signout.html.erb index 544aa16..e7ff108 100644 --- a/app/views/layouts/_dmponline_signin_signout.html.erb +++ b/app/views/layouts/_dmponline_signin_signout.html.erb @@ -12,7 +12,7 @@
  • <%= link_to t("helpers.admin_area"), "/admin", :class => "signIn_dropdown_link" %>
  • <%end%> <% if current_user.can_org_admin? %> -
  • <%= link_to t("org_admin.admin_area"), admin_index_dmptemplate_path(current_user.organisation_id), :class => "signIn_dropdown_link" %>
  • +
  • <%= link_to t("org_admin.admin_area"), admin_index_dmptemplate_path(current_user.organisation_id), :class => "signIn_dropdown_link" %>
  • <%end%>
  • <%= link_to t("helpers.sign_out"), destroy_user_session_path, method: :delete, :class => "signIn_dropdown_link" %>