Index: /main/trunk/model-sites-dev/whakatohea/collect/waiata/etc/collectionConfig.xml
===================================================================
--- /main/trunk/model-sites-dev/whakatohea/collect/waiata/etc/collectionConfig.xml	(revision 33856)
+++ /main/trunk/model-sites-dev/whakatohea/collect/waiata/etc/collectionConfig.xml	(revision 33857)
@@ -7,9 +7,21 @@
 	</metadataList>
 	<displayItemList>
-		<displayItem assigned="true" lang="en" name="description">A Collection of Waiata.
+	  	   <!--
+	     &lt;a href=&quot;{$library_name}?a=de&amp;c={/page/pageResponse/collection/@name}&quot;&gt;here&lt;/a&gt;
+-->
+
+	  <displayItem assigned="true" lang="en" name="description">
+	    &lt;p&gt;A Collection of Waiata.
 Songs (waiata) are sung solo, in unison or at the octave. 
 Types of song include lullabies (oriori), love songs (waitata aroha) and laments (waiata tangi). 
 Traditionally all formal speeches are followed by a waiata sung by the speaker and their group of supporters. 
-Some of the smaller wind instruments are also sung into, and the sound of the poi (raupo ball swung on the end of a flax cord) provides a rhythmic accompaniment to waiata poi.</displayItem>
+Some of the smaller wind instruments are also sung into, and the sound of the poi (raupo ball swung on the end of a flax cord) provides a rhythmic accompaniment to waiata poi.
+           &lt;/p&gt;
+	   &lt;p&gt;
+	   To deposit a new file/document into this digital library collection click
+	     &lt;a href=&quot;library?a=de&amp;c=waiata&quot;&gt;here&lt;/a&gt;
+	     
+	   &lt;/p&gt;
+		</displayItem>
 		<displayItem assigned="true" lang="en" name="name">Waiata Collection</displayItem>
 		<displayItem assigned="true" lang="en" name="text">text</displayItem>
@@ -24,4 +36,10 @@
 		<displayItem assigned="true" lang="en" name="shortDescription">demow</displayItem>
 		<displayItem assigned="true" lang="en" name=".dc.Format">_labelFormat_</displayItem>
+		<displayItem assigned="true" lang="en" name=".audio,documents">audio,documents</displayItem>
+		<displayItem assigned="true" lang="en" name=".audio">audio</displayItem>
+		<displayItem assigned="true" lang="en" name=".documents">documents</displayItem>
+		<displayItem assigned="true" lang="en" name="audio,documents">all content</displayItem>
+		<displayItem assigned="true" lang="en" name="audio">audio</displayItem>
+		<displayItem assigned="true" lang="en" name="documents">documents</displayItem>
 	</displayItemList>
 	<format>
@@ -57,4 +75,15 @@
 			<displayItem lang="en" name="name">natural (build) order</displayItem>
 		</sort>
+		<indexSubcollection name="audio,documents">
+			<displayItem lang="en" name="name">all content</displayItem>
+		</indexSubcollection>
+		<indexSubcollection name="audio">
+			<displayItem lang="en" name="name">audio</displayItem>
+		</indexSubcollection>
+		<indexSubcollection name="documents">
+			<displayItem lang="en" name="name">documents</displayItem>
+		</indexSubcollection>
+		<subcollection filter="Filename/mp3/" name="audio"/>
+		<subcollection filter="!Filename/mp3/" name="documents"/>
 		<searchType name="plain"/>
 		<searchType name="simpleform"/>
@@ -111,71 +140,71 @@
 			<option name="-bookshelf_type" value="always"/>
 			<option name="-sort_leaf_nodes_using" value="ex.Title"/>
