How to hide Upload file button in document library
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2016 07:24 AM
Hello.
I have a requirement where I want to hide the Upload file button and show it only if we are under a certain folder.
For getting started I created a extension module that hide the button in all cases(I will be creating a custom evaluator later) by commenting out the file-upload button div in toolbar.get.html.ftl but it doesn't seems to work. Any ideas how can I get the module working.
Thanks
I have a requirement where I want to hide the Upload file button and show it only if we are under a certain folder.
For getting started I created a extension module that hide the button in all cases(I will be creating a custom evaluator later) by commenting out the file-upload button div in toolbar.get.html.ftl but it doesn't seems to work. Any ideas how can I get the module working.
Thanks
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2016 03:25 PM
This may not be the correct way, but you could copy
/opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/include/documentlist_v2.lib.ftl
into your alfresco share project as
src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/documentlibrary/include/documentlist_v2.lib.ftl
Then remove or comment the UPLOAD BUTTON section
This would remove the Upload button entirely.
I don't know if it's possible to incorporate some kind of evaluator.
/opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/include/documentlist_v2.lib.ftl
into your alfresco share project as
src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/documentlibrary/include/documentlist_v2.lib.ftl
Then remove or comment the UPLOAD BUTTON section
<#– UPLOAD BUTTON –> <#– <@markup id="uploadButton"> <#if uploadable> <div class="hideable toolbar-hidden DocListTree"> <div class="file-upload"> <span id="${id}-fileUpload-button" class="yui-button yui-push-button"> <span class="first-child"> <button name="fileUpload">${msg("button.upload")}</button> </span> </span> </div> </div> </#if> </@> –>
This would remove the Upload button entirely.
I don't know if it's possible to incorporate some kind of evaluator.
