Status Indicators in Alfresco Share

Alfresco Share was initially launched only for providing collaboration platform on top of alfresco repository but due to its rich User Interface and flexible surf framework it become popular rapidly and then gradually all functions of repository are available in Share and it becomes main platform for everything.

Here I am going to show you one of such feature called “Status Indicators” which is small but very useful.

Indicators are small icons typically used to indicate the presence of a marker aspect, or whether a document is in a particular state, e.g. locked, checked out for editing etc.. Indicator facilitates users to get quick idea about status of particular content.

You can find all out of box status indicators defined in file “share-documentlibrary-config.xml”

Under config called “documentlibrary”

<indicators>

         <!-- Editing -->

         <indicator id="editing" index="10">

           <evaluator>evaluator.doclib.indicator.editing</evaluator>

         </indicator>

         <indicator id="lock-owner" index="10">

           <evaluator>evaluator.doclib.indicator.lockOwner</evaluator>

         </indicator>

         <indicator id="locked" index="10" icon="lock-owner-16.png">

           <evaluator>evaluator.doclib.indicator.locked</evaluator>

           <labelParam index="0">{jsNode.properties.owner.displayName}</labelParam>

           <labelParam index="1">{jsNode.properties.owner.userName}</labelParam>

         </indicator>

</indicators>

These are few examples from out of box indicators.

Status Indicators in Alfresco Share

Status Indicators in Alfresco Share

You can define your own custom indicator as follow.

Step1: Define indicator in share-config-custom.xml

<config evaluator="string-compare" condition="DocumentLibrary" >
         <indicators>
                <indicator id="new-created-folder" index="10" label="NewFolder">
                 <evaluator>transmittal.evaluator.doclib.action.isNewFolder</evaluator>
                 </indicator>
          </indicators>
</config>

Step2: Place respective image inside folder.

<ALF_HOME>\tomcat\webapps\share\components\documentlibrary\indicators

*Name of indicator image should be of following pattern “{id}-16.png” which in this case is new-created-folder-16.png you can override this name by adding “icon” attribute

Step3: Create defined evaluator which decides on which contents this indicator should be visible.

In this case evaluator is “transmittal.evaluator.doclib.action.isNewFolder”

This evaluator is same as action evaluator so to create one such evaluator you can refer this post.

That’s it you once you restart server you can see those indicators in effect as shown in below.

Custom Indicator in Alfresco Share

Custom Indicator in Alfresco Share

References: http://blogs.alfresco.com/wp/developer/2011/09/26/share-document-library-extensions-in-v4-0/

Looking for quality Alfresco Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight

mitpatoliya

mitpatoliya

I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

Leave a Reply

Your email address will not be published. Required fields are marked *


3 + 6 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>