Add admin layout with admin navigation
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

And remove the hacky link list from the dashboard.
This commit is contained in:
2020-12-28 09:32:04 +01:00
parent 9ddd36c414
commit 2bdf08a523
14 changed files with 114 additions and 13 deletions

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<title>Admin Panel | Kosmos Accounts</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body id="admin-panel">
<div id="wrapper">
<header>
<h1>
<span class ="project-name">Kosmos</span>
<span class ="site-name">Akkounts</span>
<span class="beta"><span class="bolt">⚡</span> beta</span>
</h1>
<% if user_signed_in? %>
<p class="current-user">
Signed in as <strong><%= current_user.cn %>@kosmos.org</strong>.
<%= link_to "Log out", destroy_user_session_path, method: :delete %>
</p>
<% end %>
</header>
<% if user_signed_in? && current_user.confirmed? %>
<%= render partial: 'shared/admin_nav' %>
<% end %>
<% flash.each do |type, msg| %>
<div class="flash-msg <%= type %>">
<p><%= msg %></p>
</div>
<% end %>
<main>
<%= yield %>
</main>
</div>
</body>
</html>