Web Script: org/alfresco/components/discussions/toolbar.get
Generated from /share/service/script/org/alfresco/components/discussions/toolbar.get on Jun 13, 2026 9:39:07 PM

Script Properties
Id:org/alfresco/components/discussions/toolbar.get
Short Name:discussionstoolbar
Description:Discussions: Toolbar
Authentication:none
Transaction:none
Method:GET
URL Template:/components/discussions/toolbar
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/discussions/toolbar.get.desc.xml
<webscript>
  <shortname>discussionstoolbar</shortname>
  <description>Discussions: Toolbar</description>
  <url>/components/discussions/toolbar</url>
</webscript>
File: org/alfresco/components/discussions/toolbar.get.head.ftl
<!-- Blog toolbar Assets -->
<link rel="stylesheet" type="text/css" href="${page.url.context}/components/discussions/toolbar.css" />
<script type="text/javascript" src="${page.url.context}/components/discussions/toolbar.js"></script>
        
File: org/alfresco/components/discussions/toolbar.get.html.ftl
<script type="text/javascript">//<![CDATA[
   new Alfresco.DiscussionsToolbar("${args.htmlid}").setOptions(
   {
      siteId: "${page.url.templateArgs["site"]!""}",
      containerId: "${args.container!'discussions'}",
      allowCreate: ${forum.forumPermissions.create?string}
   }).setMessages(
      ${messages}
   );
//]]></script>
<div id="${args.htmlid}-body" class="toolbar flat-button">

   <div class="navigation-bar <#if (args.showNavigationBar == "false")>hide</#if>">
      <div>
         <span class="<#if (page.url.args.listViewLinkBack! == "true")>backLink<#else>forwardLink</#if>">
            <a href="${url.context}/page/site/${page.url.templateArgs.site}/discussions-topiclist">${msg("link.listView")}</a>
         </span>
      </div>
   </div>

   <div class="action-bar">
      <div class="new-topic"><button id="${args.htmlid}-create-button">${msg("button.create")}</button></div>
   </div>

   <div class="rss-feed">
      <div>
         <a id="${args.htmlid}-rssFeed-button" href="${url.context}/proxy/alfresco-feed/slingshot/wiki/pages/${page.url.templateArgs["site"]}?format=rss">${msg("button.rssfeed")}</a>
      </div>
   </div>

</div>
<div class="clear"></div>
        
File: org/alfresco/components/discussions/toolbar.get.js
function main()
{
   // A default blog description
   var forum =
   {
      forumPermissions: {}
   };

   // Call the repo to get the permissions for the user for this blog
   var result = remote.call("/api/forum/site/" + page.url.templateArgs.site + "/" + (args.container ? args.container : "discussions") + "/posts?startIndex=0&pageSize=0");
   if (result.status == 200)
   {
      // Create javascript objects from the server response
      var obj = eval('(' + result + ')');
      forum = obj;
   }

   // Prepare the model for the template
   model.forum = forum;
}

main();
File: org/alfresco/components/discussions/toolbar.get.properties
button.create=New Topic
button.rssfeed=RSS Feed
link.listView=Discussions Topic List

Store: classpath:alfresco/webscripts

[No implementation files]