From 48b65c5cb1b8dabced07afa860cf42694c9c620f Mon Sep 17 00:00:00 2001 From: f Date: Mon, 28 Nov 2022 13:58:50 -0300 Subject: [PATCH] feat: campos enriquecidos con el nuevo editor --- app/models/metadata_new_html.rb | 4 ++++ app/views/posts/attribute_ro/_new_html.haml | 3 +++ app/views/posts/attributes/_new_html.haml | 6 ++++++ 3 files changed, 13 insertions(+) create mode 100644 app/models/metadata_new_html.rb create mode 100644 app/views/posts/attribute_ro/_new_html.haml create mode 100644 app/views/posts/attributes/_new_html.haml diff --git a/app/models/metadata_new_html.rb b/app/models/metadata_new_html.rb new file mode 100644 index 00000000..546d0686 --- /dev/null +++ b/app/models/metadata_new_html.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +# Campos en HTML con el nuevo editor +class MetadataNewHtml < MetadataContent; end diff --git a/app/views/posts/attribute_ro/_new_html.haml b/app/views/posts/attribute_ro/_new_html.haml new file mode 100644 index 00000000..97931960 --- /dev/null +++ b/app/views/posts/attribute_ro/_new_html.haml @@ -0,0 +1,3 @@ +%tr{ id: attribute } + %th= post_label_t(attribute, post: post) + %td{ lang: locale, dir: dir }= metadata.value.html_safe diff --git a/app/views/posts/attributes/_new_html.haml b/app/views/posts/attributes/_new_html.haml new file mode 100644 index 00000000..629342b3 --- /dev/null +++ b/app/views/posts/attributes/_new_html.haml @@ -0,0 +1,6 @@ +-# Editor de contenido += render 'posts/attributes/new_content', + base: 'post', post: post, attribute: attribute, + metadata: metadata, site: site, + dir: dir, locale: locale, + autofocus: (post.attributes.first == attribute)