AnsweredAssumed Answered

How can I disable the 'User Status' feature?

Question asked by filmchris on Apr 14, 2011
Latest reply on Jun 2, 2014 by boumbh
I am trying to find the file which controls the display of the User Status update box in the user profile drop-down box at the top-right of the page ("What are you doing?").

The closest I've found is:
/{apache-tomcat}/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/header/header.inc.ftl

But when I remove the appropriate sections from this file, it renders my documentlibrary and sites drop-down in the header useless. And there are no errors in the alfresco.log when this happens, so it's nearly impossible to figure out what's going on.

I extended header.inc.ftl and performed the following replacements:

Replaced this:

<#if item.type = "user">
<li class="user-menuitem HEADER-MARKER">
   <#if user.properties.avatar??>
      <#assign avatar>${url.context}/proxy/alfresco/api/node/${user.properties.avatar?replace('://','/')}/content/thumbnails/avatar?c=force</#assign>
   <#else>
      <#assign avatar>${url.context}/res/components/images/no-user-photo-64.png</#assign>
   </#if>
   <a class="avatar" ${attrHref} tabindex="0"><img src="${avatar}" alt="avatar" /></a>
   <span class="user-status">
      <textarea id="${id}-statusText" tabindex="0">${userStatus?html}</textarea>
      <div id="${id}-statusTime" class="user-status-time" title="${userStatusTime?html}"></div>
      <div>
         <span id="${id}-submitStatus" class="yui-button yui-push-button">
            <span class="first-child">
               <button type="button" tabindex="0" title="${msg("header.submit-status.description")}"><span>${msg("header.submit-status.label")}</span></button>
            </span>
         </span>
      </div>
   </span>
</li>
<#else>
   <#assign attrTarget><#if item.type = "external-link">target="_blank"</#if></#assign>
<li><span ${attrStyle}><a ${attrTitle} ${attrHref} tabindex="0" ${attrTarget!""}>${msg(item.label!"")}</a></span>
   <#if item.type = "container"><@subMenu item /></#if>
</li>
</#if>
With this:

<#if item.type = "user">
<li class="user-menuitem HEADER-MARKER">
   <#if user.properties.avatar??>
      <#assign avatar>${url.context}/proxy/alfresco/api/node/${user.properties.avatar?replace('://','/')}/content/thumbnails/avatar?c=force</#assign>
   <#else>
      <#assign avatar>${url.context}/res/components/images/no-user-photo-64.png</#assign>
   </#if>
   <a class="avatar" ${attrHref} tabindex="0"><img src="${avatar}" alt="avatar" /></a>
</li>
<#else>
   <#assign attrTarget><#if item.type = "external-link">target="_blank"</#if></#assign>
<li><span ${attrStyle}><a ${attrTitle} ${attrHref} tabindex="0" ${attrTarget!""}>${msg(item.label!"")}</a></span>
   <#if item.type = "container"><@subMenu item /></#if>
</li>
</#if>

But no dice. The contents of the documentlibrary do not load with this modification in place – it's just a blank area. My "Sites" drop-down menu in the header also fails to work. I can load the site dashboard just fine, however.

I've tried removing one line at at time, restarting and checking, but no matter what I do, if I remove ANYTHING from that section the page fails to load properly. The user drop-down looks great, however - the status box and update button are gone.

I'm not sure if there's another file elsewhere that depends on something in this script, but I'm stuck. Any advice, suggestions or assistance would definitely be appreciated.

Thanks in advance.
Chris

Outcomes