volunteers/app/views/stories/_form.haml

21 lines
911 B
Plaintext
Raw Normal View History

2023-01-22 12:17:27 +01:00
%div
Story layout changes with the amount of text.
2023-01-22 19:29:10 +01:00
For short text a wide picture is best. Otherwise square, and for
2023-01-22 12:17:27 +01:00
longer text a high picture also works.
= simple_form_for @story do |f|
= f.error_notification
2023-01-22 19:29:10 +01:00
.flex.h-16.mt-2
= image_tag(@story.picture_url , class: "align-middle mr-2") if @story.picture?
2023-01-25 23:47:27 +01:00
.w-full= f.input :picture , as: :file ,
2023-01-22 19:29:10 +01:00
label: (@story.picture.blank? ? "Add picture" : "Change picture")
= f.hidden_field :picture_cache
2023-01-22 12:17:27 +01:00
= f.input :header
2023-01-22 14:37:39 +01:00
= render "merged/form/editor" , object: @story , field: :text, form: f
2023-01-22 12:17:27 +01:00
= f.input :happened , wrapper_class: "flex mt-4 align-center"
.flex.justify-between.mt-6
%button.bg-cyan-200.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
= f.submit 'Save'
2023-01-22 19:29:10 +01:00
= link_to member_path(current_member) do
2023-01-22 12:17:27 +01:00
%button.ml-20.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
Back