Index: main/plugin-odf-web/cms-ribbon-odf.xml
===================================================================
--- main/plugin-odf-web/cms-ribbon-odf.xml	(revision 33335)
+++ main/plugin-odf-web/cms-ribbon-odf.xml	(working copy)
@@ -90,6 +90,7 @@
                     <large/>
                     <medium>
                         <control id="org.ametys.odf.web.PDFExport"/>
+                        <control id="org.ametys.odfweb.ExportCatalogInDesign"/>
                     </medium>
                     <small/>
                 </group>
Index: main/plugin-odf-web/plugin.xml
===================================================================
--- main/plugin-odf-web/plugin.xml	(revision 33335)
+++ main/plugin-odf-web/plugin.xml	(working copy)
@@ -154,6 +154,7 @@
     
     <feature name="export.indesign">
         <extensions>
+            <!-- Program export -->
             <extension id="org.ametys.odfweb.InDesignExport"
                        point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
                        class="org.ametys.cms.clientsideelement.StaticMenu">
@@ -185,12 +186,34 @@
                     <param name="iconSmall" file="true" plugin="odf">img/actions/export_indesign_16.png</param> <!--TODO add iconSmall -->
                 </menu-item>
                 <scripts>
-                    <file plugin="odf">js/org/ametys/odf/indesign/ExportInDesign.js</file>
+                    <file plugin="odf">js/org/ametys/odf/indesign/ExportInDesign.i18n.js</file>
                     <file>js/org/ametys/odf/web/ExportInDesign.i18n.js</file>
                     <file plugin="odf">js/org/ametys/odf/program/button/ODFContentActionMenu.js</file>
                 </scripts>
                 <right>ODF_Rights_Export_InDesign</right>
             </extension>
+            
+            <!-- Catalog export -->
+            <extension id="org.ametys.odfweb.ExportCatalogInDesign"
+                       point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
+                       class="org.ametys.runtime.ui.impl.StaticContextualClientSideElement">
+                <action class="org.ametys.ribbon.control.button.ActionButton">
+                    <param name="action">org.ametys.odf.web.ExportCatalogInDesign</param>
+                    
+                    <param name="label" i18n="true">plugin.odf:PLUGINS_ODF_EXPORT_CATALOG_INDESIGN_BUTTON_LABEL</param>
+                    <param name="default-description" i18n="true">plugin.odf:PLUGINS_ODF_EXPORT_CATALOG_INDESIGN_BUTTON_DESCRIPTION</param>
+                    <param name="footer" i18n="true">plugin.odf:PLUGINS_ODF_EXPORT_CATALOG_INDESIGN_FOOTER</param>
+                    
+                    <param name="icon-small" file="true" plugin="odf">img/actions/export_indesign_16.png</param>
+                    <param name="icon-medium" file="true" plugin="odf">img/actions/export_indesign_32.png</param>
+                    <param name="icon-large" file="true" plugin="odf">img/actions/export_indesign_48.png</param>
+                </action> 
+                <scripts>
+                    <file plugin="odf">js/org/ametys/odf/indesign/ExportCatalogInDesign.i18n.js</file>
+                    <file>js/org/ametys/odf/web/ExportCatalogInDesign.i18n.js</file>
+                </scripts>
+                <right>ODF_Rights_Export_InDesign</right>
+            </extension>
         </extensions>
     </feature>
     
