From 91535e53233bd15058b6f9e353e96b70e1f07167 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 15 Nov 2019 11:13:21 -0300 Subject: [PATCH] atributo de fecha --- app/views/posts/attribute_ro/_date.haml | 3 +++ app/views/posts/attributes/_date.haml | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 app/views/posts/attribute_ro/_date.haml create mode 100644 app/views/posts/attributes/_date.haml diff --git a/app/views/posts/attribute_ro/_date.haml b/app/views/posts/attribute_ro/_date.haml new file mode 100644 index 00000000..dc94def2 --- /dev/null +++ b/app/views/posts/attribute_ro/_date.haml @@ -0,0 +1,3 @@ +%tr{ id: attribute } + %th= post_label_t(attribute, post: post) + %td= l metadata.value.to_date diff --git a/app/views/posts/attributes/_date.haml b/app/views/posts/attributes/_date.haml new file mode 100644 index 00000000..ac1c7b02 --- /dev/null +++ b/app/views/posts/attributes/_date.haml @@ -0,0 +1,6 @@ +.form-group + = label_tag "post_#{attribute}", post_label_t(attribute, post: post) + = date_field 'post', attribute, value: metadata.value.strftime('%F'), + **field_options(attribute, metadata) + = render 'posts/attribute_feedback', + post: post, attribute: attribute, metadata: metadata