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
|
|
@ -27,19 +27,20 @@ module SuccessCriteriaHelper
|
|||
|
||||
def success_criterion_menu(success_criterion, show_mode = true)
|
||||
dropdown_menu([
|
||||
{ text: show_mode ? "Bearbeiten" : "Bearbeiten abbrechen",
|
||||
icon: "pencil",
|
||||
href: show_mode ? edit_success_criterion_path(success_criterion) : success_criterion_path(success_criterion)},
|
||||
{ text: "Löschen",
|
||||
icon: "trash",
|
||||
href: success_criterion_path(success_criterion),
|
||||
color: :danger,
|
||||
method: :delete,
|
||||
confirm: "Bist du sicher?"}],
|
||||
klass: "mt-3 ms-auto")
|
||||
{ text: "Bearbeiten",
|
||||
icon: "pencil",
|
||||
href: edit_success_criterion_path(success_criterion),
|
||||
turbo_frame: "modal",
|
||||
color: "body" },
|
||||
{ text: "Löschen",
|
||||
icon: "trash",
|
||||
href: success_criterion_path(success_criterion),
|
||||
color: :danger,
|
||||
method: :delete,
|
||||
confirm: "Bist du sicher?" } ],
|
||||
klass: "mt-3 ms-auto")
|
||||
end
|
||||
|
||||
|
||||
def success_criterion_edit_button(success_criterion, edit_mode)
|
||||
path = if success_criterion.persisted?
|
||||
if edit_mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue