Open-Source-Access-Control-.../app/views/layouts/application.html.erb

50 lines
2.2 KiB
Plaintext
Executable File

<!DOCTYPE html>
<html>
<head>
<title>hsl_members(<%= controller.controller_name %>.<%= controller.action_name %><%= "["+params[:id]+"]" unless params[:id].blank? %>)</title>
<link rel="icon" href="/favicon.ico">
<% if params[:controller] == "resources" %>
<link href="/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="/bootstrap/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
<script src="/bootstrap/js/bootstrap.min.js" type="text/javascript" ></script>
<% else %>
<%= stylesheet_link_tag "application", :media => "all" %>
<% end %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="header">
<a id="home_nav_link" href="/" title="Home"><img src="/assets/logo.png" id="logo" /></a>
<%= link_to 'People', users_path if can? :read, User %>
<%= link_to 'Tools & Resources', resources_path if can? :read, Resource %>
<%= link_to 'Access Cards', cards_path if can? :manage, Card %>
<% if can? :create, UserCertification %>
<%= link_to 'Cert Classes', certifications_path if can? :read, Certification %>
<%= link_to 'User Certs', user_certifications_path if can? :create, UserCertification %>
<% else %>
<%= link_to 'Certifications', certifications_path if can? :read, Certification %>
<% end %>
<%= link_to 'Waivers', contracts_path if can? :read, Contract %>
<%= link_to 'Payments', payments_path if can? :create, Payment %>
<%= link_to 'Computers', macs_path if user_signed_in? || (can? :read, Mac) %>
<%= link_to 'Settings', settings_path if can? :read, Setting %>
<% if user_signed_in? then %><%= link_to 'Profile', edit_user_registration_path %><% end %>
<%= link_to 'Logout', destroy_user_session_path, :method => :delete if user_signed_in? %>
<%= link_to 'Login', new_user_session_path unless user_signed_in? %>
<%= link_to 'Membership Application', new_user_registration_path unless user_signed_in? %>
</div>
<div id="content">
<% if notice %>
<p class="notice"><%= raw(notice) %></p>
<% end %>
<% if alert %>
<p class="alert"><%= raw(alert) %></p>
<% end %>
<%= yield %>
</div>
<%= raw Setting.analytics_code if Setting.present? %>
</body>
</html>