style editor tags
This commit is contained in:
parent
2a4bfdd40b
commit
fd9335f129
2 changed files with 13 additions and 22 deletions
|
@ -1,4 +1,5 @@
|
||||||
- each_category do |category, tags, can_toggle_nullable|
|
- each_category do |category, tags, can_toggle_nullable|
|
||||||
|
- if category.present?
|
||||||
.flex
|
.flex
|
||||||
%p.fr-label.fr-text--sm.fr-text--bold.fr-mb-1w= t(category, scope: ".categories")
|
%p.fr-label.fr-text--sm.fr-text--bold.fr-mb-1w= t(category, scope: ".categories")
|
||||||
|
|
||||||
|
|
|
@ -22,19 +22,13 @@
|
||||||
= f.label :tiptap_default_dossier_directory, class: "fr-label"
|
= f.label :tiptap_default_dossier_directory, class: "fr-label"
|
||||||
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
||||||
= f.hidden_field :tiptap_default_dossier_directory, data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
= f.hidden_field :tiptap_default_dossier_directory, data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
||||||
%ul.mt-2.flex.wrap.flex-gap-1
|
.fr-mt-2w= render TagsButtonListComponent.new(tags: { nil => @export_template.specific_tags })
|
||||||
- @export_template.specific_tags.each do |tag|
|
|
||||||
%li.fr-badge.fr-badge--sm{ role: 'button', title: tag[:description], data: { action: 'click->tiptap#insertTag', tiptap_target: 'tag', tag_id: tag[:id], tag_label: tag[:libelle] } }
|
|
||||||
= tag[:libelle]
|
|
||||||
|
|
||||||
.fr-input-group{ data: { controller: 'tiptap' } }
|
.fr-input-group{ data: { controller: 'tiptap' } }
|
||||||
= f.label :tiptap_pdf_name, class: "fr-label"
|
= f.label :tiptap_pdf_name, class: "fr-label"
|
||||||
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
||||||
= f.hidden_field :tiptap_pdf_name, data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
= f.hidden_field :tiptap_pdf_name, data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
||||||
%ul.mt-2.flex.wrap.flex-gap-1
|
.fr-mt-2w= render TagsButtonListComponent.new(tags: { nil => @export_template.specific_tags })
|
||||||
- @export_template.specific_tags.each do |tag|
|
|
||||||
%li.fr-badge.fr-badge--sm{ role: 'button', title: tag[:description], data: { action: 'click->tiptap#insertTag', tiptap_target: 'tag', tag_id: tag[:id], tag_label: tag[:libelle] } }
|
|
||||||
= tag[:libelle]
|
|
||||||
|
|
||||||
- if @all_pj.any?
|
- if @all_pj.any?
|
||||||
%h3 Pieces justificatives
|
%h3 Pieces justificatives
|
||||||
|
@ -44,11 +38,7 @@
|
||||||
= label_tag pj.libelle, nil, name: field_name(:export_template, "tiptap_pj_#{pj.stable_id}"), class: "fr-label"
|
= label_tag pj.libelle, nil, name: field_name(:export_template, "tiptap_pj_#{pj.stable_id}"), class: "fr-label"
|
||||||
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
.editor.mt-2{ data: { tiptap_target: 'editor' } }
|
||||||
= hidden_field_tag field_name(:export_template, "tiptap_pj_#{pj.stable_id}"), "#{@export_template.content_for_pj(pj)}" , data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
= hidden_field_tag field_name(:export_template, "tiptap_pj_#{pj.stable_id}"), "#{@export_template.content_for_pj(pj)}" , data: { tiptap_target: 'input', controller: 'turbo-input', turbo_input_url_value: preview_instructeur_export_templates_path }
|
||||||
%ul.mt-2.flex.wrap.flex-gap-1
|
.fr-mt-2w= render TagsButtonListComponent.new(tags: { nil => @export_template.specific_tags })
|
||||||
- @export_template.specific_tags.each do |tag|
|
|
||||||
%li.fr-badge.fr-badge--sm{ role: 'button', title: tag[:description], data: { action: 'click->tiptap#insertTag', tiptap_target: 'tag', tag_id: tag[:id], tag_label: tag[:libelle] } }
|
|
||||||
= tag[:libelle]
|
|
||||||
|
|
||||||
|
|
||||||
.fixed-footer
|
.fixed-footer
|
||||||
.fr-container
|
.fr-container
|
||||||
|
|
Loading…
Reference in a new issue