Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Design

Image RemovedImage Added

Image RemovedImage Added

Line layout

Column layout

List layout

Square layout

Small Square

Table

Block

Image Added

How it works

General

Display modes component is used in three different pages of the DAM :

  • On the search results page for each cursors

  • On the board page

  • On the board’s detail page, when displaying assets of a board

The last display mode viewed by the user will be used for his next connection.

On the search page

4 of the 6 7 display modes are displayed on the main page as well as within each cursor:

  • Line layout

  • Column layout

  • List Block layout

  • Square layout

The default layout is the Square Layout.

On the boards page

2 of the 6 7 display modes are displayed :

  • Line layout

  • Square layout

The default layout is the Square Layout.

On the board’s detail page, when displaying assets of a board

4 of the 6 7 display modes are displayed :

  • Line layout

  • Column layout

  • List Block layout

  • Square layout

The default layout is the Column Layout.

List layout metadata

For the List layout the metadata displayed on each tile are : 

On the search results main page and the cursors:

  • Name

  • Caption

  • Keywords

When looking at assets in a board:

  • Name

  • Photograph

  • Caption

Additional modes

2 additional modes can be configured (not activated by default) :

  • Small square : No metadata overlay can be displayed on the tiles in that mode. The only action available is selection. Can be setup at the JSON configuration level.

  • Table : The metadata displayed as columns can be setup at the JSON configuration level.

Advanced Configuration

Activating/deactivating every display mode for a cursor

To hide the display modes for a cursor, you just have to change it’s configuration in the config path $.dam.explore.layouts.<cursorName>.defaultResourceConfig.hideLayout.json to true.

<cursorName> can be replaced with defaultCursorConfig for the default cursor display or all-videos for the "All videos" cursor.

Block layout metadata

For the Block layout the metadata displayed on each tile are the same for the search results page and on the board’s detail page (when displaying assets of a board) : 

  • Name (on 1 line)

  • Description (on 2 lines)

  • Asset type (on 1 line)

  • Photograph (on 1 line)

  • Expiration date (on 1 line)

Additional modes

2 additional modes can be configured (not activated by default) :

  • Small square : No metadata overlay can be displayed on the tiles in that mode. The only action available is selection. Can be setup at the JSON configuration level.

  • Table : The metadata displayed as columns can be setup at the JSON configuration level.

Advanced Configuration

Activating/deactivating every display mode for

the main Board page

a cursor

To hide the display modes for the main board pagea cursor, you just have to change it’s configuration in the config path $.board.boardsView.layoutdam.explore.layouts.<cursorName>.defaultResourceConfig.hideLayout.json to true.

<cursorName> can be replaced with defaultCursorConfig for the default cursor display or all-videos for the "All videos" cursor.

Activating/deactivating every display mode

when looking at assets in a board

for the main Board page

To hide the display modes for the main board page, you just have to change it’s configuration in the config path $.board.exploreboardsView.layout.hideLayout.json to true.

Configuring default

Activating/deactivating every display mode

for a

when looking at assets in a board

To hide the display modes for the main board page, you just have to change it’s configuration in the config path $.board.explore.layout.hideLayout.json to true.

Configuring default display mode for a cursor

<cursorName> can be replaced with defaultCursorConfig for the default cursor display or all-videos for the "All videos" cursor.

Config path

Default value

Description

Translation i18n key:
layout.line

Line layout

tooltip

Translation i18n key:
layout.column

Column layout

tooltip

Translation i18n key:
layout.listsquare

List Square layout

tooltip

Translation i18n key:
layout.squareblock

Square Block layout

tooltip

$.dam.explore.layouts.<cursorName>.defaultResourceConfig.available.json

Code Block
[
  {
    "key": "row",
    "i18n": "layout.line",
    "icon": "cw-svg-h-bricks",
    "aliases": ["line", "rows"]
  },
  {
    "key": "col",
    "i18n": "layout.column",
    "icon": "cw-svg-v-bricks",
    "aliases": ["cols", "columns", "column"]
  },
  {
    "key": "listblock",
    "i18n": "layout.listblock",
    "class": "fas fa-listborder-ulall"
  },
  {
    "key": "square",
    "i18n": "layout.square",
    "class": "fas fa-grip-horizontal"
  }
]

In this configuration file, each object represents a layout that will be displayed in the display mode.

$.dam.explore.layouts.<cursorName>.defaultResourceConfig.default.json

"square"

Defines the default layout that will be selected

$.dam.explore.layouts.<cursorName>.defaultResourceConfig.hideLayoutSelectorLabel.json

true

By default, hides the label:

Image RemovedImage Added

To show the label, put this value to false:

Image RemovedImage Added

