mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 20:37:59 +01:00
26 lines
1.2 KiB
Text
26 lines
1.2 KiB
Text
- 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"
|
|
- is_required = assigns[:required]
|
|
- input_classes = assigns[:class]
|
|
.block__header.block__header--js-tabbed
|
|
a.selected href="#" data-click-tab="write"
|
|
i.fa> class="fa-#{action_icon}"
|
|
= action_text
|
|
|
|
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
|
|
|
|
.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
|
|
|
|
.field
|
|
= 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)
|
|
= error_tag form, field_name
|
|
|
|
.block__tab.communication-edit__tab.hidden.js-preview-content data-tab="preview"
|