Workspaces define the structure, pages and menus of the censhare Web user interface.

The main set up

The censhare Web client contains the following types of workspaces:

  1. A central workspace template (censhare:Standard) based on assets, which is assigned to the System Asset. This central workspace defines the page set up for all types of assets, which is reflected to all users. Changes to this template, can be performed by creating Resource Replace Variants on the desired workspace element (Page, Tab etc).

  2. The User Workspace, where each user owns their own workspace, which contains all personalized changes performed by the user in the form of Resource Events.

  3. Both of the above workspace types can generate a (Workspace XML template), which is a serialized form of the asset structure, via the server action Create Workspace XML template.

Workspace XML

In censhare web, the main workspace set up consists of a default [workspace based on assets] which is affects all users, and of user workspaces assigned to each user.

Both of the above workspace types, can generate copies of themselves in XML format (Workspace XML template), via the server action Create Workspace XML template. This action is most useful for:

  • Capturing changes from a user workspace which are stored as resource events
  • Comparing and administrating the changes between a workspace XML from older censhare versions with a workspace XML which was created by a workspace based on assets

The action's output, is a new workspace asset which contains a master file of the workspace serialized to XML. The master file of the workspace can be exported or replaced by uploading another master file.

XML elements

The XML structure of a workspace, illustrates the same hierarchy as in a workspace based on assets. In the first level (top-down) the workspace is consisted of the pages and the navigation bar:

<workspace>
  <pages>
      ...
  </pages>
  <navigation>
      ...
  </navigation>
</workspace>

Each element (page, container, widget etc) is identified by its resource key as id, its kind and label. Additional localization information are included in a separate configuration element. All allowed widgets that can be added to a page, are defined as widget items by referencing the resource key of the widget configuration in the allowed-widgets element. The tabs consisting a page, are defined in the containers element and the widgets included in a tab are accordingly defined in the widgets element. Finally, the priority in which tabs/widgets will appear in a page, is defined with the attribute position.

<page id="censhare:workspace_page_static-dashboard" urlpattern="/" kind="csWidgetStaticDataPageKind" changekey="0" label="Dashboard" icon="cs-icon-home">
  <configuration label_de="Dashboard" label_fr="Tableau de bord" label_it="Dashboard" label_en="Dashboard" label_ja="ダッシュボード" label="Dashboard"/>
  <allowed-widgets>
     <widget kind="censhare:workspace.widget.config.csActionsWidget.actionQuickAccess"/>
        ...
  </allowed-widget>
  <containers>
  <container id="censhare:workspace_container_overview-10" kind="tab" position="0" changekey="0">
    <configuration label_de="Überblick" label_fr="Aperçu" label_it="Anteprima" label_en="Overview" label_ja="概要" label="Overview"/>
    <widgets>
      <widget id="censhare:workspace_widget_config_csAssetPreviewAssignWidget_previewAssign" position="0" kind="csAssetPreviewAssignWidget" changekey="0" width="3" height="4">
        <configuration relationType="user.main-picture." title_it="Anteprima assegnata" title_en="Assigned preview" title_de="Zugeordnete Vorschau" title_fr="Présentation attribuée" description="Assigned preview of the currently displayed asset" title="Assigned preview" title_ja="割り当てられたプレビュー"/>
      </widget>
      ...
    </widgets>
  </container>
        ...
  </containers>
</page>

The navigation element, consists of two sections represented by the favorites and history/ elements. The Favorites section contains multiple navigation items as item elements and some group elements, identified by their resource keys, a url and the position in the navigation. Navigation items also have the property locked. When setting this to false the item can be removed from the navigation bar via an "x" icon.

<navigation>
  <favorites>
    <item id="censhare:workspace_navigationitem__dashboard" label="Dashboard" icon="cs-icon-home" locked="true" position="0" config="{}" url="/"/>
       ...
    <group id="_searches" label="csCommonTranslations.saved_searches" icon="cs-icon-search" locked="true" position="9"/>
       ...
  </favorites>
  <history/>
</navigation>

Note: Please be aware that the id properties of all elements (pages, widgets, etc), is the resource key of the corresponding asset. This conversion takes place for better handling of the resource event between the back-end and the front-end. For example: id="censhare:workspace_navigationitem__dashboard" - Resource key: "censhare:workspace.navigationitem._dashboard".