opf/openproject

View on GitHub
app/components/settings/project_custom_field_sections/index_component.html.erb

Summary

Maintainability
Test Coverage
<%=
  component_wrapper(data: wrapper_data_attributes) do
    if @project_custom_field_sections.any?
      flex_layout(classes: 'dragula-container', data: { 'allowed-drop-type': 'section' }.merge(drop_target_config) ) do |flex|
        @project_custom_field_sections.each do |section|
          flex.with_row(
            data: draggable_item_config(section)
          ) do
            render(Settings::ProjectCustomFieldSections::ShowComponent.new(project_custom_field_section: section, first_and_last:))
          end
        end
      end
    end
  end
%>