-			<format>  <gsf:template match="documentNode">
-    <td valign="top">
-      <gsf:switch>
-        <gsf:metadata name="dc.Format"/>
-        <gsf:when test="equals" test-value="Audio">
-          <gsf:link type="document">
-            <gsf:icon file="mp3.png" select="collection"/>
-          </gsf:link>
-        </gsf:when>
-        <gsf:when test="equals" test-value="Lyrics">
-          <gsf:link type="document">
-            <gsf:icon file="lyrics.gif" select="collection"/>
-          </gsf:link>
-        </gsf:when>
-        <gsf:when test="equals" test-value="Song sheet">
-          <gsf:link type="document">
-            <gsf:icon file="tab.gif" select="collection"/>
-          </gsf:link>
-        </gsf:when>
-        <gsf:otherwise>
-          <gsf:link type="document">
-            <gsf:icon type="document"/>
-          </gsf:link>
-        </gsf:otherwise>
-      </gsf:switch>
-    </td>
-    <td valign="top">
-      <gsf:link type="source">
-        <gsf:choose-metadata>
-          <gsf:metadata name="thumbicon"/>
-          <gsf:metadata name="srcicon"/>
-        </gsf:choose-metadata>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="document">
-        <xsl:call-template name="choose-title"/>
-      </gsf:link>
-      <gsf:switch>
-        <gsf:metadata name="Source"/>
-        <gsf:when test="exists">
-          <br/>
-          <i>(<gsf:metadata name="dc.Format"/>/<gsf:metadata name="FileFormat"/>)</i>
-        </gsf:when>
-      </gsf:switch>
-    </td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'VList']">
-    <td valign="top">
-      <gsf:link style="static" type="classifier">
-        <gsf:icon type="classifier"/>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="classifier">
-        <gsf:metadata name="Title"/>
-      </gsf:link>
-    </td>
-    <td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'HList']">
-    <gsf:link type="classifier">
-      <gsf:metadata name="Title"/>
-    </gsf:link>
-  </gsf:template>
-
-</format>
+			<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:switch>
+						<gsf:metadata name="dc.Format"/>
+						<gsf:when test="equals" test-value="Audio">
+							<gsf:link type="document">
+								<gsf:icon file="mp3.png" select="collection"/>
+							</gsf:link>
+						</gsf:when>
+						<gsf:when test="equals" test-value="Lyrics">
+							<gsf:link type="document">
+								<gsf:icon file="lyrics.gif" select="collection"/>
+							</gsf:link>
+						</gsf:when>
+						<gsf:when test="equals" test-value="Song sheet">
+							<gsf:link type="document">
+								<gsf:icon file="tab.gif" select="collection"/>
+							</gsf:link>
+						</gsf:when>
+						<gsf:otherwise>
+							<gsf:link type="document">
+								<gsf:icon type="document"/>
+							</gsf:link>
+						</gsf:otherwise>
+					</gsf:switch>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<xsl:call-template name="choose-title"/>
+					</gsf:link>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="dc.Format"/>/<gsf:metadata name="FileFormat"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link style="static" type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
 		</classifier>
 		<classifier name="List">
@@ -186,71 +215,71 @@
 			<option name="-buttonname" value="Browse"/>
 			<option name="-filter_metadata" value="dc.Title"/>
