Hide Create Site link in dashboard/dashlet

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2012 11:47 PM
Hi! Good Day!
Does anyone knows how to hide 'Create site' in 'My site' dashboard/dashlet? What file–> js/xml should I customize?
Thank you,
Irene
Does anyone knows how to hide 'Create site' in 'My site' dashboard/dashlet? What file–> js/xml should I customize?
Thank you,
Irene
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2012 08:18 AM
You can modify/override below files to hide create site link.
My Sites dashlet - site-webscripts/org/alfresco/components/dashlet/my-sites.get.html.ftl
Top header - site-webscripts/org/alfresco/modules/sites.get.html.ftl
Thanks,
My Sites dashlet - site-webscripts/org/alfresco/components/dashlet/my-sites.get.html.ftl
Top header - site-webscripts/org/alfresco/modules/sites.get.html.ftl
Thanks,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2012 02:33 PM
A little more detail - in the js module
then in the HTML file
function main(){ createSite = false var result = remote.call("/api/people/" + stringUtils.urlEncode(user.name) + "?groups=true"); if (result.status == 200) { var i; // Create javascript objects from the server response // This is the User and it also contains all groups. var userValue = eval('(' + result + ')'); if (userValue.groups.length != 0) { for (i = 0; i < userValue.groups.length; i++) { if (userValue.groups[i].itemName == "GROUP_ALFRESCO_ADMINISTRATORS") createSite = true; if (userValue.groups[i].itemName == "GROUP_CreateSiteAdministrator") createSite = true; } } } // Check for IMAP server status var result = remote.call("/imap/servstatus"), imapServerEnabled = (result.status == 200 && result == "enabled"); // Prepare the model for the template model.imapServerEnabled = imapServerEnabled; model.createSite = createSite;}main();
then in the HTML file
<span class="first-child"> <#if createSite> <a href="#" id="${id}-createSite-button" class="theme-color-1"> <img src="${url.context}/res/components/images/site-16.png" style="vertical-align: text-bottom" /> ${msg("link.createSite")}</a> </#if> </span>

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2012 10:05 PM
You can modify/override below files to hide create site link.
My Sites dashlet - site-webscripts/org/alfresco/components/dashlet/my-sites.get.html.ftl
Top header - site-webscripts/org/alfresco/modules/sites.get.html.ftl
Thanks,
Thank you. I appreciate

Irene

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2012 10:10 PM
A little more detail - in the js modulefunction main(){ createSite = false var result = remote.call("/api/people/" + stringUtils.urlEncode(user.name) + "?groups=true"); if (result.status == 200) { var i; // Create javascript objects from the server response // This is the User and it also contains all groups. var userValue = eval('(' + result + ')'); if (userValue.groups.length != 0) { for (i = 0; i < userValue.groups.length; i++) { if (userValue.groups[i].itemName == "GROUP_ALFRESCO_ADMINISTRATORS") createSite = true; if (userValue.groups[i].itemName == "GROUP_CreateSiteAdministrator") createSite = true; } } } // Check for IMAP server status var result = remote.call("/imap/servstatus"), imapServerEnabled = (result.status == 200 && result == "enabled"); // Prepare the model for the template model.imapServerEnabled = imapServerEnabled; model.createSite = createSite;}main();
then in the HTML file<span class="first-child"> <#if createSite> <a href="#" id="${id}-createSite-button" class="theme-color-1"> <img src="${url.context}/res/components/images/site-16.png" style="vertical-align: text-bottom" /> ${msg("link.createSite")}</a> </#if> </span>
Thank you for your help. I appreciate.

Irene

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2016 08:25 AM
Hi,
i did above to hide create site link, and its working fine,
but if i deploy any amp, then all changes are reverted back to original.
so can any one tell me what can i do this to solve above problem????
Thanks in advance
Regards: Deepak
i did above to hide create site link, and its working fine,
but if i deploy any amp, then all changes are reverted back to original.
so can any one tell me what can i do this to solve above problem????
Thanks in advance
Regards: Deepak
