2023-03-22 16:42:54 +08:00
|
|
|
<div class="sci--layout--left-menu-container">
|
2023-06-20 16:22:39 +08:00
|
|
|
<div class="pl-2.5 mb-8 h-6">
|
2023-06-12 20:23:26 +08:00
|
|
|
<a title="SciNote" href="/">
|
2023-06-20 16:22:39 +08:00
|
|
|
<%= image_tag "scinote_logo.svg", class: "h-full block" %>
|
2023-06-12 20:23:26 +08:00
|
|
|
</a>
|
|
|
|
</div>
|
2023-04-03 19:20:10 +08:00
|
|
|
<% left_menu_elements.each_with_index do |item, index| %>
|
2024-07-24 17:05:00 +08:00
|
|
|
<%= link_to item[:url], title: item[:title] || item[:name], class:"sci--layout--menu-item", data: { e2e: "e2e-BT-leftMenu-#{item[:name].downcase}", active: item[:submenu].blank? && item[:active], disabled: current_user.teams.blank?, submenu: item[:submenu].any? } do %>
|
2023-06-08 23:33:50 +08:00
|
|
|
<i class="sn-icon <%= item[:icon] %>"></i>
|
2024-07-15 20:40:13 +08:00
|
|
|
<%= item[:name].html_safe %>
|
2023-06-08 23:33:50 +08:00
|
|
|
<i class="sn-icon <%= item[:active] ? 'sn-icon-down' : 'sn-icon-right' %> show-submenu"></i>
|
2023-04-03 19:20:10 +08:00
|
|
|
<% end %>
|
|
|
|
<% if item[:submenu].any? %>
|
|
|
|
<div class="sci--layout--menu-submenu" data-id="<%= index %>" data-collapsed="<%= !item[:active] %>" style="--submenu-items:<%= item[:submenu].length %>">
|
|
|
|
<% item[:submenu].each do |subitem| %>
|
2024-07-24 23:08:34 +08:00
|
|
|
<%= link_to subitem[:url], title: subitem[:title] || subitem[:name], class:"sci--layout--menu-item", data: { e2e: "e2e-BT-leftMenu-#{item[:name].downcase}-#{subitem[:name].downcase}", active: subitem[:active], disabled: current_user.teams.blank? } do %>
|
2023-06-12 20:23:26 +08:00
|
|
|
<i class="sn-icon sn-icon-dot-small"></i>
|
2024-07-15 20:40:13 +08:00
|
|
|
<%= subitem[:name].html_safe %>
|
2023-04-03 19:20:10 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2023-03-22 16:42:54 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2018-03-14 21:33:34 +08:00
|
|
|
</div>
|