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? %>
|
2020-12-08 23:07:26 +08:00
|
|
|
<i class="fas fa-caret-right toggle-branch collapsed"></i>
|
|
|
|
<% 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 %>
|
|
|
|
<i class="fas fa-folder"></i>
|
|
|
|
<%= record[:folder].name %>
|
|
|
|
<% end%>
|
|
|
|
<ul class="sidebar-branch">
|
|
|
|
<%= render partial: 'shared/sidebar/projects_tree_branch.html.erb', locals: { records: record[:children] } %>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|