Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

1.5 KB
Raw Blame
<%=
  component_wrapper do
    flex_layout(align_items: :center, justify_content: :space_between) do |enumeration_container|
      enumeration_container.with_column(flex_layout: true) do |enumeration_info|
        enumeration_info.with_column(mr: 2) do
          render(Primer::OpenProject::DragHandle.new(draggable: true))
        end

        if colored?
          enumeration_info.with_column(mr: 2) do
            helpers.icon_for_color enumeration.color
          end
        end

        enumeration_info.with_column(mr: 2) do
          render(Primer::Beta::Link.new(href: helpers.url_for(action: :edit, id: enumeration), underline: false)) do
            render(Primer::Beta::Text.new(font_weight: :bold)) { enumeration.name }
          end
        end

        unless enumeration.active?
          enumeration_info.with_column(mr: 2) do
            render(Primer::Beta::Text.new(color: :subtle, font_size: :small)) { t(:label_inactive) }
          end
        end

        if enumeration.is_default?
          enumeration_info.with_column(mr: 2) do
            render(Primer::Beta::Text.new(color: :subtle, font_size: :small)) { t(:label_default) }
          end
        end
      end

      enumeration_container.with_column do
        render(Primer::Alpha::ActionMenu.new(test_selector: "op-enumeration--action-menu")) do |menu|
          menu.with_show_button(
            icon: "kebab-horizontal",
            scheme: :invisible,
            "aria-label": "Actions"
          )

          build_enumeration_menu(menu)
        end
      end
    end
  end
%>