Subjects

<% Cdao::Subject.roots.all.each do |root| %>
<% if root.children.present? %> <% else %> <%= link_to root.name, subject_index_path(root.id), class: "accordion-link text-decoration-none text-dark d-block sub1 clickable-link" %> <%= link_to "Add Sub Subject", new_subject_index_path(parent_id: root.id), class: "btn btn-sm btn-primary text-decoration-none d-block sub1 clickable-link position-absolute end-0 accordion-action-button-margin" %> <% end %>
" data-bs-parent="#mainPanel<%= root.id %>">
<%= render(SubjectAccordionComponent.new(current_user: current_user, parent: root)) %>
<% end %>