Add authentication via devise

Signed-off-by: Tobias Eidelpes <tobias@eidelpes.info>
This commit is contained in:
2020-04-14 13:44:45 +02:00
parent 6014c64e64
commit 2f85af35cb
13 changed files with 501 additions and 12 deletions
+14 -6
View File
@@ -18,6 +18,7 @@
<label for="nav-toggle" class="burger-menu">
<%= show_svg('menu-white-24dp.svg') %>
</label>
<a href="#" class="logo">tiss2go</a>
<div class="left-menu">
<%= link_to 'Home', root_path %>
<%= link_to 'People', people_index_path %>
@@ -25,16 +26,23 @@
<%= link_to 'Projects', projects_index_path %>
<%= link_to 'Theses', theses_index_path %>
</div>
<a href="#" class="logo">tiss2go</a>
<div class="right-menu">
<!-- TODO: Change root_path to login/register page -->
<%= link_to 'Logout', root_path %>
<% if user_signed_in? %>
<%= link_to 'Edit profile', edit_user_registration_path %><!--
--><%= link_to "Logout", destroy_user_session_path, method: :delete %>
<% else %>
<%= link_to "Sign up", new_user_registration_path %><!--
--><%= link_to "Login", new_user_session_path %>
<% end %>
</div>
</nav>
<main>
<%= yield %>
</main>
<main>
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
<%= yield %>
</main>
</body>
</html>