Skip to content
Snippets Groups Projects

Update homepage and add login/logout to nav

Merged Jeff Sturek requested to merge JSTUREK8/unl-resource-scheduler:login-update into master
2 files
+ 45
32
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -3,29 +3,34 @@
<% unless @space.nil? %>
<li><a href="<%= @space.calendar_href %>">Calendar</a></li>
<li><a href="<%= @space.resources_href %>">Resources</a></li>
<% unless @user.nil? || !@user.is_admin?(@space) %>
<li><a href="<%= @space.admin_href %>" title="Admin">Admin</a>
<ul>
<% if @user.has_permission?(Permission::MANAGE_USERS, @space) || @user.has_permission?(Permission::SUPER_USER, @space) %>
<li><a href="/<%= @space.url_name %>/admin/users/" title="Users">Users</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_EVENTS, @space) %>
<li><a href="/<%= @space.url_name %>/admin/events/" title="Events">Events</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_RESOURCES, @space) %>
<li><a href="/<%= @space.url_name %>/admin/resources/" title="Resources">Resources</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_SPACE_HOURS, @space) %>
<li><a href="/<%= @space.url_name %>/admin/hours/" title="Hours">Hours</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_EMAILS, @space) %>
<li><a href="/<%= @space.url_name %>/admin/email/" title="Email">Email</a></li>
<% end %>
<% if @user.has_permission?(Permission::SEE_AGENDA, @space) %>
<li><a href="/<%= @space.url_name %>/admin/agenda/" title="Agenda">Agenda</a></li>
<% end %>
</ul>
</li>
<% unless @user.nil? || !@user.is_admin?(@space) %>
<li><a href="<%= @space.admin_href %>" title="Admin">Admin</a>
<ul>
<% if @user.has_permission?(Permission::MANAGE_USERS, @space) || @user.has_permission?(Permission::SUPER_USER, @space) %>
<li><a href="/<%= @space.url_name %>/admin/users/" title="Users">Users</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_EVENTS, @space) %>
<li><a href="/<%= @space.url_name %>/admin/events/" title="Events">Events</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_RESOURCES, @space) %>
<li><a href="/<%= @space.url_name %>/admin/resources/" title="Resources">Resources</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_SPACE_HOURS, @space) %>
<li><a href="/<%= @space.url_name %>/admin/hours/" title="Hours">Hours</a></li>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_EMAILS, @space) %>
<li><a href="/<%= @space.url_name %>/admin/email/" title="Email">Email</a></li>
<% end %>
<% if @user.has_permission?(Permission::SEE_AGENDA, @space) %>
<li><a href="/<%= @space.url_name %>/admin/agenda/" title="Agenda">Agenda</a></li>
<% end %>
</ul>
</li>
<% end %>
<% end %>
<% if @user.nil? %>
<li><a href="https://shib.unl.edu/idp/profile/cas/login?service=<%= "http://#{request.host}#{":" if request.port != 80}#{request.port if request.port != 80}#{request.path_info}" %>">Log In</a></li>
<% else %>
<li><a href="/logout" title="Logout">Logout</a></li>
<% end %>
<% end %>
</ul>
Loading