scinote-web/app/views/shared/_state_view_switch.html.erb

21 lines
934 B
Text
Raw Normal View History

<div class="dropdown view-switch" >
2023-06-15 21:12:51 +08:00
<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">
2023-05-09 20:53:50 +08:00
<span class="state-view-switch-btn-name"><%= archived ? t('toolbar.archived_state') : t('toolbar.active_state') %></span>
2023-06-22 17:55:23 +08:00
<span class="sn-icon sn-icon-down"></span>
2023-06-15 21:12:51 +08:00
</div>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="viewSwitchButton">
2023-05-09 20:53:50 +08:00
<% if switchable %>
<li>
2023-06-01 18:20:56 +08:00
<%= link_to active_url, class: "#{ 'form-dropdown-state-item prevent-shrink' unless archived }" do %>
2023-05-09 20:53:50 +08:00
<%= t('toolbar.active_state') %>
<% end %>
</li>
<li>
2023-06-01 18:20:56 +08:00
<%= link_to archived_url, class: "#{ 'form-dropdown-state-item prevent-shrink' if archived }" do %>
2023-05-09 20:53:50 +08:00
<%= t('toolbar.archived_state') %>
<% end %>
</li>
<% end %>
</ul>
</div>