-			<format>  <gsf:template match="documentNode">
-    <td valign="top">
-      <gsf:switch>
-        <gsf:metadata name="dc.Format"/>
-        <gsf:when test="equals" test-value="Audio">
-          <gsf:link type="document">
-            <gsf:icon file="mp3.png" select="collection"/>
-          </gsf:link>
-        </gsf:when>
-        <gsf:when test="equals" test-value="Lyrics">
-          <gsf:link type="document">
-            <gsf:icon file="lyrics.gif" select="collection"/>
-          </gsf:link>
-        </gsf:when>
-        <gsf:when test="equals" test-value="Song sheet">
-          <gsf:link type="document">
-            <gsf:icon file="tab.gif" select="collection"/>
-          </gsf:link>
-        </gsf:when>
-        <gsf:otherwise>
-          <gsf:link type="document">
-            <gsf:icon type="document"/>
-          </gsf:link>
-        </gsf:otherwise>
-      </gsf:switch>
-    </td>
-    <td valign="top">
-      <gsf:link type="source">
-        <gsf:choose-metadata>
-          <gsf:metadata name="thumbicon"/>
-          <gsf:metadata name="srcicon"/>
-        </gsf:choose-metadata>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="document">
-        <xsl:call-template name="choose-title"/>
-      </gsf:link>
-      <gsf:switch>
-        <gsf:metadata name="Source"/>
-        <gsf:when test="exists">
-          <br/>
-          <i>(<gsf:metadata name="dc.Format"/>/<gsf:metadata name="FileFormat"/>)</i>
-        </gsf:when>
-      </gsf:switch>
-    </td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'VList']">
-    <td valign="top">
-      <gsf:link style="static" type="classifier">
-        <gsf:icon type="classifier"/>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="classifier">
-        <gsf:metadata name="Title"/>
-      </gsf:link>
-    </td>
-    <td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'HList']">
-    <gsf:link type="classifier">
-      <gsf:metadata name="Title"/>
-    </gsf:link>
-  </gsf:template>
-
-</format>
+			<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:switch>
+						<gsf:metadata name="dc.Format"/>
+						<gsf:when test="equals" test-value="Audio">
+							<gsf:link type="document">
+								<gsf:icon file="mp3.png" select="collection"/>
+							</gsf:link>
+						</gsf:when>
+						<gsf:when test="equals" test-value="Lyrics">
+							<gsf:link type="document">
+								<gsf:icon file="lyrics.gif" select="collection"/>
+							</gsf:link>
+						</gsf:when>
+						<gsf:when test="equals" test-value="Song sheet">
+							<gsf:link type="document">
+								<gsf:icon file="tab.gif" select="collection"/>
+							</gsf:link>
+						</gsf:when>
+						<gsf:otherwise>
+							<gsf:link type="document">
+								<gsf:icon type="document"/>
+							</gsf:link>
+						</gsf:otherwise>
+					</gsf:switch>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<xsl:call-template name="choose-title"/>
+					</gsf:link>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="dc.Format"/>/<gsf:metadata name="FileFormat"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link style="static" type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
 		</classifier>
 		<classifier name="Hierarchy">
@@ -258,53 +287,98 @@
 			<option name="-sort" value="dc.Title"/>
 			<option name="-buttonname" value="Genre"/>
-			<format><gsf:template match="documentNode"><td valign="top"><gsf:link type="document"><gsf:icon type="document"/></gsf:link></td><td valign="top"><gsf:link type="source"><gsf:choose-metadata><gsf:metadata name="thumbicon"/><gsf:metadata name="srcicon"/></gsf:choose-metadata></gsf:link></td><td valign="top"><gsf:link type="document"><xsl:call-template name="choose-title"/></gsf:link><gsf:switch><gsf:metadata name="Source"/><gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when></gsf:switch></td></gsf:template><gsf:template match="classifierNode[@classifierStyle = 'VList']"><td valign="top"><gsf:link type="classifier" style="static"><gsf:icon type="classifier"/></gsf:link></td><td valign="top"><gsf:link type="classifier"><gsf:metadata name="Title"/></gsf:link></td></gsf:template><gsf:template match="classifierNode[@classifierStyle = 'HList']"><gsf:link type="classifier"><gsf:metadata name="Title"/></gsf:link></gsf:template></format>
+			<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<xsl:call-template name="choose-title"/>
+					</gsf:link>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="Source"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link style="static" type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
 		</classifier>
-		<format>  <gsf:template match="documentNode">
-    <td valign="top">
-      <gsf:link type="document">
-        <gsf:icon type="document"/>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="source">
-        <gsf:choose-metadata>
-          <gsf:metadata name="thumbicon"/>
-          <gsf:metadata name="srcicon"/>
-        </gsf:choose-metadata>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="document">
-        <xsl:call-template name="choose-title"/>
-      </gsf:link>
-      <gsf:switch>
-        <gsf:metadata name="Source"/>
-        <gsf:when test="exists">
-          <br/>
-          <i>(<gsf:metadata name="Source"/>)</i>
-        </gsf:when>
-      </gsf:switch>
-    </td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'VList']">
-    <td valign="top">
-      <gsf:link style="static" type="classifier">
-        <gsf:icon type="classifier"/>
-      </gsf:link>
-    </td>
-    <td valign="top">
-      <gsf:link type="classifier">
-        <gsf:metadata name="Title"/>
-      </gsf:link>
-    </td>
-    <td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'HList']">
-    <gsf:link type="classifier">
-      <gsf:metadata name="Title"/>
-    </gsf:link>
-  </gsf:template>
-
-</format>
+		<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<xsl:call-template name="choose-title"/>
+					</gsf:link>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="Source"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link style="static" type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
 	</browse>
 	<display>
