diff --git a/app/models/metadata_plain_text.rb b/app/models/metadata_plain_text.rb new file mode 100644 index 00000000..e12ee18b --- /dev/null +++ b/app/models/metadata_plain_text.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +class MetadataPlainText < MetadataContent; end diff --git a/app/views/posts/attribute_ro/_plain_text.haml b/app/views/posts/attribute_ro/_plain_text.haml new file mode 100644 index 00000000..e6d9a274 --- /dev/null +++ b/app/views/posts/attribute_ro/_plain_text.haml @@ -0,0 +1,3 @@ +%tr{ id: attribute } + %th= post_label_t(attribute, post: post) + %td{ lang: locale, dir: dir }= metadata.value diff --git a/app/views/posts/attributes/_plain_text.haml b/app/views/posts/attributes/_plain_text.haml new file mode 100644 index 00000000..3f9ae91d --- /dev/null +++ b/app/views/posts/attributes/_plain_text.haml @@ -0,0 +1,8 @@ +.form-group + = label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post) + = render 'posts/attribute_feedback', + post: post, attribute: attribute, metadata: metadata + + = text_area_tag "#{base}[#{attribute}]", metadata.to_s.html_safe, + dir: dir, lang: locale, + **field_options(attribute, metadata)