2021-09-13 01:19:00 +02:00
|
|
|
- form = assigns[:f]
|
2024-06-13 03:47:15 +02:00
|
|
|
- action_text = assigns[:action_text] || "Edit"
|
|
|
|
- action_icon = assigns[:action_icon] || "edit"
|
2021-09-13 01:19:00 +02:00
|
|
|
- field_name = assigns[:name] || :body
|
|
|
|
- field_placeholder = assigns[:placeholder] || "Your message"
|
2021-10-01 02:31:25 +02:00
|
|
|
- is_required = assigns[:required]
|
|
|
|
- input_classes = assigns[:class]
|
2021-09-29 20:00:46 +02:00
|
|
|
.block__header.block__header--js-tabbed
|
2024-06-12 20:50:46 +02:00
|
|
|
a.button.selected href="#" data-click-tab="write"
|
2021-09-29 20:00:46 +02:00
|
|
|
i.fa> class="fa-#{action_icon}"
|
|
|
|
= action_text
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2024-06-12 20:50:46 +02:00
|
|
|
a.button href="#" data-click-tab="preview"
|
2024-06-23 14:16:23 +02:00
|
|
|
i.fa.fa-cog.fa-spin.js-preview-loading.hidden> title=raw("Loading preview…")
|
2024-06-12 20:50:46 +02:00
|
|
|
i.fa.fa-eye.js-preview-idle>
|
2021-09-29 20:00:46 +02:00
|
|
|
| Preview
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2024-06-12 20:50:46 +02:00
|
|
|
.block__tab.communication__edit-tab.selected.js-preview-input-wrapper data-tab="write"
|
2021-09-29 20:00:46 +02:00
|
|
|
= render PhilomenaWeb.MarkdownView, "_toolbar.html", conn: @conn
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2021-09-29 20:00:46 +02:00
|
|
|
.field
|
2021-10-01 02:31:25 +02:00
|
|
|
= textarea form, field_name, class: add_classes("input input--wide input--text input--resize-vertical js-toolbar-input js-preview-input", input_classes), placeholder: field_placeholder, required: required?(is_required)
|
2021-09-29 20:00:46 +02:00
|
|
|
= error_tag form, field_name
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2024-06-12 20:50:46 +02:00
|
|
|
.block__tab.block__content.communication__edit-tab.hidden.js-preview-content data-tab="preview"
|