diff options
author | Matthew Lemon <y@yulqen.org> | 2024-12-15 15:10:05 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-12-15 15:10:14 +0000 |
commit | f1d04d1390ac0e755e6ac4778927bf06c86e9ba3 (patch) | |
tree | 54d7f70f574dd6bfa300e00dad7b717af3ad180e /app/views/layouts | |
parent | da69dec36f9ee1f09cf19fbaae4c138051847357 (diff) |
Refactor user session handling and UI enhancements.
Updated logout redirection with a success notice and improved UI feedback on the home page. Enhanced navbar logic to reflect user authentication state, modified page titles, and adjusted access permissions for various controllers. Fixed admin access control for PDF resources index action.
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_navbar.html.erb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb index af7a0e4..952e291 100644 --- a/app/views/layouts/_navbar.html.erb +++ b/app/views/layouts/_navbar.html.erb @@ -15,16 +15,17 @@ <a href="#" class="block py-2 px-3 rounded">About</a> </li> <li> - <a href="#" class="block py-2 px-3 rounded">Services</a> - </li> - <li> - <a href="#" class="block py-2 px-3 rounded">Pricing</a> + <a href="#" class="block py-2 px-3 rounded">FAQ</a> </li> <li> <a href="#" class="block py-2 px-3 rounde">Contact</a> </li> <li> - <%= link_to "Log out", Current.session, class: "block py-2 px-3", data: { turbo_method: :delete }%> + <% if Current.user %> + <%= link_to "Log out", Current.session, class: "block py-2 px-3", data: { turbo_method: :delete } %> + <% else %> + <%= link_to "Log in", new_session_path, class: "block py-2 px-3" %> + <% end %> </li> </ul> </div> |