more beautiful button and export
Some checks failed
/ Run tests (push) Successful in 1m41s
/ Build, push and deploy image (push) Has been cancelled
/ Run system tests (push) Has been cancelled

This commit is contained in:
david 2024-11-17 19:00:52 +01:00
parent e576aa1e39
commit bf03407bb9
2 changed files with 15 additions and 16 deletions

View file

@ -42,21 +42,19 @@ module ApplicationHelper
end end
end + end +
tag.div(class: "details-dropdown-content bg-secondary") do tag.div(class: "details-dropdown-content bg-secondary") do
tag.ul(class: "list-group") do tag.div(class: "list-group") do
safe_join(items.map do |item| safe_join(items.map do |item|
tag.li(class: "list-group-item list-group-item-action#{ item[:color] ? " list-group-item-#{item[:color]}" : ""}") do c = "list-group-item list-group-item-action #{ item[:color] ? " list-group-item-#{item[:color]}" : "list-group-item-secondary"}"
text = item[:icon] ? tag.i(class: "bi bi-#{item[:icon]} me-2") + " #{item[:text]}".html_safe : item[:text] text = item[:icon] ? tag.i(class: "bi bi-#{item[:icon]} me-2") + " #{item[:text]}".html_safe : item[:text]
case item[:method] case item[:method]
when nil, :get when nil, :get
link_to(text, item[:href], class: "text-decoration-none text-body") link_to(text, item[:href], class: "#{c}")
else else
button_to(text, button_to(text,
item[:href], item[:href],
method: item[:method], method: item[:method],
form_class: "no-padding", class: "#{c}",
class: "btn btn-link text-decoration-none text-#{item[:color] ? "#{item[:color]}-emphasis" : "body"}", data: { turbo_confirm: item[:confirm] })
data: { turbo_confirm: item[:confirm] })
end
end end
end) end)
end end

View file

@ -58,8 +58,9 @@ h2 2 Protokoll
/h4 /h4
= "2.#{current_abs_element_pos}.#{current_sc_pos} #{sc.title}" = "2.#{current_abs_element_pos}.#{current_sc_pos} #{sc.title}"
h5 = "2.#{current_page_pos}.#{current_element_pos}.#{current_sc_pos}" h5 = "2.#{current_page_pos}.#{current_element_pos}.#{current_sc_pos}"
strong Protokoll-Nummer p
=< sc.number strong Protokoll-Nummer
=< sc.number
- if sc.test_comment? - if sc.test_comment?
p = sc.test_comment p = sc.test_comment
- safe_display(sc.quick_criterion) do - safe_display(sc.quick_criterion) do