Index: main/plugin-explorer/i18n/messages_en.xml
===================================================================
--- main/plugin-explorer/i18n/messages_en.xml	(revision 36868)
+++ main/plugin-explorer/i18n/messages_en.xml	(working copy)
@@ -125,6 +125,8 @@
     <message key="PLUGINS_EXPLORER_CALENDAR_TITLE_DESC">Title of the calendar</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_DESC">Description</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_DESC_DESC">Description of the calendar</message>
+    <message key="PLUGINS_EXPLORER_CALENDAR_TEMPLATE_DESC">Template of description for events</message>
+    <message key="PLUGINS_EXPLORER_CALENDAR_TEMPLATE_DESC_DESC">Enter here the template of description for events. It will be automatically reported to the new events description.&lt;/br&gt;Author of an event will have the possibility to edit this description.</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_LIST_COLOR">Color</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_LIST_COLOR_DESC">Color of the events of the calendar</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_LIST_WORKFLOW">Workflow</message>
@@ -424,6 +426,8 @@
     <message key="PLUGINS_EXPLORER_DIALOG_ADDANDRENAME">Add and rename</message>
     <message key="PLUGINS_EXPLORER_DIALOG_CANCEL">Cancel</message>
 	
+	<message key="PLUGINS_EXPLORER_EVENT_TITLE_ERROR_GET_TEMPLATE_DESC">An error occurred : can't get the description template of an event.</message>
+	
     <!-- THREADS -->
     <message key="PLUGINS_EXPLORER_THREAD_ADD_LABEL">New thread</message>
     <message key="PLUGINS_EXPLORER_THREAD_ADD_LABEL_SHORT">New</message>
Index: main/plugin-explorer/i18n/messages_fr.xml
===================================================================
--- main/plugin-explorer/i18n/messages_fr.xml	(revision 36868)
+++ main/plugin-explorer/i18n/messages_fr.xml	(working copy)
@@ -125,8 +125,10 @@
     <message key="PLUGINS_EXPLORER_CALENDAR_TITLE_DESC">Titre du calendrier</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_DESC">Description</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_DESC_DESC">Description du calendrier</message>
+    <message key="PLUGINS_EXPLORER_CALENDAR_TEMPLATE_DESC">Modèle de description pour les événements</message>
+    <message key="PLUGINS_EXPLORER_CALENDAR_TEMPLATE_DESC_DESC">Entrez ici le modèle de description des événements. Il sera automatiquement reporté dans la description des nouveaux événements.&lt;/br&gt;Le createur de l'événement aura la possibilité de modifier cette description.</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_LIST_COLOR">Couleur</message>
-    <message key="PLUGINS_EXPLORER_CALENDAR_LIST_COLOR_DESC">Couleur des evènements du calendrier</message>
+    <message key="PLUGINS_EXPLORER_CALENDAR_LIST_COLOR_DESC">Couleur des événements du calendrier</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_LIST_WORKFLOW">Cycle de vie</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_LIST_WORKFLOW_DESC">Cycle de vie associé au calendrier</message>
     <message key="PLUGINS_EXPLORER_CALENDAR_BUTTON_OK">OK</message>
@@ -424,6 +426,8 @@
 	<message key="PLUGINS_EXPLORER_DIALOG_ADDANDRENAME">Ajouter et renommer</message>
 	<message key="PLUGINS_EXPLORER_DIALOG_CANCEL">Annuler</message>
 	
+	<message key="PLUGINS_EXPLORER_EVENT_TITLE_ERROR_GET_TEMPLATE_DESC">Une erreur est survenue : impossible de récupérer le modèle de description d'un événement.</message>
+	
     <!-- THREADS -->
     <message key="PLUGINS_EXPLORER_THREAD_ADD_LABEL">Nouveau fil de discussion</message>
     <message key="PLUGINS_EXPLORER_THREAD_ADD_LABEL_SHORT">Nouveau</message>
