Index: main/trunk/model-cols/niupepa/etc/collectionConfig.xml
===================================================================
--- main/trunk/model-cols/niupepa/etc/collectionConfig.xml	(revision 26230)
+++ main/trunk/model-cols/niupepa/etc/collectionConfig.xml	(revision 26231)
@@ -7,4 +7,5 @@
 	</metadataList>
 	<displayItemList>
+		<displayItem assigned="true" lang="en" name="description">A sample of niupepa papers</displayItem>
 		<displayItem assigned="true" lang="en" name="name">NiupepaTest</displayItem>
 		<displayItem assigned="true" lang="en" name="text">text</displayItem>
@@ -17,28 +18,46 @@
 		<displayItem assigned="true" lang="en" name="section">section</displayItem>
 	</displayItemList>
-	<format>  <gsf:template name="choose-title">
-    <gsf:choose-metadata>
-      <gsf:metadata name="Series"/>
-      <gsf:metadata name="exp.Title"/>
-      <gsf:metadata name="ex.dc.Title"/>
-      <gsf:metadata name="Title"/>
-      <gsf:default>Untitled</gsf:default>
-    </gsf:choose-metadata>
-    <gsf:switch>
-      <gsf:metadata name="Volume"/>
-      <gsf:when test="exists">
-        <xsl:text>, Volume: </xsl:text>
-        <gsf:metadata name="Volume"/>
-      </gsf:when>
-    </gsf:switch>
-    <gsf:switch>
-      <gsf:metadata name="Issue"/>
-      <gsf:when test="exists">
-        <xsl:text>, Issue: </xsl:text>
-        <gsf:metadata name="Issue"/>
-      </gsf:when>
-    </gsf:switch>
-  </gsf:template>
-</format>
+	<format>
+			<gsf:template name="choose-icon">
+				<gsf:switch>
+					<gsf:metadata name="DocType"/>
+					<gsf:when test="equals" test-value="Commentary">
+						<gsf:icon file="icomm.gif" select="collection"/>
+					</gsf:when>
+					<gsf:when test="equals" test-value="Description">
+						<gsf:icon file="iabstr.gif" select="collection"/>
+					</gsf:when>
+					<gsf:when test="equals" test-value="Niupepa">
+						<gsf:icon file="np.gif" select="collection"/>
+					</gsf:when>
+					<gsf:otherwise>
+						<gsf:icon type="document"/>
+					</gsf:otherwise>
+				</gsf:switch>
+			</gsf:template>
+			<gsf:template name="choose-title">
+				<gsf:choose-metadata>
+					<gsf:metadata name="Series"/>
+					<gsf:metadata name="exp.Title"/>
+					<gsf:metadata name="ex.dc.Title"/>
+					<gsf:metadata name="Title"/>
+					<gsf:default>Untitled</gsf:default>
+				</gsf:choose-metadata>
+				<gsf:switch>
+					<gsf:metadata name="Volume"/>
+					<gsf:when test="exists">
+						<xsl:text>, Volume:</xsl:text>
+						<gsf:metadata name="Volume"/>
+					</gsf:when>
+				</gsf:switch>
+				<gsf:switch>
+					<gsf:metadata name="Issue"/>
+					<gsf:when test="exists">
+						<xsl:text>, Issue:</xsl:text>
+						<gsf:metadata name="Issue"/>
+					</gsf:when>
+				</gsf:switch>
+			</gsf:template>
+		</format>
 	<search type="mgpp">
 		<level name="document">
@@ -87,15 +106,13 @@
 			<plugin name="ZIPPlugin"/>
 			<plugin name="GreenstoneXMLPlugin"/>
-      <plugin name="CommentaryPlugin"/>
+			<plugin name="CommentaryPlugin"/>
 			<plugin name="NiupepaPlugin">
-	<option name="-enable_cache"/>
-	<option name="-OIDtype" value="filename"/>
+				<option name="-enable_cache"/>
+				<option name="-OIDtype" value="filename"/>
 				<option name="-process_exp" value="\.item$"/>
 				<option name="-create_thumbnail" value="true"/>
 				<option name="-create_screenview" value="true"/>