$.dam.explore.layouts.<cursorName>.defaultResourceConfig.hideLayout.json

false

By default, will show the display mode:

Image RemovedImage Added

If this value is set to true, the display will entirely be hidden:

Image RemovedImage Added

Configuring metadata displayed in the list layout of the dam explorer

This is an example of the default display of an asset in the dam explore page, when the layout is selected as list:

This is it’s configuration:

Config path

Default value

Description

$.common.namedDisplays.assetList.content.json

Code Block
[
  {
    "field": "description",
    "withoutLabel": true
  },
  {
    "field": "keywords",
    "clickable": true,
    "showIfEmpty": true,
    "badge": true,
    "withoutLabel": false
  }
]

The withoutLabel property will hide the label if set to true.

clickable will allow us to click on a keyword and will add the keyword as a research filter if it’s set to true.

If we still want to display a field even if it’s empty, set showIfEmpty to true.

The badge is a visual option.

When set to true, the keywords will display as a button-like way.

If set to false, the keywords will display as a simple text.

$.common.namedDisplays.assetList.infos.json

Code Block
[
  {
    "field": "duration",
    "withoutLabel": true
  }
]

$.common.namedDisplays.assetList.preview.json

Code Block
{
  "namedVariation": "small"
}

$.common.namedDisplays.assetList.title.json

Code Block
[
  "defaultListItemTitleName"
]

For example : modifying the file src/wedia-plugin-template/res/_portal/common/named-displays/asset-tile.json

With :

Code Block
{
  "preview": {
    "namedVariation": "big"
  },
  "title": [
    {
      "field": "name",
      "withoutLabel": true
    }
  ],
  "infos": [
    {
      "field": "duration",
      "withoutLabel": true,
      "component": "CwDuration",
      "config": [
        {
          "requirements": ["shouldBePositive"]
        }
      ]
    },
+    { // afficher le type de media (JPG...)
+      "withoutLabel": true,
+      "field": "assetnature",
+      "badge": true,
+      "class": "badge bg-secondary mr-2"
+    },
+    { // afficher la date de fin de droits
+      "withoutLabel": true,
+   { // afficher le type de media (JPG...)
+      "withoutLabel": true,
+      "field": "assetnature",
+      "badge": true,
+      "class": "badge bg-secondary mr-2"
+    },
+    { // afficher la date de fin de droits
+      "withoutLabel": true,
+      "field": "dteendrights",
+    },
  ]
}

Will display :

Image Added

Configuration for boards

The following configuration is for the main page of the boards.

Config path

Default value

Description

Translation i18n key:
layout.list

List layout

Translation i18n key:
layout.square

Square layout

$.board.boardsView.layout.available.json

Code Block
[{
  "key": "list",
  "i18n": "layout.list",
  "class": "fas fa-list-ul"
}, {
  "key": "square",
  "i18n": "layout.square",
  "class": "fas fa-grip-horizontal"
}]

Here is determined which layout display will be shown.

$.board.boardsView.layout.default.json

"square"

Default layout that will be selected unless the user has already selected a layout at least once.

$.board.boardsView.layout.hideLayout.json

false

$.board.boardsView.layout.prefix.json

"board"

Configuring metadata displayed in the list layout of the boards page

Config path

Default value

Description

asset.photo.by

Photo by

$.board.explore.items.display.defaultConfig.json

Code Block
{
  "block":"assetBlock",
  "col": "assetTile",
  "list": "assetBoardList",
  "mobile": "assetMobile",
  "row": "assetTile",
  "square": "assetTile",
  "table": "assetTableRow"
}

$.common.namedDisplays.assetBoardList.content.json

Code Block
[
  {
    "field": "description",
    "withoutLabel": true
  }
]

$.common.namedDisplays.assetBoardList.infos.json

Code Block
[
  {
    "field": "
dteendrights
duration",
+
    
}, ] }

Will display :

Image Removed

Configuration for boards

The following configuration is for the main page of the boards.

Config path

Default value

Description

Translation i18n key:
layout.list

List layout

Translation i18n key:
layout.square

Square layout

$.board.boardsView.layout.available
"withoutLabel": true
  }
]

$.common.namedDisplays.assetBoardList.preview.json

Code Block
{
  "namedVariation": "small"
}

$.common.namedDisplays.assetBoardList.subtitle.json