Index: main/plugin-explorer/nodetypes.xml
===================================================================
--- main/plugin-explorer/nodetypes.xml	(revision 36868)
+++ main/plugin-explorer/nodetypes.xml	(working copy)
@@ -47,6 +47,7 @@
             <supertype>ametys:compositeMetadata</supertype>
         </supertypes>
          <propertyDefinition name="ametys:description" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" multiple="false"/>
+         <propertyDefinition name="ametys:template-description" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" multiple="false"/>
          <propertyDefinition name="ametys:workflowName" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false"/>
          <propertyDefinition name="ametys:color" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false"/>
          <childNodeDefinition name="ametys:calendar-event" defaultPrimaryType="ametys:calendar-event" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" sameNameSiblings="true">
Index: main/plugin-explorer/resources/js/org/ametys/explorer/applications/calendar/CalendarActions.i18n.js
===================================================================
--- main/plugin-explorer/resources/js/org/ametys/explorer/applications/calendar/CalendarActions.i18n.js	(revision 36868)
+++ main/plugin-explorer/resources/js/org/ametys/explorer/applications/calendar/CalendarActions.i18n.js	(working copy)
@@ -34,6 +34,7 @@
 	
 	org.ametys.explorer.applications.calendar.Calendar._title.setValue("");
 	org.ametys.explorer.applications.calendar.Calendar._desc.setValue("");
+	org.ametys.explorer.applications.calendar.Calendar._templateDesc.setValue("");
 	org.ametys.explorer.applications.calendar.Calendar._comboListColor.setValue(null);
 	org.ametys.explorer.applications.calendar.Calendar._comboListColor.getStore().load();
 	org.ametys.explorer.applications.calendar.Calendar._comboListWorkflow.setValue(null);
@@ -166,6 +167,15 @@
     	    })
     	});
 
+		org.ametys.explorer.applications.calendar.Calendar._templateDesc = new org.ametys.form.TextAreaField({
+            id: 'explorer-calendar-template-description',
+            fieldLabel: "<i18n:text i18n:key='PLUGINS_EXPLORER_CALENDAR_TEMPLATE_DESC'/>",
+            desc: "<i18n:text i18n:key='PLUGINS_EXPLORER_CALENDAR_TEMPLATE_DESC_DESC'/>",
+            width: 220,
+            height: 100,
+    	    allowBlank: true
+        });
+		
 		org.ametys.explorer.applications.calendar.Calendar._formPanel = new Ext.form.FormPanel({
 	        labelWidth: 120,
 	        
@@ -177,7 +187,8 @@
 	            org.ametys.explorer.applications.calendar.Calendar._title,
 	            org.ametys.explorer.applications.calendar.Calendar._desc,
 	            org.ametys.explorer.applications.calendar.Calendar._comboListColor,
-	            org.ametys.explorer.applications.calendar.Calendar._comboListWorkflow
+	            org.ametys.explorer.applications.calendar.Calendar._comboListWorkflow,
+	            org.ametys.explorer.applications.calendar.Calendar._templateDesc
 	        ],
 	        
 	        bodyStyle: 'padding:10px',
@@ -189,7 +200,7 @@
 	        title: "<i18n:text i18n:key='PLUGINS_EXPLORER_CALENDAR_TITLE_ADD_LABEL'/>",
 	        icon: getPluginResourcesUrl ('explorer') + '/img/calendar/calendar_new_16.png',        
 	        width: 440,
-	        height: 280,
+	        height: 400,
 	        autoScroll: false,	  
 	        defaultButton: org.ametys.explorer.applications.calendar.Calendar._title,
 	        items: [ org.ametys.explorer.applications.calendar.Calendar._formPanel ],        
@@ -226,6 +237,7 @@
 	var params = {};
 	params.title = org.ametys.explorer.applications.calendar.Calendar._title.getValue().trim();
 	params.desc = org.ametys.explorer.applications.calendar.Calendar._desc.getValue();
+	params.templateDesc = org.ametys.explorer.applications.calendar.Calendar._templateDesc.getValue();
 	params.color = org.ametys.explorer.applications.calendar.Calendar._comboListColor.getValue();
 	params.workflowName = org.ametys.explorer.applications.calendar.Calendar._comboListWorkflow.getValue();
 	params.id = org.ametys.explorer.applications.calendar.Calendar._calendarId;
@@ -367,18 +379,20 @@
 	var calendar = response.selectSingleNode("infos/calendar");	
 	org.ametys.explorer.applications.calendar.Calendar._showBoxWithInfo (
 			calendar.getAttribute("title"), 
-			calendar.getAttribute("desc"), 
+			calendar.getAttribute("desc"),
+			calendar.getAttribute("templateDesc"),
 			calendar.getAttribute("color"), 
 			calendar.getAttribute("workflowName")
 			);
 }
 
