Web Script: org/alfresco/components/dashlets/user-calendar.get
Generated from /share/service/script/org/alfresco/components/dashlets/user-calendar.get on Jun 13, 2026 9:39:06 PM

Script Properties
Id:org/alfresco/components/dashlets/user-calendar.get
Short Name:My Calendar
Description:Lists the site events for the current user.
Authentication:none
Transaction:none
Method:GET
URL Template:/components/dashlets/user-calendar
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/dashlets/user-calendar.get.desc.xml
<webscript>
   <shortname>My Calendar</shortname>
   <description>Lists the site events for the current user.</description>
   <family>user-dashlet</family>
   <url>/components/dashlets/user-calendar</url>
</webscript>
File: org/alfresco/components/dashlets/user-calendar.get.html.ftl
<div class="dashlet">
   <div class="title">${msg("label.header")}</div>
   <div class="body scrollableList">
<#if eventList??>
   <#if eventList?size &gt; 0>
      <#list eventList as event>
      <div class="detail-list-item <#if event_index = 0>first-item<#elseif !event_has_next>last-item</#if>">
         <div class="icon"><img src="${url.context}/components/calendar/images/calendar-16.png" alt="event" /></div>
         <div class="details2">
            <h4><a href="${url.context}/${event.url}" class="theme-link-1">${event.title?html}</a></h4>
            <div>${event.when} (${event.start} - ${event.end})</div>
         <#assign siteLink><a href='${url.context}/page/site/${event.site}/dashboard' class="theme-link-1">${event.siteTitle?html}</a></#assign>
            <div>${msg("label.in-site", siteLink)}</div>
         </div>
      </div>
      </#list>
   <#else>
      <div class="detail-list-item first-item last-item">
 	      <span>${msg("label.noEvents")}</span>
      </div>
   </#if>
<#else>
      <div class="detail-list-item first-item last-item">
 	      <span>${msg("label.error")}</span>
      </div>
</#if>
   </div>
</div>
File: org/alfresco/components/dashlets/user-calendar.get.js
<import resource="classpath:alfresco/site-webscripts/org/alfresco/callutils.js">

var now = new Date();
var fromDate = now.getFullYear() + "/" + (now.getMonth() + 1) + "/" + now.getDate();
var uri = "/calendar/events/user?from=" + encodeURIComponent(fromDate);

var data = doGetCall(uri);
if (data !== null)
{
   model.eventList = data.events;
}
File: org/alfresco/components/dashlets/user-calendar.get.properties
label.header=My Calendar
label.noEvents=No upcoming events
label.error=Could not load calendar data
label.in-site=in {0}

Store: classpath:alfresco/webscripts

[No implementation files]