-	<!--<option name="-block_exp" value="\.issue$"/>-->
 			</plugin>
-      <plugin name="AbstractPlugin">
-      </plugin>
+			<plugin name="AbstractPlugin"/>
 			<plugin name="MetadataXMLPlugin"/>
 			<plugin name="ArchivesInfPlugin"/>
@@ -106,79 +123,110 @@
 		<classifier name="List">
 			<option name="-metadata" value="Series"/>
-			<option name="-sort_leaf_nodes_using" value="ex.Volume|ex.Issue"/>
-			<option name="-bookshelf_type" value="duplicate_only"/>
+			<option name="-sort_leaf_nodes_using" value="ex.Date"/>
+			<option name="-bookshelf_type" value="always"/>
+			<option name="-partition_type_within_level" value="none"/>
+			<format>  <gsf:template match="documentNode">
+    <td valign="top">
+      <gsf:switch>
+        <gsf:metadata name="abstract"/>
+        <gsf:when test="exists"><gsf:link OIDmetadata="abstract" type="document"><gsf:icon file="iabstr.gif" select="collection"/></gsf:link></gsf:when>
+      </gsf:switch>
+    </td>
+    <td valign="top">
+      <gsf:link type="document">
+        <xsl:call-template name="choose-icon"/>
+      </gsf:link>
+    </td>
+    <td valign="top">
+      <gsf:metadata name="Title"/>
+      <xsl:text>      </xsl:text>      <gsf:metadata format="formatDate" name="Date"/>
+    </td>
+  </gsf:template>
+  <gsf:template match="classifierNode[@classifierStyle = 'VList']">
+    <td valign="top">
+      <gsf:link type="classifier">
+        <gsf:icon type="classifier"/>
+      </gsf:link>
+    </td>
+    <td valign="top">
+      <gsf:metadata name="Title"/>
+      <xsl:text>      </xsl:text>      <i>(<gsf:metadata name="numleafdocs"/> issues)</i>
+    </td>
+  </gsf:template>
+
+</format>
 		</classifier>
 		<classifier name="DateList">
 			<option name="-metadata" value="Date"/>
+			<option name="-nogroup"/>
 		</classifier>
-    <classifier name="List">
-      <option name="-metadata" value="Title"/>
-</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">
-<!--
- Defined in the global format statement 
--->
-        <xsl:call-template name="choose-title"/>
-      </gsf:link>
-    </td>
-  </gsf:template>
-  <gsf:template match="classifierNode[@classifierStyle = 'VList']">
-    <td valign="top">
-      <gsf:link type="classifier">
-        <gsf:icon type="classifier"/>
-      </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">
-<!--
- Defined in the global format statement 
--->
-      <xsl:call-template name="choose-title"/>
-      <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 = '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">
+<!--
+Defined in the global format statement
+-->
+						<xsl:call-template name="choose-title"/>
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</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">
+<!--
+Defined in the global format statement
+-->
+					<xsl:call-template name="choose-title"/>
+					<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 = 'HList']">
+				<gsf:link type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
 	</browse>
 	<display>
-		<format>  <gsf:option name="TOC" value="true"/>
-<xsl:template name="additionalHeaderContent">
-	<!-- this javascript is needed to get the #Biblio etc links in the commentaries to work -->
-	<script type="text/javascript">
-	  <xsl:text disable-output-escaping="yes">
-      $(window).load(function()
+		<format>
+			<gsf:option name="TOC" value="true"/>
+			<xsl:template name="additionalHeaderContent">
+<!--
+this javascript is needed to get the #Biblio etc links in the commentaries to work
+-->
+				<script type="text/javascript">
+					<xsl:text disable-output-escaping="yes">$(window).load(function()
 {
     var links = $("a");
@@ -190,77 +238,68 @@
         }
     }
-}); 
-	    </xsl:text>
-	</script>
-      </xsl:template>
-<!--
- Overwriting this template allows you to change the heading of the document. 
--->
-<!--
-
+});</xsl:text>
+				</script>
+			</xsl:template>
+<!--
+Overwriting this template allows you to change the heading of the document.
+-->
+<!--
 <gsf:template name="documentHeading">
 <span style="font-weight:bold; font-size: 120%;">
 <xsl:call-template name="choose-title"/>
 </span>
