Explorer Views

eXo introduces the concept of ECM views which allows to provide for a membership in a group a set of dedicated sorted icons and a rendering template to display the children of the current selected folder.

Overview

The ECM admin can create any new views for a given profile from the ECMAdmin portlet. It is also possible from that control panel to create new templates for displaying the current node children as well as templates to be used by the Browse Content portlet.

eXo ECM provides three view templates by default:

  • Thumbnails view: displays children folders and documents as a site of icons
  • Mac view: displays the folder hierarchy in three columns
  • List view: diplays the children in a list, that view contains the more information but may be too complex for simple users
Adding a new template is a simple process but it requires some knowledge on HTML as well as the default groovy directives available to generate links to navigate through the document tree. The template is stored in the JCR and therefore can be versionned.

Adding a new view is much more simple and the user does not need to have any programming skills. The process only consist of:

  • Give a name to the view
  • Select a membership in a group. That select component is a reusable one that is used in many places. It allows you to browse the group hierarchy and select a membership from a popup list.
  • Add several tabs (provide a name and a set of icons for each)
  • Select a view template
And that's it, if you then go to the ECM exoplorer portlet you will be able to see the new view in the list and to swap between views (if you have the appropriate rights).

Service Configuration

Manage view service allow administrator can customize many views can affect with user when exploring workspaces. Permissions, template and actions tabs are the view foundations.

<component>
    <key>org.exoplatform.services.cms.views.ManageViewService</key>
    <type>org.exoplatform.services.cms.views.impl.ManageViewServiceImpl</type>
    .......
  </component>

The service can handle plugins

<component-plugins>
      <component-plugin> 
        <name>manage.view.plugin</name>
        <set-method>setManageViewPlugin</set-method>
        <type>org.exoplatform.services.cms.views.impl.ManageViewPlugin</type>
        <description>this plugin manage user view</description>
        .........
      </component-plugin> 
    </component-plugins>

The plugin parameters are now explained

<init-params>                            
      <object-param>        
        ....
      </object-param>
      ......
    </init-params>

Parameters for create default views, template, actions of Manage view service. Each object-param have a type that is a class representing all properties of a view.

View data object parameters: There are three predefine views, admin-view(view for users in admin group, that view let user have full actions when explore workspaces, default template of this view is list view), simple-view(view for users in user group, user in this group has actions are limited, default template of this view is thumbnails view), anonymous-view(view for quest user, they only have search action with thumbnails view template).

<object-param>        
      <name>Admin-View</name>
      <description>View configuration of Admin</description>
      <object type="org.exoplatform.services.cms.views.ViewConfig">
        <field  name="name"><string>admin-view</string></field>
        <field  name="permissions"><string>member:/admin</string></field>
        <field  name="template"><string>/jcr:system/exo:ecm/views/templates/ecm-explorer/ListView</string></field>  
        <field  name="tabList">
          <collection type="java.util.ArrayList">               
            <value>
              <object type="org.exoplatform.services.cms.views.ViewConfig$Tab">
                <field  name="tabName"><string>Admin</string></field>
                <field  name="buttons">
                  <string>
                    manageVersions; manageCategories; manageRelations; manageActions; exportNode; importNode
                  </string>
                </field>
              </object>
            </value>
            <value>
              <object type="org.exoplatform.services.cms.views.ViewConfig$Tab">
                <field  name="tabName"><string>Info</string></field>
                <field  name="buttons">
                  <string>
                    viewReferences; viewNodeType; viewPermissions; viewProperties; viewRelations
                  </string>
                </field>
              </object>
            </value>
            <value>
              <object type="org.exoplatform.services.cms.views.ViewConfig$Tab">
                <field  name="tabName"><string>Actions</string></field>
                <field  name="buttons">
                  <string>
                    addFolder; addDocument; upload; createTicket; paste; search
                  </string>
                </field>
              </object>
            </value>
          </collection>
        </field>            
      </object>
    </object-param>

If property type is a list of object also config value of property as collection of specify object type

<field  name="tabList">
        <collection type="java.util.ArrayList">               
          <value>
            <object type="org.exoplatform.services.cms.views.ViewConfig$Tab">
              <field  name="tabName"><string>Admin</string></field>
              <field  name="buttons">
                <string>
                  manageVersions; manageCategories; manageRelations; manageActions; exportNode; importNode
                </string>
              </field>
            </object>
          </value>
          .......
        </field>
      </collection>

Template data object parameter:

<object-param>        
      <name>List Template</name>
      <description>Template for display documents in list style</description>
      <object type="org.exoplatform.services.cms.views.TemplateConfig">
        <field  name="type"><string>ecmExplorerTemplate</string></field>
        <field  name="name"><string>ListView</string></field>
        <field  name="warPath"><string>/ecm-explorer/ListView.gtmpl</string></field>              
      </object>
    </object-param>
    ..........

Value Parameter: Configure all actions in views

<init-params>
      <value-param>
        <name>buttons</name>
        <value>
          addFolder; addDocument; upload; createTicket; paste; search; viewReferences; viewNodeType; 
          viewPermissions; viewProperties; manageVersions; manageCategories; manageRelations; 
          manageActions; exportNode; importNode; viewRelations
        </value>
      </value-param>
    </init-params>


Creator: Administrator on 2007/05/22 17:32
Copyright (c) 2000-2009. Allright reserved - eXo platform SAS
1.6.13286