This page explains how to use the excel configuration tool, the main concepts of the REST API and Angular UI are explained here: Item details: layout & security

To speedup the configuration of the layout and data security aspects of DSpace-CRIS administrators can use the script named “cris-layout-tool”.

That script requires the following parameters:

In the folder dspace-install/bin run

./dspace cris-layout-tool -f ../etc/conftool/cris-layout-configuration.xls

In the folder dspace/etc/conftool it is included the excel file cris-layout-configuration.xls representing the default configuration of DSpace-CRIS. The file has several tabs.

Cris Layout Tool Sheets

tab

It contains the details about all the tabs that need to be created.


box

It contains the details about all the boxes that need to be created. The order in which they are listed will be respected for each entity type in the UI.


tab2box

It links box to a specific tab.


box2metadata

It provides extra configuration details for metadata box such as the list of metadata (fields) included.


metadatagroups

It provides extra configuration details for nested metadata that should be visualized as a group.


box2metrics

It provides configuration details for box displaying metrics.


tabpolicy and boxpolicy

They provide extra information for tab and box configured to have custom security policy (security = CUSTOM DATA)


utilsdata

The sheet is not really used by the tool. It is intended to help with the filling out of the excel


tab_i18n, box_i18n, metadata_i18n, metadatagroup_i18n

see last paragraph


The tool performs the following actions in subsequent order stopping in case of failure

  1. validate the excel configuration file reporting any identified inconsistency such as, undefined entity types, metadata, missing tabs or boxes referenced in the association sheets, etc.

  2. completely wipe the current layout configuration

  3. load the configuration

Available rendering strategies

I18n key conventions

When file reports i18n keys references to be used as labels, following conventions are followed

Type of label

Prefix

Example (to be added to translation files)

Tab

layout.tab.header.<tabShortName>

layout.tab.header.<boxShortName> still works as fallback value

"layout.tab.header.OrgUnit.details": "Organization Details",

"layout.tab.header.details": "Details", (fallback value)

Box

layout.box.header.<entityType>.<boxShortName>

layout.box.header.<boxShortName> still works as fallback value

"layout.box.header.OrgUnit.altmetrics": "Organization alternative Metrics",

"layout.box.header.altmetrics": "Alternative Metrics", (fallback value)

Metadata / Metadatagroups

layout.field.label.<entityType>.Metadata

"layout.field.label.Equipment.dc.type": "Cost Type",

Utility sheets to generate keys to be added to internationalization files (en.json etc...):

tab_i18n, box_i18n, metadata_i18n, metadatagroup_i18n

are available on cris-layout-configuration.xls file, with following formulas used (from B2 cell):

Sheet

Formula

tab_i18n

=IF(OR(ISBLANK($tab.$C2);EXACT(MID($tab.$C2;1;LEN($A$2));$A$2));"";""""&$A$2&$tab.$A2&"."&$tab.$B2&""": """&SUBSTITUTE($tab.$C2;""""; """")&""",")

box_i18n

=IF(OR(ISBLANK($box.$E2);EXACT(MID($box.$E2;1;LEN($A$2));$A$2));"";""""&$A$2&$box.$A2&"."&$box.$D2&""": """&SUBSTITUTE($box.$E2;"""";"""")&""",")

metadata_i18n

=IF(ISBLANK($box2metadata.$I2);"";""""&$A$2&$box2metadata.$A2&"."&IF(ISBLANK($box2metadata.$F2);$box2metadata.$E2;$box2metadata.$F2)&""": """&SUBSTITUTE($box2metadata.$I2;"""";"""")&""",")

metadatagroup_i18n

=IF(ISBLANK($metadatagroups.$D2);"";""""&$A$2&$metadatagroups.$A2&"."&$metadatagroups.$D2&""": """&SUBSTITUTE($metadatagroups.$G2;"""";"""")&""",")

Tabs and boxes

In the case of boxes, one of the following values will be showed, from highest to lowest priority:

  1. The translation of layout.***.header.<entityType>.<shortName>

  2. The translation of layout.***.header.<shortName>

  3. The translation of the LABEL field, if it is a valid i18n key (it should have the same prefix layout.***.header.)

  4. The content of the LABEL field

Tabs, metadata and metadata groups

One of the following values will be showed, from highest to lowest priority:

  1. The translation of the automatically generated i18n key

  2. The translation of the label, if it is a valid i18n key

  3. The content of the label

Custom layout for the same Entity type using a custom filter

In some cases we might want to define a custom layout for certain items identified by a specific criteria. The column ENTITY for both tab & box sheets allow to add some criteria to define a custom layout.

The standard/default layout is defined by simply using the Entity type in the ENTITY columns for the tab & box sheets. For a customized layout the following rules can be followed to achieve the desired layout configuration.

For values under the ENTITY column the following criteria can be followed:

  1. <entity-type>.<submission-definition>.<metadata-authority>

  2. <entity-type>.<submission-definition>.<metadata-value>

  3. <entity-type>.<submission-definition>

  4. <entity-type>

<metadata-authority> & <metadata-value> are retrieved from the item using the metadata defined in dspace.metadata.layout.tab on dspace.cfg set by default to dc.type

The order above represents also the priority followed to match the custom layout. This means that if we have all the four matching layout configuration the first one is the one that is used.

If the first condition/custom filter is not matched and there’s a match for the second custom filter the layout with the second custom filter is used ans so on.

Example

We have the following custom filters configured:

  1. Publication.collection1_submission.c_ddb1

  2. Publication.collection1_submission.test_value

  3. Publication.collection1_submission

  4. Publication

Matching example