2021-09-13 01:19:00 +02:00
|
|
|
- form = assigns[:f]
|
|
|
|
- action_text = assigns[:action_text] || 'Edit'
|
|
|
|
- action_icon = assigns[:action_icon] || 'edit'
|
|
|
|
- field_name = assigns[:name] || :body
|
|
|
|
- field_placeholder = assigns[:placeholder] || "Your message"
|
2021-09-29 20:00:46 +02:00
|
|
|
.block__header.block__header--js-tabbed
|
|
|
|
a.selected href="#" data-click-tab="write"
|
|
|
|
i.fa> class="fa-#{action_icon}"
|
|
|
|
= action_text
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2021-09-29 20:00:46 +02:00
|
|
|
a href="#" data-click-tab="preview"
|
|
|
|
i.fa.fa-cog.fa-fw.fa-spin.js-preview-loading.hidden> title=raw('Loading preview…')
|
|
|
|
i.fa.fa-eye.fa-fw.js-preview-idle>
|
|
|
|
| Preview
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2021-09-29 20:00:46 +02:00
|
|
|
.block__tab.communication-edit__tab.selected.js-preview-input-wrapper data-tab="write"
|
|
|
|
= render PhilomenaWeb.MarkdownView, "_help.html", conn: @conn
|
|
|
|
= 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-09-30 23:56:38 +02:00
|
|
|
= textarea form, field_name, class: "input input--wide input--text input--resize-vertical js-toolbar-input js-preview-input", placeholder: field_placeholder, required: required?(@conn)
|
2021-09-29 20:00:46 +02:00
|
|
|
= error_tag form, field_name
|
2021-09-13 01:19:00 +02:00
|
|
|
|
2021-09-29 20:00:46 +02:00
|
|
|
.block__tab.communication-edit__tab.hidden.js-preview-content data-tab="preview"
|