Add screenshots to elements
This commit is contained in:
parent
c7c6023acf
commit
2293751fe2
18 changed files with 232 additions and 20 deletions
9
app/views/elements/_form.html.slim
Normal file
9
app/views/elements/_form.html.slim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
= bootstrap_form_with(model: element.persisted? ? element : [:page, element], class: "mb-3") do |form|
|
||||
= form.hidden_field :page_id
|
||||
= form.text_field :title
|
||||
= form.rich_text_area :description
|
||||
= form.file_field :screenshot
|
||||
- if element.persisted?
|
||||
= safe_display(element.screenshot) { tag.div(link_to(_1.filename.to_s, _1), class: "mb-3") }
|
||||
= form.submit class: "btn btn-primary"
|
||||
= link_to("Abbrechen", element.persisted? ? element : element.report, class: "btn btn-outline-secondary")
|
||||
Loading…
Add table
Add a link
Reference in a new issue