mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 05:36:21 +00:00
feat: contenido de texto plano #16174
This commit is contained in:
parent
044b14c355
commit
8929847628
3 changed files with 14 additions and 0 deletions
3
app/models/metadata_plain_text.rb
Normal file
3
app/models/metadata_plain_text.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MetadataPlainText < MetadataContent; end
|
3
app/views/posts/attribute_ro/_plain_text.haml
Normal file
3
app/views/posts/attribute_ro/_plain_text.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
%tr{ id: attribute }
|
||||
%th= post_label_t(attribute, post: post)
|
||||
%td{ lang: locale, dir: dir }= metadata.value
|
8
app/views/posts/attributes/_plain_text.haml
Normal file
8
app/views/posts/attributes/_plain_text.haml
Normal file
|
@ -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)
|
Loading…
Reference in a new issue