Model menus, modal edit and layout improvements
This commit is contained in:
parent
7b0f05a448
commit
70500c49a1
35 changed files with 1079 additions and 148 deletions
|
|
@ -1,4 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ElementsHelper
|
||||
def element_menu(element)
|
||||
dropdown_menu([
|
||||
{ text: "Bearbeiten",
|
||||
icon: "pencil",
|
||||
href: edit_element_path(element),
|
||||
turbo_frame: "modal",
|
||||
color: "body" },
|
||||
{ text: "Löschen",
|
||||
icon: "trash",
|
||||
href: element_path(element),
|
||||
color: :danger,
|
||||
method: :delete,
|
||||
confirm: "Bist du sicher?" } ],
|
||||
klass: "ms-auto")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue