The Collection Display fragment provides great flexibility to allow a page author to define how to display the list as well as each of the items in the list. Liferay provides several expanded functionalities for content, such as ratings, flags and comments that are associated to a specific content. In particular, in the context of displaying a list of content it would be very useful to be able to display the ratings and/or flags of each item in the list. Currently Liferay offers widgets to display ratings or flags associated to the current page (which could be a display page, in which case the ratings and flags would be associated to the underlying content).
The goal of this story is to support adding ratings and flags to each of the items in a list by providing two new fragments ("Content Ratings fragment" and "Content Flags fragment") that can be added within a cell inside the Collection Display Fragment. These fragments, when added to a display page (outside of a a Collection Display fragment) should be tied to the content associated to the display page.
The fragments should be implemented with a "Content Item" configuration field which would be automatically selected based on context but would also allow the page author to select any other content to show its ratings (for example to place it next to a Content Display fragment configured to show the same content). When one of these fragments is added to a regular page and there is no contextual "Content", they should show a message to the page author informing that a content should be shown (just like it happens in the same situation to a Content Display fragment)
Given a Collection Display exists on a page configured to show a list of content which support ratings
When the Marketer adds the Content Ratings fragment inside a cell of the Collection Display
Then the ratings of each of the items will be shown by the fragment
Given a Collection Display exists on a page configured to show a list of content which support flags
When the Marketer adds the Content Flags fragment inside a cell of the Collection Display
Then the flags of each of the items will be shown by the fragment
|Test Scenarios||Test Strategy||Kind of test||Is it covered by FrontEnd ? (JS-Unit)||Is it covered by BackEnd ? (unit or integration)||Could it be covered by POSHI?|
|The ratings of each collection item are shown when add a Content Ratings fragment to Collection Display||Smoke||Manual||No||No||Yes|
|The flags of each collection item are shown when add a Content Flags fragment to Collection Display||Smoke||Manual||No||No||Yes|
|The Content Flags, Content Ratings and Content Display are compatible and consistent in the same cell of Collection Display||Sanity||Manual||No||No||Yes|
|The Content Flags, Content Ratings and Content Display are displayed normally when enable Live||Sanity||Manual||No||No||Yes|