1
0
postdoc/app/views/shared/_sidebar.html.erb

20 lines
721 B
Plaintext
Raw Normal View History

2020-12-06 20:49:03 +01:00
<div class="sidebar">
<div class="sidebar__inner-container">
<h1>PostDoc</h1>
</div>
<nav class="nav-list">
<% mailboxes.each do |mailbox| %>
<%= link_to mailbox.name, mailbox_path(mailbox), class: mailbox == current_mailbox ? 'active' : '' %>
<% end %>
</nav>
<% if mailboxes.any? %>
<div class="sidebar-bottom" data-remote-content-url-value="<%= new_mailbox_path %>" data-controller="remote-content">
<%= link_to 'New Mailbox',
new_mailbox_path,
class: "button button--block button--primary",
data: { action: 'click->remote-content#load' } %>
<div data-remote-content-target="outlet"></div>
</div>
<% end %>
</div>