Code Block
[
{

  {
"key":
 
"list",
   "
i18n
clickable": 
"layout.list"
true,
  
"class":
 
"fas
 
fa-list-ul" }, { "key"
"field": "
square
photograph",

"i18n":
 
"layout.square",
   "
class
i18n": "
fas fa-grip-horizontal" }]

Here is determined which layout display will be shown.

$.board.boardsView.layout.default.json

"square"

Default layout that will be selected unless the user has already selected a layout at least once.

$.board.boardsView.layout.hideLayout.json

false

$.board.boardsView.layout.prefix.json

"board"

Configuring metadata displayed in the list layout of the boards page
asset.photo.by",
    "inline": true
  }
]

$.common.namedDisplays.assetBoardList.title.json

Code Block
[
  {
    "field": "name",
    "withoutLabel": true
  }
]

Configuring metadata displayed in the block layout of the dam explorer

This is an example of the default display of an asset in the dam explore page, when the layout is selected as block:

Image Added

This is it’s configuration:

Config path

Default value

Description

asset.photo.by

Photo by

$.

board

common.

explore

namedDisplays.

items

assetBlock.

display.defaultConfig.json Code Block{

content.json

Code Block
[
  {
    "field": "name",
    "withoutLabel": true,
    "
col
showIfEmpty": true,
    "
assetTile",
maxLines": 1
  },
  {
    "
list
field": "description",
    "
assetBoardList",
withoutLabel": false,
    "
mobile
showIfEmpty": 
"assetMobile"
true,
    "
row
maxLines": 
"assetTile",
2
  },
  {
    "
square
field": "
assetTile
assetnature",
    "
table
withoutLabel":
"assetTableRow" }

$.common.namedDisplays.assetBoardList.content.json

Code Block[ {
 false,
    "
field
showIfEmpty": 
"description"
true,
    "
withoutLabel
maxLines": 
true
1
  }
]

$.common.namedDisplays.assetBoardList.infos.json

Code Block[
,
  {
    "field": "
duration
photograph",
    "withoutLabel": 
true } ]

$.common.namedDisplays.assetBoardList.preview.json

Code Block{
false,
    "
namedVariation
showIfEmpty": 
"small" }

$.common.namedDisplays.assetBoardList.subtitle.json

Code Block[
true,
    "maxLines": 1
  },
  {
    "
clickable
field": 
true
"dteendrights",
    "
field
withoutLabel": false,
    
"photograph"
"showIfEmpty": true,
    "
i18n
maxLines":
"asset.photo.by", "inline": true } ]

$.common.namedDisplays.assetBoardList.title.json

Code Block[ { "field": "name", "withoutLabel": true } ]
 1
  }
]

  • maxlines allow us to define the number of lines to display.

Image AddedImage Added

If the text is not long enough, blank lines will be shown:

Image Added

  • The withoutLabel property will hide the label if set to true.

Image AddedImage Added

  • clickable will allow us to click on a keyword and will add the keyword as a research filter if it’s set to true.

Image AddedImage Added
  • If we still want to display a field even if it’s empty, set showIfEmpty to true.

Image AddedImage Added
  • Adding a keyword field.
    If you do display keywords in the block layout with a badge visual, we highly recommend adding these properties everytime with the following values for a better visual effect in the block layout: badge property with a true value, maxLines set at 3 and nbDisplayedItems property with a limit of 2.

Image Added

Configuration for other non-default layouts

Config path

Default value

Description

$.dam.explore.layouts.defaultCursorConfig.defaultResourceConfig.available.json

{ "key": "squareSmall", "i18n": "layout.squareSmall", "class": "fal fa-grip-horizontal" }

Add this code in the config path to display the Small square in the searsh result page

$.board.explore.layout.available.json

{ "key": "table", "i18n": "layout.table", "class": "fal fa-table" }

Add this code in the config path to display the Table layout when looking at assets in a board

$.common.namedDisplays.assetTableRow.preview.json

{
"colWeight": 8,
"headerClass": "cw-table-cell-media",
"i18n": "asset.media.preview",
"namedVariation": "tiny"
}

$.common.namedDisplays.assetTableRow.json

[
{
"colWeight": 15,
"field": "name",
"hideLongTextTooltip": true,
"withoutLabel": true
},
{
"colWeight": 10,
"field": "dteendrights",
"hideLongTextTooltip": true,
"withoutLabel": true
},
{
"colWeight": 5,
"field": "clipped",
"hideLongTextTooltip": true,
"withoutLabel": true
},
{
"badge": true,
"colWeight": 15,
"field": "keywords",
"hideLongTextTooltip": true,
"withoutLabel": true
},
{
"colWeight": 20,
"field": "description",
"hideLongTextTooltip": true,
"withoutLabel": true
},
{
"colWeight": 7,
"field": "width",
"hideLongTextTooltip": true,
"withoutLabel": true
},
{
"colWeight": 7,
"field": "height",
"hideLongTextTooltip": true,
"withoutLabel": true
}
]

This configuration allows to set the metadata in the columns and the size of them in the table layout.