Index: main/plugin-odf-web/resources/js/org/ametys/odf/web/ExportCatalogInDesign.i18n.js
===================================================================
--- main/plugin-odf-web/resources/js/org/ametys/odf/web/ExportCatalogInDesign.i18n.js	(revision 0)
+++ main/plugin-odf-web/resources/js/org/ametys/odf/web/ExportCatalogInDesign.i18n.js	(revision 0)
@@ -0,0 +1,41 @@
+/*
+ *  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.
+ */
+
+Ext.namespace('org.ametys.odf.web');
+
+org.ametys.odf.web.ExportCatalogInDesign = function (id, config, pluginName)
+{
+	org.ametys.odf.indesign.ExportCatalogInDesign.delayedInitialize(org.ametys.odf.web.ExportCatalogInDesign._doExport);
+	
+	org.ametys.odf.indesign.ExportCatalogInDesign._box.show();
+	
+	org.ametys.odf.indesign.ExportCatalogInDesign._loadFormValues();
+}
+
+org.ametys.odf.web.ExportCatalogInDesign._doExport = function (args)
+{
+	var form = org.ametys.odf.indesign.ExportCatalogInDesign._form.getForm();
+	
+	var sitemapTool = org.ametys.uitool.ToolsManager.getInstance().getTool ('uitool-sitemap');
+	if (sitemapTool != null)
+	{
+		args += '&amp;lang=' + sitemapTool._tree._lang;
+	} 
+	
+	var url = getPluginDirectUrl('odf-web') + '/' + context.parameters.siteName + '/indesign/' + form.findField('catalogue').getValue() + '/catalogue.xml?' + args;
+	window.open(url);
+}
+
Index: main/plugin-odf-web/resources/js/org/ametys/odf/web/ExportInDesign.i18n.js
===================================================================
--- main/plugin-odf-web/resources/js/org/ametys/odf/web/ExportInDesign.i18n.js	(revision 33536)
+++ main/plugin-odf-web/resources/js/org/ametys/odf/web/ExportInDesign.i18n.js	(working copy)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2010 Anyware Services
+ *  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.
@@ -22,7 +22,9 @@
 	var target = org.ametys.messagebus.message.MessageTargetHelper.findFirst(targets, org.ametys.odf.indesign.ExportInDesign._testTarget.createDelegate(this));
 	
 	if (target == null)
+	{
 		return; 
+	}
 	
 	var args = 'id=' + target.getParameters().id;
 	for (var i in context.parameters)
@@ -30,7 +32,20 @@
 		args += '&amp;' + i + '=' + encodeURIComponent(context.parameters[i]);
 	}
 	
-    var url = getPluginDirectUrl('odf-web') + "/" + context.parameters.siteName + '/indesign/program.xml?' + args;
+	org.ametys.odf.indesign.ExportInDesign.delayedInitialize(org.ametys.odf.web.ExportInDesign._doExport, args);
+	org.ametys.odf.indesign.ExportInDesign._box.show();
+	
+	var form = org.ametys.odf.indesign.ExportInDesign._form.getForm();
+	form.findField('xslt').getStore().load();
+	form.findField('xslt').setValue();
+	form.findField('xslt').clearInvalid();
+}
+
+org.ametys.odf.web.ExportInDesign._doExport = function (xslt, args)
+{
+	args += '&amp;xslt=' + xslt;
+	
+    var url = getPluginDirectUrl('odf-web') + '/' + context.parameters.siteName + '/indesign/program.xml?' + args;
     window.open(url);
 }
 
Index: main/plugin-odf-web/sitemap.xmap
===================================================================
--- main/plugin-odf-web/sitemap.xmap	(revision 33335)
+++ main/plugin-odf-web/sitemap.xmap	(working copy)
@@ -34,6 +34,8 @@
 			<map:generator name="eligible-metadata" src="org.ametys.plugins.odfweb.generators.EligibleMetadataForLevelGenerator"/>
 			<map:generator name="indesign-templates" src="org.ametys.plugins.odfweb.generators.GetInDesignTemplatesGenerator"/>
 			
+			<map:generator name="indesign-catalogue" src="org.ametys.plugins.odfweb.generators.IndesignCatalogueGenerator"/>
+			
 			<map:generator name="content-html" src="org.ametys.web.content.HtmlContentGenerator" logger="org.ametys.web.content.HtmlContentGenerator"/>
 		</map:generators>	
 		
@@ -51,6 +53,7 @@
             <map:action name="delete-catalog" src="org.ametys.plugins.odfweb.catalog.actions.CatalogDeleteAction" />
             
             <map:action name="set-filename" src="org.ametys.odf.program.actions.SetFileNameAction"/>
+            <map:action name="set-header" src="org.apache.cocoon.acting.HttpHeaderAction"/>
  		</map:actions>
         
 	</map:components>
@@ -269,26 +272,48 @@
             <!-- +
                  | INDESIGN EXPORT 
                  + -->
+                 
+            <!-- Single program export -->
             <map:match pattern="*/indesign/program.xml">
                 <map:act type="set-filename">
