Web Script: org/alfresco/components/title/collaboration-title.get
Generated from /share/service/script/org/alfresco/components/title/collaboration-title.get on Jun 14, 2026 1:28:12 PM

Script Properties
Id:org/alfresco/components/title/collaboration-title.get
Short Name:Collaboration Title
Description:Title component used in the collaboration site
Authentication:none
Transaction:none
Method:GET
URL Template:/components/title/collaboration-title
Format Style:any
Default Format:html
Negotiated Formats:[undefined]
Implementation:class org.alfresco.web.scripts.DeclarativeWebScript
Extensions:[undefined]

Store: classpath:alfresco/site-webscripts

File: org/alfresco/components/title/collaboration-title.get.desc.xml
<webscript>
  <shortname>Collaboration Title</shortname>
  <description>Title component used in the collaboration site</description>
  <url>/components/title/collaboration-title</url>
</webscript>
File: org/alfresco/components/title/collaboration-title.get.head.ftl
<!-- Collaboration Title Assets -->
<script type="text/javascript" src="${page.url.context}/components/title/collaboration-title.js"></script>
<link rel="stylesheet" type="text/css" href="${page.url.context}/modules/edit-site.css"/>
<script type="text/javascript" src="${page.url.context}/modules/edit-site.js"></script>
File: org/alfresco/components/title/collaboration-title.get.html.ftl
<#assign activePage = page.url.templateArgs.pageid!"">
<#assign siteTitle><#if profile.title != "">${profile.title?html}<#else>${profile.shortName}</#if></#assign>
<script type="text/javascript">//<![CDATA[
   new Alfresco.CollaborationTitle("${args.htmlid}").setOptions(
   {
      site: "${page.url.templateArgs.site!""}",
      user: "${user.name!""}"
   }).setMessages(
      ${messages}
   );
//]]></script>
<div class="page-title theme-bg-color-1">
   <div class="title">
      <h1>${msg("header.site", "<span>${siteTitle}</span>")}</h1>
   </div>
   <div class="links title-button">
   <#if userIsSiteManager>
      <#assign linkClass><#if "invite" == activePage>class="active-page"</#if></#assign>
      <span class="yui-button yui-link-button">
         <span class="first-child">
            <a href="${url.context}/page/site/${page.url.templateArgs.site!}/invite" ${linkClass}>${msg("link.invite")}</a>
         </span>
      </span>
   </#if>
   <#if userIsMember>
      <span class="yui-button yui-link-button">
         <span class="first-child">
            <a id="${args.htmlid}-leave-link" href="#">${msg("link.leave")}</a>
         </span>
      </span>
   <#else>
      <span class="yui-button yui-link-button">
         <span class="first-child">
            <a id="${args.htmlid}-join-link" href="#">${msg("link.join")}</a>
         </span>
      </span>
   </#if>
   <#if userIsSiteManager>
      <#assign linkClass><#if "edit-site" == activePage>class="active-page"</#if></#assign>
      <span class="yui-button yui-link-button">
         <span class="first-child">
            <a href="#" onclick="Alfresco.module.getEditSiteInstance().show({shortName: '${profile.shortName}'}); return false;" ${linkClass}>${msg("link.editSite")}</a>
         </span>
      </span>
      <#assign linkClass><#if "customise-site" == activePage>class="active-page"</#if></#assign>
      <span class="yui-button yui-link-button">
         <span class="first-child">
            <a href="${url.context}/page/site/${page.url.templateArgs.site!}/customise-site" ${linkClass}>${msg("link.customiseSite")}</a>
         </span>
      </span>
   </#if>
   <#assign siteDashboardUrl = page.url.context + "/page/site/" + page.url.templateArgs.site + "/dashboard">
   <#if userIsSiteManager && (page.url.uri == siteDashboardUrl || "customise-site-dashboard" == activePage) >
      <#assign linkClass><#if "customise-site-dashboard" == activePage>class="active-page"</#if></#assign>
      <span class="yui-button yui-link-button">
         <span class="first-child">
            <a href="${url.context}/page/site/${page.url.templateArgs.site!}/customise-site-dashboard" ${linkClass}>${msg("link.customiseDashboard")}</a>
         </span>
      </span>
   </#if>
   </div>
</div>
File: org/alfresco/components/title/collaboration-title.get.js
// Call the repository for the site profile
var json = remote.call("/api/sites/" + page.url.templateArgs.site);

var profile =
{
   title: "",
   shortName: ""
};

if (json.status == 200)
{
   // Create javascript objects from the repo response
   var obj = eval('(' + json + ')');
   if (obj)
   {
      profile = obj;
   }
}

// Call the repository to see if the user is site manager or not
var userIsSiteManager = false;
var userIsMember = false;
json = remote.call("/api/sites/" + page.url.templateArgs.site + "/memberships/" + stringUtils.urlEncode(user.name));
if (json.status == 200)
{
   var obj = eval('(' + json + ')');
   userIsMember = true;
   userIsSiteManager = obj.role == "SiteManager";
}

// Prepare the model
model.profile = profile;
model.userIsSiteManager = userIsSiteManager;
model.userIsMember = userIsMember;
File: org/alfresco/components/title/collaboration-title.get.properties
header.site={0} Site
link.customiseSite=Customize Site
link.editSite=Edit Site Details
link.invite=Invite
link.customiseDashboard=Customize Dashboard
link.join=Join
link.leave=Leave
message.joining=Adding user {0} to site {1}...
message.join-failure=Failed to add user {0} to site {1}.
message.leaving=Removing user {0} from site {1}...
message.leave-failure=Failed to remove user {0} from site {1}. There must be at least one Site Manager for a site.

Store: classpath:alfresco/webscripts

[No implementation files]