2019-08-31 20:51:14 -07:00

48 lines
1.2 KiB
Handlebars

<button
class="nacho-button nacho-button--tertiary"
onclick={{action "showComments"}}
>
{{fa-icon
"pencil-alt"
classNames="pull-right wh-clickable-icon"
}}
</button>
{{#if isShowingFieldComment}}
{{#if getComments.last.isRunning}}
{{#modal-dialog
overlayClass="notification-overlay"
containerClassNames=containerClassNames
onClose=(action "hideComments")
}}
{{#comment/comment-stream
comments=comments
commentTypes=commentTypes
updateCommentInStream=(action "handleSchemaComment" SchemaCommentActions.Modify)
deleteCommentFromStream=(action "handleSchemaComment" SchemaCommentActions.Destroy)
addCommentToStream=(action "handleSchemaComment" SchemaCommentActions.Add)
as |stream|
}}
{{#stream.header}}
Comments for <strong>{{schema.fieldName}}</strong>
{{/stream.header}}
{{#stream.new}}
+ Add a comment...
{{/stream.new}}
{{#each stream.comments as |comment|}}
{{#stream.item comment=comment}}
{{comment.html}}
{{/stream.item}}
{{/each}}
{{/comment/comment-stream}}
{{/modal-dialog}}
{{else}}
{{pendulum-ellipsis-animation}}
{{/if}}
{{/if}}