-                    <map:act type="get-site" src="{../1}">
-                        <map:act type="get-content">
-                            <map:parameter name="id" value="{request-param:id}"/>
-                            
-                            <map:aggregate element="view" label="xml">
-                                <map:part src="cocoon://plugins/odf/pdf-content-program"/>
-                            </map:aggregate>
-                            <map:transform type="i18n">
-                                <map:parameter name="locale" value="{request-attr:renderingLanguage}"/>
-                                <map:parameter name="plugin" value="{request-attr:pluginName}"/>
-                            </map:transform>
-                            <map:transform type ="xslt" src="odf-view://stylesheets/indesign/program2indesign.xsl" label="xsl"/>
-                            <map:transform type="i18n">
-                                <map:parameter name="locale" value="{request-attr:renderingLanguage}"/>
-                                <map:parameter name="plugin" value="{request-attr:pluginName}"/>
-                            </map:transform>
-                            <map:serialize type="xml"/>
-                        </map:act>
+                    <map:redirect-to uri="cocoon:/{../1}/_indesign/program.xml"/>
+                 </map:act>
+            </map:match>
+            
+            <!-- Export of a given catalogue -->
+            <map:match pattern="*/indesign/*/catalogue.xml">
+                <map:act type="set-header"> 
+                    <map:parameter name="Content-Disposition" value="attachment"/>
+                    
+                    <map:generate type="indesign-catalogue">
+                        <map:parameter name="siteName" value="{../1}" />
+                        <map:parameter name="xslt" value="{request-param:xslt}" />
+                        <map:parameter name="lang" value="{request-param:lang}" />
+                        <map:parameter name="catalogue" value="{../2}" />
+                    </map:generate>
+                    <map:transform type="xslt" src="context://WEB-INF/stylesheets/indesign/catalogue/{request-param:globalXslt}" label="xsl"/>
+                    <map:serialize type="xml" />
+                </map:act> 
+            </map:match>
+            
+            <map:match pattern="*/_indesign/program.xml">
+                <map:act type="get-site" src="{1}">
+                    <map:act type="get-content">
+                        <map:parameter name="id" value="{request-param:id}"/>
+                        
+                        <map:aggregate element="view" label="xml">
+                            <map:part src="cocoon://plugins/odf/pdf-content-program"/>
+                        </map:aggregate>
+                        <map:transform type="i18n">
+                            <map:parameter name="locale" value="{request-attr:renderingLanguage}"/>
+                            <map:parameter name="plugin" value="{request-attr:pluginName}"/>
+                        </map:transform>
+                        <map:transform type ="xslt" src="context://WEB-INF/stylesheets/indesign/{request-param:xslt}" label="xsl"/>
+                        <map:transform type="i18n">
+                            <map:parameter name="locale" value="{request-attr:renderingLanguage}"/>
+                            <map:parameter name="plugin" value="{request-attr:pluginName}"/>
+                        </map:transform>
+                        <map:serialize type="xml"/>
                     </map:act>
                 </map:act>
             </map:match>
Index: main/plugin-odf-web/src/org/ametys/plugins/odfweb/generators/IndesignCatalogueGenerator.java
===================================================================
--- main/plugin-odf-web/src/org/ametys/plugins/odfweb/generators/IndesignCatalogueGenerator.java	(revision 0)
+++ main/plugin-odf-web/src/org/ametys/plugins/odfweb/generators/IndesignCatalogueGenerator.java	(revision 0)
@@ -0,0 +1,16 @@
+package org.ametys.plugins.odfweb.generators;
+
+import org.ametys.runtime.util.URLEncoder;
+
+/**
+ *  Generate the SAX events corresponding to the transformation of a catalogue to a XML file for InDesign for the current site
+ */
+public class IndesignCatalogueGenerator extends org.ametys.odf.export.indesign.IndesignCatalogueGenerator
+{
+    @Override
+    protected String _getUri(String programId, String xslt)
+    {
+        String siteName = parameters.getParameter("siteName", null);
+        return "cocoon://_plugins/odf-web/" + siteName + "/_indesign/program.xml?id=" + URLEncoder.encode(programId) + "&xslt=" + xslt;
+    }
+}