-org.ametys.explorer.applications.calendar.Calendar._showBoxWithInfo = function (title, desc, color, workflowName)
+org.ametys.explorer.applications.calendar.Calendar._showBoxWithInfo = function (title, desc, templateDesc, color, workflowName)
 {
 	org.ametys.explorer.applications.calendar.Calendar._delayedInitialized();
 	
 	org.ametys.explorer.applications.calendar.Calendar._title.setValue(title);
 	org.ametys.explorer.applications.calendar.Calendar._desc.setValue(desc);
+	org.ametys.explorer.applications.calendar.Calendar._templateDesc.setValue(templateDesc);
 	org.ametys.explorer.applications.calendar.Calendar._box.setTitle("<i18n:text i18n:key='PLUGINS_EXPLORER_CALENDAR_TITLE_EDIT_LABEL'/>");
 	
 	org.ametys.explorer.applications.calendar.Calendar._box.show();
Index: main/plugin-explorer/resources/js/org/ametys/explorer/applications/calendar/EventActions.i18n.js
===================================================================
--- main/plugin-explorer/resources/js/org/ametys/explorer/applications/calendar/EventActions.i18n.js	(revision 34075)
+++ main/plugin-explorer/resources/js/org/ametys/explorer/applications/calendar/EventActions.i18n.js	(working copy)
@@ -34,7 +34,9 @@
 	org.ametys.explorer.applications.calendar.Event._delayedInitialized();
 	
 	org.ametys.explorer.applications.calendar.Event._title.setValue("");
-	org.ametys.explorer.applications.calendar.Event._desc.setValue("");
+
+	var templateDesc = org.ametys.explorer.applications.calendar.Event._getTemplateDescription(parentId);
+	org.ametys.explorer.applications.calendar.Event._desc.setValue(templateDesc);
 	
 	org.ametys.explorer.applications.calendar.Event._fullDay.setValue(fullDay);
 	org.ametys.explorer.applications.calendar.Event._comboListCalendar.getStore().setBaseParam ("calendarId", org.ametys.explorer.applications.calendar.Event._parentId);
@@ -52,6 +54,26 @@
 	org.ametys.explorer.applications.calendar.Event._formPanel.getForm().clearInvalid();
 }
 
