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.
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.
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!