cancel
Showing results for 
Search instead for 
Did you mean: 

Disable leave button

petrush
Champ in-the-making
Champ in-the-making
Is there any way to disable the "leave" button on a site. Two users today thought it was the logoff button. This feature is not needed such centrally placed, it  could well be handled by administrator only.

Is there any hack to disable the button - I'm not familiar with the alfreso internals.

Best regards
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
Yes, sorry - all those buttons were  little bit "design by committee" and could do with a re-think.

To remove the leave button, hunt down collaboration-title.get.html.ftl in the share.war (the extension point doesn't work yet with component webscripts) and wrap the leave button with style="display: none". You could comment it out completely, but there may be a JavaScript error if the DOM node isn't present.

Thanks,
Mike

petrush
Champ in-the-making
Champ in-the-making
Thank you, it seems to work.

I am however not sure if I did it the correct way, I know very little of the tomcat, war files and such. I didn't use the share.war file at all,

What I did was:
Edited:
C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\title\collaboration-title.get.html.ftl

From
<span class="first-child">
            <a id="${args.htmlid}-leave-link" href="#">${msg("link.leave")}</a>
         </span>
to:

<span class="first-child">
            <a id="${args.htmlid}-leave-link" style="display:none" href="#">${msg("link.leave")}</a>
         </span>

(Just adding a style="display:none" within the a tag).

mikeh
Star Contributor
Star Contributor
That's fine, but not if the .war file gets deployed again your changes will be overwritten.

A .war file is simply a zip file, so you can use most GUI zip tools to replace the file in the .war itself.

Mike