2023-04-20 19:40:38 +08:00
|
|
|
<div class="dropdown view-switch" >
|
2023-06-28 02:31:25 +08:00
|
|
|
<div href="#" class="btn btn-light btn-black 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>
|
2023-04-20 19:40:38 +08:00
|
|
|
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="viewSwitchButton">
|
2023-05-09 20:53:50 +08:00
|
|
|
<% if switchable %>
|
2023-07-18 15:14:38 +08:00
|
|
|
<li class="view-switch-active">
|
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>
|
2023-07-18 15:14:38 +08:00
|
|
|
<li class="view-switch-archived">
|
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 %>
|
2023-04-20 19:40:38 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|