mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
1948ab4e55
* Set color for icons in status button of projects and meetings * Apply suggestion from @HDinger Co-authored-by: Henriette Darge <h.darge@openproject.com> --------- Co-authored-by: Henriette Darge <h.darge@openproject.com>
24 lines
807 B
Plaintext
24 lines
807 B
Plaintext
<%=
|
|
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, classes: highlight_class_name(option, :inline)) 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
|
|
%>
|