22 lines
1.3 KiB
Plaintext
22 lines
1.3 KiB
Plaintext
.row ng-controller="CommentsController" ng-cloak=""
|
|
.small-12.large-9.large-centered.columns
|
|
form novalidate='' name='form'
|
|
.row
|
|
.small-12.large-12.columns
|
|
= text_area_tag(:content, nil, placeholder: t('comment_placeholder.content'), 'ng-model'=> 'content', 'ng-required'=> true)
|
|
.row
|
|
.small-12.large-6.columns
|
|
= text_field_tag(:name, nil, placeholder: t('comment_placeholder.name'), 'ng-model'=> 'name', 'ng-required'=> 'true')
|
|
= text_field_tag(:email, nil, placeholder: t('comment_placeholder.email'), 'ng-model'=> 'email', 'ng-pattern'=>"/^.+@.+$/", 'ng-required'=>"true")
|
|
button.comment-submit ng-click="submit()" ng-disabled="form.$invalid || submitting" {{ submitting && "#{t('comment_placeholder.submitting')}" || "#{t('comment_placeholder.submit')}" }}
|
|
p.comment-success ng-show="publish_success" #{t('comment_placeholder.publish_success')}
|
|
p.comment-fail ng-show="publish_success == false" #{t('comment_placeholder.publish_fail')}: {{ publish_fail_msg }}
|
|
.comment-diag
|
|
.comment-wrapper ng-repeat=" comment in comments "
|
|
p.name
|
|
|{{ comment.name + " • " }}
|
|
span.created-at
|
|
|{{ comment.created_at }}
|
|
/ ignore "white-space: pre" 's effect
|
|
<p class=comment-content>{{ comment.content }}</p>
|