+org.ametys.explorer.applications.calendar.Event._getTemplateDescription = function(parentId)
+{
+	var serverMessage = new org.ametys.servercomm.ServerMessage("explorer", '/get-template-description', {'id': parentId}, org.ametys.servercomm.ServerComm.PRIORITY_SYNCHRONOUS, null, this, null);
+    var response = org.ametys.servercomm.ServerComm.getInstance().send(serverMessage);
+
+    var templateDesc = "";
+    if (org.ametys.servercomm.ServerComm.handleBadResponse("<i18n:text i18n:key='PLUGINS_EXPLORER_EVENT_TITLE_ERROR_GET_TEMPLATE_DESC'/>", response, 'org.ametys.explorer.applications.calendar.Event'))
+    {
+        return templateDesc;
+    }
+    
+	var calendarResponse = response.selectSingleNode("calendar/desc");
+	if (calendarResponse != null)
+	{
+		templateDesc = calendarResponse[org.ametys.servercomm.ServerComm.xmlTextContent];
+	}
+    
+    return templateDesc;
+}
+
 org.ametys.explorer.applications.calendar.Event._delayedInitialized = function()
 {	
 	if (!org.ametys.explorer.applications.calendar.Event._box)
Index: main/plugin-explorer/sitemap.xmap
===================================================================
--- main/plugin-explorer/sitemap.xmap	(revision 36868)
+++ main/plugin-explorer/sitemap.xmap	(working copy)
@@ -55,6 +55,7 @@
 		</map:actions>
 		
 		<map:generators>
+		    <map:generator name="get-template-description" src="org.ametys.plugins.explorer.calendar.generators.CalendarTemplateDesccriptionGenerator" logger="org.ametys.explorer.generators"/>
             <map:generator name="workflow-events" src="org.ametys.plugins.explorer.calendar.workflow.EventWorkflowGenerator" logger="org.ametys.explorer.generators" />
             <map:generator name="info-event" src="org.ametys.plugins.explorer.calendar.generators.CalendarEventInfoGenerator" logger="org.ametys.explorer.generators" />
             <map:generator name="calendar-workflow" src="org.ametys.plugins.explorer.calendar.workflow.CalendarWorkflowGenerator" logger="org.ametys.explorer.generators" />
@@ -165,6 +166,11 @@
 				<map:serialize type="xml" />
 			</map:match>
 			
+			<map:match pattern="get-template-description">
+                <map:generate type="get-template-description" />
+                <map:serialize type="xml" />
+            </map:match>
+			
 			<map:match pattern="explorer-nodes">
 				<map:generate type="explorer-nodes" />
 				<map:serialize type="xml" />
Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/Calendar.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/Calendar.java	(revision 34075)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/Calendar.java	(working copy)
@@ -45,6 +45,12 @@
     public String getWorkflowName();
 
     /**
+     * Get the template description of the calendar
+     * @return the template description of the calendar
+     */
+    public String getTemplateDescription();
+    
+    /**
      * Get the events of the calendar between two dates
      * @param startDate Begin date
      * @param endDate End date
Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/ModifiableCalendar.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/ModifiableCalendar.java	(revision 34075)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/ModifiableCalendar.java	(working copy)
@@ -41,4 +41,11 @@
      * @param workflowName 
      */
     public void setWorkflowName(String workflowName);
+    
+    /**
+     * set the template description of the calendar
+     * @param templateDesc 
+     */
+    public void setTemplateDescription(String templateDesc);
+    
 }
Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/actions/AddOrEditCalendarAction.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/actions/AddOrEditCalendarAction.java	(revision 34075)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/actions/AddOrEditCalendarAction.java	(working copy)
@@ -72,6 +72,7 @@
         String parentId = request.getParameter("parentId");
         String title = request.getParameter("title");
         String desc = request.getParameter("desc");
+        String templateDesc = request.getParameter("templateDesc");
         String workflowName = request.getParameter("workflowName");
         String color = request.getParameter("color");
         String justNameEdit = request.getParameter("justNameEdit");
@@ -105,6 +106,7 @@
             if (justNameEdit == null)
             {
                 calendar.setDescription(desc);
+                calendar.setTemplateDescription(templateDesc);
                 calendar.setColor(color);
             }
             parent.saveChanges();
@@ -147,6 +149,7 @@
             calendar = parent.createChild(name, JCRCalendarFactory.CALENDAR_NODETYPE);
             calendar.setWorkflowName(workflowName);
             calendar.setDescription(desc);
+            calendar.setTemplateDescription(templateDesc);
             calendar.setColor(color);
             parent.saveChanges();
 
Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/generators/CalendarEventInfoGenerator.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/generators/CalendarEventInfoGenerator.java	(revision 34075)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/generators/CalendarEventInfoGenerator.java	(working copy)
@@ -116,6 +116,7 @@
         attr.addCDATAAttribute("id", calendar.getId());
         attr.addCDATAAttribute("title", calendar.getName());
         attr.addCDATAAttribute("desc", calendar.getDescription());
