mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 16:53:38 +00:00
metadatos para textos largos sin formato
This commit is contained in:
parent
bbb862abef
commit
fa4769531e
3 changed files with 14 additions and 0 deletions
5
app/models/metadata_text.rb
Normal file
5
app/models/metadata_text.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Un campo de texto largo
|
||||||
|
class MetadataText < MetadataString
|
||||||
|
end
|
3
app/views/posts/attribute_ro/_text.haml
Normal file
3
app/views/posts/attribute_ro/_text.haml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
%tr{ id: attribute }
|
||||||
|
%th= post_label_t(attribute, post: post)
|
||||||
|
%td= metadata.value
|
6
app/views/posts/attributes/_text.haml
Normal file
6
app/views/posts/attributes/_text.haml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.form-group
|
||||||
|
= label_tag "post_#{attribute}", post_label_t(attribute, post: post)
|
||||||
|
= text_area_tag "post[#{attribute}]", metadata.value,
|
||||||
|
**field_options(attribute, metadata)
|
||||||
|
= render 'posts/attribute_feedback',
|
||||||
|
post: post, attribute: attribute, metadata: metadata
|
Loading…
Reference in a new issue