1
0
postdoc/app/views/shared/_sidebar.html.erb
2020-12-06 21:05:11 +01:00

20 lines
721 B
Plaintext

<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>