cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Download button when the file is locked to offline editing

henrychoi_yw
Champ in-the-making
Champ in-the-making
I would like to ask is there any way to disable the download button/function when the document is check-in as locked.

Thanks very much for the help
5 REPLIES 5

lementree
Champ on-the-rise
Champ on-the-rise
Hi,

you can use the Evaluator to hide the action

Thanks very much for your reply.
I would like to know where the Evaluator function is and how to set it up. Sorry I'm still new to Alfresco.

This should give you a good intro into setting up the evaluator:

http://alfrescocms.blogspot.in/2012/03/custom-document-library-action.html

-jon

deepak1987
Star Contributor
Star Contributor
Hi,

Add following code in [Alfresco_Home]\tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml file

<blockcode>

<!– Document Library Actions config section –>
<config evaluator="string-compare" condition="DocLibActions">

    <!–
       Action definitions
    –>
    <actions>

       <!– Download document –>
       <action id="document-download" type="link" label="actions.document.download">
          <param name="href">{downloadUrl}</param>

          <!–
             Evaluator to Disable Download action when document is locked by a user
          –>
          <evaluator negate="true">evaluator.doclib.action.isWorkingCopy</evaluator>
       </action>
            
    </actions>
</config>
</blockcode>

Thanks very much for your reply, it works perfectly fine for me =D