mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
d4780dfbb0
`draggable="true"` enables HTML5 Drag and Drop, which conflicts with the Dragula-based implementation used by `GenericDragAndDropController`. https://community.openproject.org/wp/71327
48 lines
1.5 KiB
Plaintext
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
|
|
%>
|