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

759 B
Raw Blame
<%=
  if @readonly || @items.empty?
    render(Primer::Beta::Button.new(**button_arguments)) do |button|
      button_content(button)
    end
  else
    render(Primer::Alpha::ActionMenu.new(**@menu_arguments)) do |menu|
      menu.with_show_button(**button_arguments) do |button|
        button_content(button)
      end

      @items.each do |option|
        menu.with_item(**option.item_arguments) do |item|
          item.with_leading_visual_icon(icon: option.icon) if option.icon
          item.with_description.with_content(option.description) if option.description

          classes = option.colored? ? highlight_class_name(option, :inline) : ""
          render(Primer::Beta::Text.new(classes:)) { option.name }
        end
      end
    end
  end
%>