-</gsf:template> 
--->
-<!--
- 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>
+-->
+<!--
+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:call-template name="wrappedSectionImage"/>
 <xsl:call-template name="wrappedSectionText"/>
-</gsf:template> 
--->
-<!--
- Overwriting this template can be used to change the content of section headings. 
--->
-	<gsf:template name="sectionHeading">
-		<xsl:call-template name="choose-title"/>
-	</gsf:template>
-	<gsf:template name="pageTitle">
-		<xsl:for-each select="/page/pageResponse/document/documentNode">
-			<xsl:call-template name="choose-title"/>
-		</xsl:for-each>
-	</gsf:template>
-<!--
- Overwriting this template can be used to change the content of the top-level section. 
--->
-<!--
-
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of section headings.
+-->
+			<gsf:template name="sectionHeading">
+				<xsl:call-template name="choose-title"/>
+			</gsf:template>
+			<gsf:template name="pageTitle">
+				<xsl:for-each select="/page/pageResponse/document/documentNode">
+					<xsl:call-template name="choose-title"/>
+				</xsl:for-each>
+			</gsf:template>
+<!--
+Overwriting this template can be used to change the content of the top-level section.
+-->
+<!--
 <gsf:template name="topLevelSectionContent">
 <xsl:call-template name="wrappedSectionImage"/>
 <xsl:call-template name="wrappedSectionText"/>
-</gsf:template> 
--->
-<!--
- Overwriting this template can be used to change the content of sections. 
--->
-<!--
-
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of sections.
+-->
+<!--
 <gsf:template name="sectionContent">
 <xsl:call-template name="wrappedSectionImage"/>
 <xsl:call-template name="wrappedSectionText"/>
-</gsf:template> 
--->
-
-</format>
+</gsf:template>
+-->
+		</format>
 	</display>
 	<replaceListRef id="gs2-standard"/>
 	<replaceListRef id="gs2-image"/>
-  <replaceList>
-    <replace macro="_vol_" scope="metadata" key="vol" bundle="niupepa" resolve="false"/>
-    <replace macro="_num_" scope="metadata" key="num" bundle="niupepa" resolve="false"/>
-    <replace macro="_commentary_" scope="metadata" key="commentary" bundle="niupepa" resolve="false"/>
-    <replace macro="_textbiblio_" scope="text" key="textbiblio" bundle="niupepa" resolve="false"/>
-    <replace macro="_textbackground_" scope="text" key="textbackground" bundle="niupepa" resolve="false"/>
-    <replace macro="_textsubmat_" scope="text" key="textsubmat" bundle="niupepa" resolve="false"/>
-    <replace macro="_textavail_" scope="text" key="textavail" bundle="niupepa" resolve="false"/>
-    
-
-
-  </replaceList>
+	<replaceList>
+		<replace bundle="niupepa" key="vol" macro="_vol_" resolve="false" scope="metadata"/>
+		<replace bundle="niupepa" key="num" macro="_num_" resolve="false" scope="metadata"/>
+		<replace bundle="niupepa" key="commentary" macro="_commentary_" resolve="false" scope="metadata"/>
+		<replace bundle="niupepa" key="textbiblio" macro="_textbiblio_" resolve="false" scope="text"/>
+		<replace bundle="niupepa" key="textbackground" macro="_textbackground_" resolve="false" scope="text"/>
+		<replace bundle="niupepa" key="textsubmat" macro="_textsubmat_" resolve="false" scope="text"/>
+		<replace bundle="niupepa" key="textavail" macro="_textavail_" resolve="false" scope="text"/>
+	</replaceList>
 	<serviceRackList><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
 		<serviceRack name="OAIPMH">
