Project initialize
This commit is contained in:
49
app/views/layouts/application.html.erb
Normal file
49
app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Project Management System</title>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<% if user_signed_in? %>
|
||||
<nav class="main-nav">
|
||||
<div class="nav-container">
|
||||
<div class="nav-brand">
|
||||
<%= link_to 'Project Manager', root_path, class: 'brand-link' %>
|
||||
</div>
|
||||
|
||||
<div class="nav-menu">
|
||||
<%= link_to 'Dashboard', dashboard_path, class: 'nav-link' %>
|
||||
<%= link_to 'Tasks', tasks_path, class: 'nav-link' %>
|
||||
<% if current_user.admin? || current_user.manager? %>
|
||||
<%= link_to 'Departments', departments_path, class: 'nav-link' %>
|
||||
<% end %>
|
||||
<% if current_user.admin? %>
|
||||
<%= link_to 'Users', new_user_registration_path, class: 'nav-link' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="nav-user">
|
||||
<span class="user-info">
|
||||
<%= current_user.name %> (<%= current_user.role.humanize %>)
|
||||
</span>
|
||||
<%= link_to 'Sign Out', destroy_user_session_path, method: :delete, class: 'nav-link sign-out' %>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<% end %>
|
||||
|
||||
<% if flash[:notice] %>
|
||||
<div class="notice"><%= flash[:notice] %></div>
|
||||
<% end %>
|
||||
<% if flash[:alert] %>
|
||||
<div class="alert"><%= flash[:alert] %></div>
|
||||
<% end %>
|
||||
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user