@@ -328,64 +402,46 @@
 Overwriting this template can be used to redefine the content of the whole document. This is useful for simple documents, but not recommended for more complex documents (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
 -->
-
-<gsf:template name="documentContent">
-  <xsl:variable name="httpCollection">library/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:variable>
-  <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
-
-  <div id="gs-document">
-    <xsl:call-template name="documentPre"/>
-    <xsl:call-template name="wrappedSectionImage"/>
-    <div id="gs-document-text">
-      <xsl:call-template name="documentNodeText"/>
-    </div>
-
-
-        <div id="demo">
-            <div id="waveform">
-                <!-- Here be the waveform -->
-                <xsl:text> </xsl:text>
-            </div>
-            <div id="wave-timeline"><xsl:text> </xsl:text></div>
-
-            <div>
-              <div class="controls">
-                <button class="btn btn-primary" data-action="play">
-                  <i class="glyphicon glyphicon-play"></i>
-                  Play /
-                  <i class="glyphicon glyphicon-pause"></i>
-                  Pause
-                </button>
-              </div>
-            </div>
-        </div>
-                                           
-        <gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/<gsf:metadata name="SourceFile"/></gsf:variable>
-
-	<link href="ext/wavesurfer/css/style.css" rel="stylesheet" />
-	<link href="ext/wavesurfer/css/ribbon.css" rel="stylesheet" />
-        <script src="ext/wavesurfer/wavesurfer-3.3.0.js">
-          <xsl:text>  </xsl:text>
-        </script>
-        <script src="ext/wavesurfer/plugin/wavesurfer.cursor.js">
-          <xsl:text>  </xsl:text>
-        </script>
-        <script src="ext/wavesurfer/plugin/wavesurfer.timeline.js">
-          <xsl:text>  </xsl:text>
-        </script>
-
-        <script src="ext/wavesurfer/wavesurfer-player.js">
-          <xsl:text>  </xsl:text>
-        </script>
-        <gsf:script>
-          document.addEventListener('DOMContentLoaded', function() {
+			<gsf:template name="documentContent">
+				<xsl:variable name="httpCollection">library/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:variable>
+				<xsl:variable name="assocFilePath">
+					<gsf:metadata name="assocfilepath" select="root"/>
+				</xsl:variable>
+				<div id="gs-document">
+					<xsl:call-template name="documentPre"/>
+					<xsl:call-template name="wrappedSectionImage"/>
+					<div id="gs-document-text">
+						<xsl:call-template name="documentNodeText"/>
+					</div>
+					<div id="demo">
+						<div id="waveform">
+<!--
+Here be the waveform
+-->
+							<xsl:text>							</xsl:text>						</div>
+						<div id="wave-timeline">
+							<xsl:text>							</xsl:text>						</div>
+						<div>
+							<div class="controls">
+								<button class="btn btn-primary" data-action="play"><i class="glyphicon glyphicon-play"/>Play /<i class="glyphicon glyphicon-pause"/>Pause</button>
+							</div>
+						</div>
+					</div>
+					<gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/<gsf:metadata name="SourceFile"/></gsf:variable>
+					<link href="ext/wavesurfer/css/style.css" rel="stylesheet"/>
+					<link href="ext/wavesurfer/css/ribbon.css" rel="stylesheet"/>
+					<script src="ext/wavesurfer/wavesurfer-3.3.0.js">
+						<xsl:text>						</xsl:text>					</script>
+					<script src="ext/wavesurfer/plugin/wavesurfer.cursor.js">
+						<xsl:text>						</xsl:text>					</script>
+					<script src="ext/wavesurfer/plugin/wavesurfer.timeline.js">
+						<xsl:text>						</xsl:text>					</script>
+					<script src="ext/wavesurfer/wavesurfer-player.js">
+						<xsl:text>						</xsl:text>					</script>
+					<gsf:script>document.addEventListener('DOMContentLoaded', function() {
             // Load audio from URL
             wavesurfer.load(gs.variables.mp3url);
-          });
-        </gsf:script>
-
-
-  </div>
-</gsf:template>
-
+          });</gsf:script>
+				</div>
+			</gsf:template>
 <!--
 Overwriting this template can be used to change the content of section headings.
