2020-12-08 23:07:26 +08:00
|
|
|
<% records.each do |record| %>
|
|
|
|
<% if record[:project] %>
|
|
|
|
<li class="sidebar-leaf">
|
2021-01-07 21:58:56 +08:00
|
|
|
<% if record[:project].archived? %>
|
2021-02-23 22:00:11 +08:00
|
|
|
<%= link_to record[:project].name, project_url(record[:project], view_mode: :archived), title: record[:project].name, class: 'sidebar-link' %>
|
2021-01-07 21:58:56 +08:00
|
|
|
<% else %>
|
2021-02-23 22:00:11 +08:00
|
|
|
<%= link_to record[:project].name, project_url(record[:project]), title: record[:project].name, class: 'sidebar-link' %>
|
2021-01-07 21:58:56 +08:00
|
|
|
<% end %>
|
2020-12-08 23:07:26 +08:00
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<li class="sidebar-leaf">
|
2021-07-23 17:56:28 +08:00
|
|
|
<% unless record[:children].blank? %>
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-right toggle-branch collapsed"></i>
|
2020-12-08 23:07:26 +08:00
|
|
|
<% end %>
|
|
|
|
<%= link_to project_folder_path(record[:folder]),
|
2021-01-19 18:28:59 +08:00
|
|
|
class: "sidebar-link project-folder-link folder #{'selected' if current_folder == record[:folder]}",
|
2021-02-23 22:00:11 +08:00
|
|
|
title: record[:folder].name,
|
2020-12-08 23:07:26 +08:00
|
|
|
data: {
|
|
|
|
sidebar_url: sidebar_team_path(current_team, project_folder_id: record[:folder].id),
|
|
|
|
projects_cards_url: project_folder_cards_url(record[:folder])
|
|
|
|
} do %>
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-folder"></i>
|
2020-12-08 23:07:26 +08:00
|
|
|
<%= record[:folder].name %>
|
|
|
|
<% end%>
|
|
|
|
<ul class="sidebar-branch">
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'shared/sidebar/projects_tree_branch', locals: { records: record[:children] } %>
|
2020-12-08 23:07:26 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|