Add main navigation bar
Make donations and invitations accessible to everyone
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
<% end %>
|
||||
</header>
|
||||
|
||||
<% if user_signed_in? && current_user.confirmed? %>
|
||||
<%= render partial: 'shared/main_nav' %>
|
||||
<% end %>
|
||||
|
||||
<% flash.each do |type, msg| %>
|
||||
<div class="flash-msg <%= type %>">
|
||||
<p><%= msg %></p>
|
||||
|
||||
22
app/views/shared/_main_nav.html.erb
Normal file
22
app/views/shared/_main_nav.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<nav id="main-nav">
|
||||
<div class="wrapper">
|
||||
<div class="site">
|
||||
</div>
|
||||
<ul class="pages">
|
||||
<li>
|
||||
<%= link_to "Services", root_path,
|
||||
class: @current_section == "dashboard" ? "active" : nil %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "Donations", donations_path,
|
||||
class: @current_section == "contributions" ? "active" : nil %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "Invitations", invitations_path,
|
||||
class: @current_section == "invitations" ? "active" : nil %>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="user">
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user