2023-01-11 19:52:58 +01:00
|
|
|
.grid.grid-cols-3
|
|
|
|
%div
|
|
|
|
%div
|
|
|
|
%h1 Editing story
|
2023-01-18 11:40:19 +01:00
|
|
|
= simple_form_for @story do |f|
|
|
|
|
= f.error_notification
|
2023-01-11 17:48:06 +01:00
|
|
|
|
2023-01-12 13:34:00 +01:00
|
|
|
= f.input :picture , as: :file , label: (@story.picture.blank? ? "Add picture" : "Change picture")
|
2023-01-11 19:52:58 +01:00
|
|
|
= f.input :header
|
2023-01-12 13:34:00 +01:00
|
|
|
= f.input :text , input_html: {rows: rows(@story.text)}
|
2023-01-12 13:56:50 +01:00
|
|
|
= f.input :happened , wrapper_class: "flex mt-4 align-center"
|
2023-01-12 13:34:00 +01:00
|
|
|
%button.mt-6.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
|
|
|
= f.submit 'Save'
|
|
|
|
%button.ml-20.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
|
|
|
= link_to 'Back', @story
|
2023-01-11 19:52:58 +01:00
|
|
|
%div
|