scinote-web/app/views/shared/_state_view_switch.html.erb
2023-06-15 15:12:51 +02:00

20 lines
930 B
Text

<div class="dropdown view-switch" >
<div href="#" class="btn btn-light view-switch-button prevent-shrink <%= "disabled" if disabled %>" id="viewSwitchButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="state-view-switch-btn-name"><%= archived ? t('toolbar.archived_state') : t('toolbar.active_state') %></span>
<span class="caret pull-right"></span>
</div>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="viewSwitchButton">
<% if switchable %>
<li>
<%= link_to active_url, class: "#{ 'form-dropdown-state-item prevent-shrink' unless archived }" do %>
<%= t('toolbar.active_state') %>
<% end %>
</li>
<li>
<%= link_to archived_url, class: "#{ 'form-dropdown-state-item prevent-shrink' if archived }" do %>
<%= t('toolbar.archived_state') %>
<% end %>
</li>
<% end %>
</ul>
</div>