mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
<%=
|
|
render(
|
|
Primer::Alpha::ActionMenu.new(
|
|
select_variant: :single,
|
|
dynamic_label: true,
|
|
anchor_align: :end,
|
|
color: :subtle,
|
|
data: { test_selector: "op-share-dialog-bulk-update-role" }
|
|
)
|
|
) do |menu|
|
|
menu.with_show_button(scheme: :invisible, color: :subtle, data: { "shares--bulk-selection-target": "bulkUpdateRoleLabel" }) do |button|
|
|
button.with_trailing_action_icon(icon: "triangle-down")
|
|
"Placeholder"
|
|
end
|
|
|
|
@available_roles.each do |role_hash|
|
|
menu.with_item(
|
|
label: role_hash[:label],
|
|
href: update_path,
|
|
method: :patch,
|
|
active: false,
|
|
form_arguments: {
|
|
method: :patch,
|
|
name: "role_ids[]",
|
|
value: role_hash[:value],
|
|
data: { "shares--bulk-selection-target": "bulkForm bulkUpdateRoleForm",
|
|
"role-name": role_hash[:label],
|
|
"test-selector": "op-share-dialog-bulk-update-role-permission-#{role_hash[:label]}" }
|
|
}
|
|
) do |item|
|
|
item.with_description.with_content(role_hash[:description])
|
|
end
|
|
end
|
|
end
|
|
%>
|