2019-08-23 18:29:07 +00:00
|
|
|
.form-group
|
2020-11-27 22:32:16 +00:00
|
|
|
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post)
|
2019-08-13 19:09:23 +00:00
|
|
|
= render 'posts/attribute_feedback',
|
|
|
|
post: post, attribute: attribute, metadata: metadata
|
2020-11-14 15:10:55 +00:00
|
|
|
|
2021-02-13 01:14:36 +00:00
|
|
|
.editor{ id: attribute, data: { editor: '' } }
|
2020-11-20 18:01:13 +00:00
|
|
|
-# Esto es para luego decirle al navegador que se olvide estas cosas.
|
|
|
|
= hidden_field_tag 'storage_keys[]', "#{request.original_url}##{attribute}", data: { target: 'storage-key' }
|
2020-11-18 14:06:59 +00:00
|
|
|
.alert.alert-info
|
|
|
|
:markdown
|
|
|
|
#{t('editor.alert')}
|
2020-11-27 22:32:16 +00:00
|
|
|
= text_area_tag "#{base}[#{attribute}]", '',
|
2020-11-14 15:10:55 +00:00
|
|
|
dir: dir, lang: locale,
|
|
|
|
**field_options(attribute, metadata), class: 'd-none'
|
|
|
|
|
2021-02-19 17:31:38 +00:00
|
|
|
.editor-toolbar{ style: 'z-index: 1' }
|
2020-11-14 15:10:55 +00:00
|
|
|
.editor-primary-toolbar.scrollbar-black
|
2021-02-14 16:01:41 +00:00
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-bold' } } }= t('editor.bold')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-italic' } } }= t('editor.italic')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-deleted' } } }= t('editor.deleted')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-underline' } } }= t('editor.underline')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-super' } } }= t('editor.super')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-sub' } } }= t('editor.sub')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-mark' } } }= t('editor.mark')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'mark-link' } } }= t('editor.link')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-h1' } } }= t('editor.h1')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-h2' } } }= t('editor.h2')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-h3' } } }= t('editor.h3')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-h4' } } }= t('editor.h4')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-h5' } } }= t('editor.h5')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-h6' } } }= t('editor.h6')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-unordered_list' } } }= t('editor.ul')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'block-ordered_list' } } }= t('editor.ol')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'parentBlock-left' } } }= t('editor.left')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'parentBlock-center' } } }= t('editor.center')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'parentBlock-right' } } }= t('editor.right')
|
|
|
|
%button.btn{ type: 'button', data: { editor: { button: 'multimedia' } } }= t('editor.multimedia')
|
2020-11-14 15:10:55 +00:00
|
|
|
|
|
|
|
-#
|
|
|
|
HAML cringe
|
|
|
|
TODO: generar IDs para labels
|
2021-02-12 23:04:01 +00:00
|
|
|
.editor-auxiliary-toolbar.mt-1.scrollbar-black{ data: { 'editor_auxiliary_toolbar': '' } }
|
2021-02-13 01:14:36 +00:00
|
|
|
.form-group{ data: { editor: { auxiliary: 'mark' } } }
|
2020-11-14 15:10:55 +00:00
|
|
|
%label{ for: 'mark-color' }= t('editor.color')
|
2021-02-13 01:14:36 +00:00
|
|
|
%input.form-control{ type: 'color', name: 'mark-color' }/
|
2020-11-14 15:10:55 +00:00
|
|
|
|
2021-02-13 01:14:36 +00:00
|
|
|
%div{ data: { editor: { auxiliary: 'multimedia' } } }
|
2021-02-19 17:31:38 +00:00
|
|
|
.form-group
|
2021-02-14 16:01:41 +00:00
|
|
|
.custom-file
|
|
|
|
%input.custom-file-input{ type: 'file', name: 'multimedia-file' }/
|
2021-02-18 21:43:47 +00:00
|
|
|
%label.custom-file-label{ for: 'multimedia-file' }= t('editor.multimedia-select')
|
2021-02-19 17:31:38 +00:00
|
|
|
.form-group
|
2021-02-14 16:01:41 +00:00
|
|
|
%label{ for: 'multimedia-alt' }= t('editor.description')
|
|
|
|
%input.form-control{ type: 'text', name: 'multimedia-alt' }/
|
2021-02-19 17:31:38 +00:00
|
|
|
.form-group
|
|
|
|
%button.btn{ type: 'button', name: 'multimedia-file-upload' }= t('editor.multimedia-upload')
|
|
|
|
%button.btn{ type: 'button', name: 'multimedia-remove' }= t('editor.multimedia-remove')
|
2020-11-14 15:10:55 +00:00
|
|
|
|
2021-02-13 01:14:36 +00:00
|
|
|
.form-group{ data: { editor: { auxiliary: 'link' } } }
|
|
|
|
%label{ for: 'link-url' }= t('editor.url')
|
|
|
|
%input.form-control{ type: 'url', name: 'link-url' }/
|
2020-11-19 21:48:50 +00:00
|
|
|
|
2020-11-19 21:54:26 +00:00
|
|
|
.editor-aviso-word.alert.alert-info
|
|
|
|
%p= t('editor.word')
|
2020-11-14 15:10:55 +00:00
|
|
|
|
2020-11-17 20:41:15 +00:00
|
|
|
.editor-content.form-control.h-auto.mt-1{ contenteditable: 'true' }
|
2020-11-16 20:05:07 +00:00
|
|
|
= metadata.value.html_safe
|