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