how to hidden this buttons?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

how to hidden this buttons?

5 Replies
Highlighted
Senior Member II

Re: how to hidden this buttons?

Inside share-config-custom.xml, you need to use predefined elevator for disabling actions.You can use below evaluator for permanently disable the action.

evaluator.doclib.action.disableAction

Example : For disabling download actions

<config evaluator="string-compare" condition="DocLibActions">

<actions>
<!-- Download document -->
<action id="document-download" type="link" label="actions.document.download">
<param name="href">{downloadUrl}</param>
<param name="target">_blank</param>
<evaluator>evaluator.doclib.action.disableAction</evaluator>
</action>

</config>

For more details regarding predefined evaluators.

Document Library Predefined Evaluators 

Refer below link for creating custom evaluator

Evaluators in alfresco share | Krutik Jayswal 

Highlighted
Member II

Re: how to hidden this buttons?

oh  thanks ! I do it as you say, but it doesn't work

<!-- Download document -->
<action id="document-download" type="link" label="actions.document.download">
<param name="href">{downloadUrl}</param>
<param name="target">_blank</param>
<evaluator>evaluator.doclib.action.disableAction</evaluator>
</action>

Is it the wrong value of label?

Highlighted
Senior Member II

Re: how to hidden this buttons?

Because of the screen shot not being in my language, I am not able to identify the action id, you need to figure on your own.Above code should be in proper place and it will only disable the download action.

Highlighted
Member II

Re: how to hidden this buttons?

the button called "View in a browser" ,But I don't know where to find the right lable value.

Highlighted
Senior Member II

Re: how to hidden this buttons?

<action id="document-view-content" type="link" label="actions.document.view">
<param name="href">{viewUrl}</param>
<evaluator>evaluator.doclib.action.disableAction</action>