collaborate:comment-list

Description

Comment list component for displaying a list of comments.

If used within a result you will need to add the following workflow processor to your platform in order to get the status of the bookmark and the number of people who have bookmarked the result

workflow:
    twigkit.social.processor.AddCommentFactsProcessor

Usage

as element:
<collaborate:comment-list
       target="{string}"
       platform="{object}"
       [collection="{string}"]
       [topic="{number}"]
       [format="{string}"]
       [delete-label="{string}"]
       [show="{number}"]
       [show-more="{number}"]
       [show-more-label="{string}"]
       [show-less-label="{string}"]
       [empty-text="{string}"]
       [default-delete-message="{string}"]
       [avatars="{string}"]>
</collaborate:comment-list>

Directive info

  • This directive creates new scope.

Parameters

Param Type Details
target string

The ID of the document that should be commented on.

platform object

The platform Object

collection
(optional)
string

If set, only display comments restricted to the given collection.

topic
(optional)
number

If set, only display comments restricted to the given type.

format
(optional)
string

How to format the date (formats supported: https://docs.angularjs.org/api/ng/filter/date and 'relative'which outputs the relative date (e.g. 2 hours ago)). Default: relative

delete-label
(optional)
string

Label to display for the delete action (default: "x").

show
(optional)
number

How many comments should be displayed initially (default:2).

show-more
(optional)
number

How many more comments should be added to the list each time the user clicks 'Show more' (default: 4).

show-more-label
(optional)
string

Label to display for 'show more' action (default: "Show more comments").

show-less-label
(optional)
string

Label to display for 'show fewer' action (default: "Show fewer").

empty-text
(optional)
string

Message to display when there are no comments to show (default: "").

default-delete-message
(optional)
string

Label to display when the delete action clicked (default: "Are you sure you want to remove this comment?").

avatars
(optional)
string

Whether to display avatars next to each comment (default: "true").