+        attr.addCDATAAttribute("templateDesc", calendar.getTemplateDescription());
         attr.addCDATAAttribute("color", calendar.getColor());
         attr.addCDATAAttribute("workflowName", calendar.getWorkflowName());
         attr.addCDATAAttribute("modifiable", calendar instanceof ModifiableAmetysObject ? "true" : "false");
Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/generators/CalendarTemplateDesccriptionGenerator.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/generators/CalendarTemplateDesccriptionGenerator.java	(revision 0)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/generators/CalendarTemplateDesccriptionGenerator.java	(revision 0)
@@ -0,0 +1,69 @@
+/*
+ *  Copyright 2015 Anyware Services
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.ametys.plugins.explorer.calendar.generators;
+
+import java.io.IOException;
+
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.generation.ServiceableGenerator;
+import org.apache.cocoon.xml.XMLUtils;
+import org.xml.sax.SAXException;
+
+import org.ametys.plugins.explorer.calendar.Calendar;
+import org.ametys.plugins.repository.AmetysObjectResolver;
+
+/**
+ * Template description generator for a calendar
+ */
+public class CalendarTemplateDesccriptionGenerator extends ServiceableGenerator
+{
+    /** The object resolver */
+    protected AmetysObjectResolver _resolver;
+    
+    @Override
+    public void service(ServiceManager serviceManager) throws ServiceException
+    {
+        super.service(serviceManager);
+        _resolver = (AmetysObjectResolver) serviceManager.lookup(AmetysObjectResolver.ROLE);
+    }
+    
+    public void generate() throws IOException, SAXException, ProcessingException
+    {
+        Request request = ObjectModelHelper.getRequest(objectModel);
+        
+        contentHandler.startDocument();
+        XMLUtils.startElement(contentHandler, "calendar");
+       
+        String calendarId = request.getParameter("id");
+        try
+        {
+            Calendar calendar = _resolver.resolveById(calendarId);
+            XMLUtils.createElement(contentHandler, "desc", calendar.getTemplateDescription());
+        }
+        catch (Exception e)
+        {
+            getLogger().error("An error occurred : can't get the template description for id : " + calendarId);
+        }
+        
+        XMLUtils.endElement(contentHandler, "calendar");
+        contentHandler.endDocument();
+    }
+
+}
Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/jcr/JCRCalendar.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/jcr/JCRCalendar.java	(revision 34075)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/jcr/JCRCalendar.java	(working copy)
@@ -22,6 +22,8 @@
 
 import javax.jcr.Node;
 
+import org.apache.commons.lang.StringUtils;
+
 import org.ametys.plugins.explorer.ExplorerNode;
 import org.ametys.plugins.explorer.calendar.Calendar;
 import org.ametys.plugins.explorer.calendar.CalendarEvent;
@@ -51,6 +53,9 @@
     /** Constants for workflowName Calendar* */
     public static final String CALENDAR_WORKFLOW_NAME = "workflowName";
     
+    /** Constants for template description Calendar* */
+    public static final String CALENDAR_TEMPLATE_DESC = "template-description";
+    
     /**
      * Creates an {@link JCRCalendar}.
      * @param node the node backing this {@link AmetysObject}
@@ -101,6 +106,16 @@
         return getMetadataHolder().getString(CALENDAR_WORKFLOW_NAME);
     }
     
+    public String getTemplateDescription()
+    {
+        String templateDescription = "";
+        if (getMetadataHolder().hasMetadata(CALENDAR_TEMPLATE_DESC))
+        {
+            templateDescription = getMetadataHolder().getString(CALENDAR_TEMPLATE_DESC);
+        }
+        return templateDescription;
+    }
+    
     public List<CalendarEvent> getEvents(Date startDate, Date endDate)
     {
         List<CalendarEvent> events = new ArrayList<CalendarEvent>();
@@ -162,6 +177,11 @@
         getMetadataHolder().setMetadata(CALENDAR_WORKFLOW_NAME, workflowName); 
     }
     
+    public void setTemplateDescription(String templateDesc)
+    {
+        getMetadataHolder().setMetadata(CALENDAR_TEMPLATE_DESC, templateDesc);
+    }
+    
     public boolean hasChildExplorerNodes() throws AmetysRepositoryException
     {
         for (AmetysObject child : getChildren())
