Like Documents

The Like Action Tag displays controls for the user to "like" a document. It also displays statistics on the number of times a specified target document has been liked.

Usage

The Like Action Tag is typically used within a Result List Tag, to enable the user to "like" a particular document in the result list:

<search:resultList response="${response}" >
    <search:result>
        <social:likeAction target="${result.id}" />
    </search:result>
</search:resultList>

Required Tag Attribute

target (java.lang.String):
The ID of the document that should be liked.

Optional Tag Attributes

collection (java.lang.String)
The collection to which the target document belongs.

topic (twigkit.model.Topic)
A topic to which the new "like" annotation should belong.

label (java.lang.String)
Label for the "like" action link.
Default: "Like"

tooltip (java.lang.String)
Tool tip for the "like" action link.
Default: "Do you like this?"

activeLabel (java.lang.String)
Label to show when document has already been liked by the current user.
Default: "Unlike"

activeTooltip (java.lang.String)
Tool tip to show when document has already been liked by the current user.
Default: "You have liked this."

singularLabel (java.lang.String)
Label for statistics (following the number of times the document in question has been liked) when the document has been liked by a single person.
Default: ""

singularTooltip (java.lang.String)
Tool tip for statistics when the document has been liked by a single person.
Default: "person likes this."

pluralLabel (java.lang.String)
Label for statistics (following the number of times the document in question has been liked) when the document has been liked by more than one person.
Default: ""

pluralTooltip (java.lang.String)
Tool tip for statistics when the document has been liked by more than one person." Default: "people like this."