Files
Alexander Brandon Coles d4780dfbb0 [#71327] Do not set draggable=true unless HTML5 DnD
`draggable="true"` enables HTML5 Drag and Drop, which conflicts with the
Dragula-based implementation used by `GenericDragAndDropController`.

https://community.openproject.org/wp/71327
2026-02-02 17:33:41 -03:00

48 lines
1.5 KiB
Plaintext

<%=
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)
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
%>