Index: documentation/trunk/tutorials/xml-source/tutorial_en.xml
===================================================================
--- documentation/trunk/tutorials/xml-source/tutorial_en.xml	(revision 27123)
+++ documentation/trunk/tutorials/xml-source/tutorial_en.xml	(revision 27250)
@@ -4710,3 +4710,213 @@
 </Tutorial>
 </MajorVersion>
+<MajorVersion number="3">
+<Tutorial id="using_themes">
+<Title>
+<Text id="themes-1">Customization: Themes</Text>
+</Title>
+<SampleFiles folder="custom"/>
+<Version initial="3.05" current="3.05"/>
+<Content>
+<Comment>
+<Text id="themes-2">This exercise looks at changing the appearance of your entire Greenstone Library using Themes created with jQuery ThemeRoller. First, we will look at how to use premade themes. Then, we will make a custom theme using ThemeRoller.</Text>
+</Comment>
+<Heading>
+<Text id="themes-0">Using Greenstone Visual Themes</Text>
+</Heading>
+<NumberedItem>
+<Text id="themes-3">Enter your Greenstone Library. ( Go to <Path>Start &rarr; All Programs &rarr; Greenstone-3.05 &rarr; Greenstone3 Server</Path> and click <AutoText text="Enter Library"/>.)</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-4">In order to make changes to the library's theme, you must be logged in as an administrator. Click <AutoText key="gs3::interface_default::login_b"/> in the top right-hand corner. The default login is:</Text>
+<Format>
+<AutoText key="gs3::interface_default::authen.username"/>: admin<br/>
+<AutoText key="gs3::interface_default::authen.password"/>: admin
+</Format>
+<Text id="themes-5">Click <AutoText key="gs3::interface_default::login_b"/>. It is advisable to change the default password, if you haven't already. To do this, click the <AutoText text="admin"/> button in the top right-hand corner, and select <AutoText key="gs3::interface_default::authen.account_settings"/>. Click <AutoText key="gs3::interface_default::authen.change_password"/>. Enter the <AutoText key="gs3::interface_default::authen.old_password"/> (admin); then enter a new password in the <AutoText key="gs3::interface_default::authen.new_password"/> and  <AutoText key="gs3::interface_default::authen.retype_password"/> text boxes. Click <AutoText key="gs3::interface_default::authen.submit"/>. The password will be changed, and you will be taken to the <AutoText key="gs3::interface_default::authen.authentication"/>, where you can view a list of the current users.</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-6">Go to <AutoText key="gs3::interface_default::pref_b"/>. Now that we are signed in as an administrator, we can see the <AutoText key="gs3::interface_default::pref.theme"/> option, where we can quickly change the theme of our collections. These themes were created using JQuery UIâs ThemeRoller (<Link>http://jqueryui.com/themeroller/</Link>).  The first four options (Greenstone Default and Greenstone Custom 1, 2 and 3) are included as part of the Greenstone 3 installation. The remaining themes are retrieved from the web via the jQuery UI API.</Text>
+<Text id="themes-7">Select <AutoText text="Theme: Greenstone Custom 2"/> from the drop-down menu, and click <AutoText key="gs3::interface_default::pref.set_prefs"/>. Now, all of the collections in your Greenstone library should have the Greenstone Custom 2 theme.</Text>
+<Text id="themes-8">Return to the library homepage (click <AutoText text="My Greenstone Library" type="italics"/> in the upper left-hand corner) and explore several of your collections. They should all display the new theme.</Text>
+</NumberedItem>
+<Heading>
+<Text id="themes-10">Creating a custom theme using ThemeRoller (advanced)</Text>
+</Heading>
+<NumberedItem>
+<Text id="themes-11">Go to the jQuery UI ThemeRoller webpage (<Link>http://jqueryui.com/themeroller/</Link>). The <AutoText text="Roll Your Own"/> menu of the <AutoText text="ThemeRoller"/> bar on the left can be used to design a custom theme. As changes are made in this menu, the corresponding items on the right reflect these changes. The most important sections for Greenstone customization are:</Text>
+<Format>
+<table>
+<tr style="font-weight:bold"><td>Section</td><td>HTML class</td><td>Greenstone 3 usage</td></tr>
+<tr><td>Header/Toolbar</td><td>ui-widget-header</td><td>This sets the appearance of the large, main banner and the footer</td></tr>
+<tr><td>Content</td><td>ui-widget-content</td><td>Sets the appearance for the main area of the page, where the content (e.g. a list of documents) is displayed</td></tr>
+<tr><td>Clickable: default state</td><td>ui-state-default</td><td>Sets the appearance for the small bar along the top, most buttons (Login, Help, Preferences, Test Search, Form Search, Advanced Search), and all unselected browse tabs</td></tr>
+<tr><td>Clickable: hover state</td><td>ui-state-hover</td><td>This sets the appearance for the Login, Help, and Preferences buttons and browse tabs when the mouse hovers over them</td></tr>
+<tr><td>Clickable: active state</td><td>ui-state-active</td><td>This sets the appearance of the selected browse tab</td></tr>
+</table>
+</Format>
+<Comment>
+<Text id="themes-12">ThemeRoller will not affect some aspects of you Greenstone library's appearance, e.g. the actual design layout, the background color, the font, the search button.</Text>
+</Comment>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-13">Change the Theme to the following values:</Text>
+<Format>
+<table style="text-align:center;border-collapse:collapse" border="1">
+<tr><td rowspan="6" width="180">Header/Toolbar</td><td width="120">Background color</td><td width="80">#a23336</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>50%</td></tr>
+<tr><td>Border</td><td>#000000</td></tr>
+<tr><td>Text</td><td>#000000</td></tr>
+<tr><td>Icon</td><td>#000000</td></tr>
+<tr><td rowspan="6">Content</td><td>Background color</td><td>#000000</td></tr>
+<tr><td rowspan="2">Texture</td><td>inset-soft</td></tr>
+<tr><td>25%</td></tr>
+<tr><td>Border</td><td>#000000</td></tr>
+<tr><td>Text</td><td>#c2bcbc</td></tr>
+<tr><td>Icon</td><td>#c2bcbc</td></tr>
+<tr><td rowspan="6">Clickable: default state</td><td>Background color</td><td>#7e7676</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>55%</td></tr>
+<tr><td>Border</td><td>#000000</td></tr>
+<tr><td>Text</td><td>#ffffff</td></tr>
+<tr><td>Icon</td><td>#ffffff</td></tr>
+<tr><td rowspan="6">Clickable: hover state</td><td>Background Color</td><td>#303030</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>75%</td></tr>
+<tr><td>Border</td><td>#000000</td></tr>
+<tr><td>Text</td><td>#ffffff</td></tr>
+<tr><td>Icon</td><td>#ffffff</td></tr>
+<tr><td rowspan="6">Clickable: active state</td><td>Background Color</td><td>#000000</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>65%</td></tr>
+<tr><td>Border</td><td>#000000</td></tr>
+<tr><td>Text</td><td>#ffffff</td></tr>
+<tr><td>Icon</td><td>#ffffff</td></tr>
+</table>
+</Format>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-14">Click the <AutoText text="Download theme"/> button. Ensure the Stable version if jQuery is selected. Under <AutoText text="Components"/> uncheck <AutoText text="Toggle All" type="italics"/>, which will uncheck all of the boxes. Under <AutoText text="UI Core"/> check <AutoText text="Core" type="italics"/>, and under <AutoText text="Widgets"/> check <AutoText text="Datepicker" type="italics"/>. At the bottom of the page, under <AutoText text="Theme"/>, <AutoText text="Custom Theme" type="italics"/> should be selected. For <AutoText text="Theme Folder Name:"/>, enter <AutoText text="TutorialTheme" type="italics"/>. Leave <AutoText text="CSS Scope"/> blank. Click <AutoText text="Download"/>. In the pop-up window, select <AutoText text="Save File"/> and click <AutoText text="OK"/> to download the zip file.</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-15">Go to the folder where the zip file was downloaded, and unzip the folder (on Windows, right-click, select <AutoText text="Extract All..."/> and click <AutoText text="Extract"/>).</Text>
+<Text id="themes-16">The extracted folder should be named <AutoText text="jquery-ui-1.10.2.custom" type="italics"/>, or something similar, and should contain three folders (css, development-bundle, js) and an html file (index.html). In the <AutoText text="css"/> folder, there is a folder called <AutoText text="TutorialTheme"/>. Copy this entire folder into <Path>Greenstone3 &rarr; web &rarr; interfaces &rarr; default &rarr;  style &rarr; themes</Path>.</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-17">Go to <Path>Greenstone3 &rarr; web &rarr; interfaces &rarr;  default &rarr;  transform &rarr;  pages</Path> and open <AutoText text="pref.xsl"/> in a text editor. Find the following section and add in the highlighted text, which can be copied from <AutoText text="gs3-theme.tweak.txt" type="italics"/>). Take note of the initial comma. </Text>
+<Format>
+&lt;xsl:text disable-output-escaping=&quot;yes&quot;&gt;<br/>
+	<Tab n="1"/>$(document).ready(function(){<br/>
+		<Tab n="2"/>$(&quot;#switcher&quot;).themeswitcher({<br/>
+			<Tab n="3"/>imgpath: &quot;interfaces/&quot; + gs.xsltParams.interface_name + &quot;/style/images/&quot;,<br/>
+			<Tab n="3"/>additionalThemes: [<br/>
+				<Tab n="4"/>icon:&quot;theme_90_greenstone.png&quot;, url:&quot;interfaces/&quot; + gs.xsltParams.interface_name + &quot;/style/themes/main/jquery-ui-1.8.16.custom.css&quot;},<br/>
+				<Tab n="4"/>{title:&quot;Greenstone Custom 1&quot;, name:&quot;custom-theme1&quot;, icon:&quot;theme_90_start_menu.png&quot;, url:&quot;interfaces/&quot; + gs.xsltParams.interface_name + &quot;/style/themes/alt_theme_1/jquery-ui-1.8.16.custom.css&quot;},<br/>
+				<Tab n="4"/>{title:&quot;Greenstone Custom 2&quot;, name:&quot;custom-theme2&quot;, icon:&quot;theme_90_mint_choco.png&quot;, url:&quot;interfaces/&quot; + gs.xsltParams.interface_name + &quot;/style/themes/alt_theme_2/jquery-ui-1.8.16.custom.css&quot;},<br/>
+				<Tab n="4"/>{title:&quot;Greenstone Custom 3&quot;, name:&quot;custom-theme3&quot;, icon:&quot;theme_90_trontastic.png&quot;, url:&quot;interfaces/&quot; + gs.xsltParams.interface_name + &quot;<br/>/style/themes/alt_theme_3/jquery-ui-1.8.16.custom.css&quot;}<highlight>,     <br/>
+				<Tab n="4"/>{title:&quot;Tutorial Theme&quot;, name:&quot;TutorialTheme&quot;, icon:&quot;TutorialTheme.png&quot;, url:&quot;interfaces/&quot; + gs.xsltParams.interface_name + &quot;/style/themes/TutorialTheme/jquery-ui-1.10.2.custom.css&quot;}</highlight><br/>
+			<Tab n="3"/>]<br/>
+		<Tab n="2"/>});<br/>
+	<Tab n="1"/>});<br/>
+&lt;/xsl:text&gt;<br/>
+</Format>
+<Text id="themes-17a">Save and close <AutoText text="pref.xsl"/>.</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-18">Return to the Library homepage. If not still logged in, login again. Go to the <AutoText key="gs3::interface_default::pref_b"/> page and click on the drop-down menu for <AutoText key="gs3::interface_default::pref.theme"/>. (If the <AutoText key="gs3::interface_default::pref.theme"/> option has disappeared, ensure that you copied the highlighted section in its entirety into the correct place in <AutoText text="pref.xsl"/>, especially that you did not miss the initial comma.) The fifth item in the list should now be "Tutorial Theme". (It will not have a calendar icon like the other themes, because the image referenced in the above statement - TutorialTheme.png - does not exist. To create an icon to match the theme, see below.) Select Tutorial Theme, and click <AutoText key="gs3::interface_default::pref.set_prefs"/>. All of your Greenstone collections will be in this new, custom theme.</Text>
+</NumberedItem>
+<Comment>
+<Text id="themes-20">The <AutoText key="gs3::interface_default::pref.theme"/> drop-down menu in <AutoText key="gs3::interface_default::pref_b"/> includes an image for each theme, along with the theme title. If no image is available, only the title is displayed. If you would like to include an image for your custom theme similar to those visible for the other theme options, follow the instructions below. </Text>
+</Comment>
+<NumberedItem>
+<Text id="themes-21">Return to the folder extracted from the zip file downloaded from jQuery (<AutoText text="jquery-ui-1.10.2.custom"/> or something similar). Open <AutoText text="index.html" type="italics"/> in a web browser. Scroll down so that the Datepicker calendar is completely visible on your screen, and take a screen shot. (On Windows, this is done by pressing the print screen - <AutoText text="PrtScn"/> - button.) </Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-22">Open a picture editor (like Paint) and Paste. Select and crop the image around the calendar under Datepicker. Resize the image to 90px by 80 px. (In Paint, click Resize. Under Resize, choose Pixels. Unselect Maintain aspect ratio. Still under Resize - <em>not</em> the Skew section - change Horizontal to 90 and Vertical to 80 and click &lt;OK&gt;.) Save the image in <Path>Greenstone3 &rarr; web &rarr; interfaces &rarr; default &rarr; style &rarr; images </Path> as TutorialTheme.png.</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="themes-23">Return to the <AutoText key="gs3::interface_default::pref_b"/> page, and the Tutorial Theme in the <AutoText key="gs3::interface_default::pref.theme"/> drop-down menu will now have a corresonding calendar icon.</Text>
+</NumberedItem>
+</Content></Tutorial>
+<Tutorial id="collection_themes">
+<Title>
+<Text id="customize-00">Collection-Specific Themes</Text>
+</Title>
+<SampleFiles folder="custom"/>
+<Prerequisite id="using_themes"/>
+<Version initial="3.05" current="3.05"/>
+<Content>
+<Comment>
+<Text id="customize-01">The <AutoText key="gs3::interface_default::pref.theme"/> menu on the <AutoText key="gs3::interface_default::pref_b"/> page sets the theme for the entire Greenstone library. This tutorial explains how to use themes on a collection level, by changing the theme of the <AutoText text="backdrop"/> collection.</Text>
+</Comment>
+<Heading>
+<Text id="customize-02">Creating a custom theme</Text>
+</Heading>
+<NumberedItem>
+<Text id="customize-03">Go to the jQuery UI ThemeRoller webpage (<Link>http://jqueryui.com/themeroller/</Link>). Change the Theme to the following values:</Text>
+<Format>
+<table style="text-align:center;border-collapse:collapse" border="1">
+<tr><td rowspan="6" width="180">Header/Toolbar</td><td width="120">Background color</td><td width="80">#141a38</td></tr>
+<tr><td rowspan="2">Texture</td><td>highlight_soft</td></tr>
+<tr><td>45%</td></tr>
+<tr><td>Border</td><td>#ffffff</td></tr>
+<tr><td>Text</td><td>#ffffff</td></tr>
+<tr><td>Icon</td><td>#ffffff</td></tr>
+<tr><td rowspan="6">Content</td><td>Background color</td><td>#ffffff</td></tr>
+<tr><td rowspan="2">Texture</td><td>flat</td></tr>
+<tr><td>75%</td></tr>
+<tr><td>Border</td><td>#ffffff</td></tr>
+<tr><td>Text</td><td>#222222</td></tr>
+<tr><td>Icon</td><td>#222222</td></tr>
+<tr><td rowspan="6">Clickable: default state</td><td>Background color</td><td>#e9c416</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>55%</td></tr>
+<tr><td>Border</td><td>#ffffff</td></tr>
+<tr><td>Text</td><td>#555555</td></tr>
+<tr><td>Icon</td><td>#888888</td></tr>
+<tr><td rowspan="6">Clickable: hover state</td><td>Background Color</td><td>#e9d47b</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>75%</td></tr>
+<tr><td>Border</td><td>#ffffff</td></tr>
+<tr><td>Text</td><td>#212121</td></tr>
+<tr><td>Icon</td><td>#454545</td></tr>
+<tr><td rowspan="6">Clickable: active state</td><td>Background Color</td><td>#ffffff</td></tr>
+<tr><td rowspan="2">Texture</td><td>glass</td></tr>
+<tr><td>65%</td></tr>
+<tr><td>Border</td><td>#ffffff</td></tr>
+<tr><td>Text</td><td>#212121</td></tr>
+<tr><td>Icon</td><td>#454545</td></tr>
+</table>
+</Format>
+</NumberedItem>
+<NumberedItem>
+<Text id="customize-04">Click the <AutoText text="Download theme"/> button. Ensure the Stable version of jQuery is selected. Under <AutoText text="Components"/> uncheck <AutoText text="Toggle All" type="italics"/>, which will uncheck all of the boxes. Under <AutoText text="UI Core"/> check <AutoText text="Core" type="italics"/>, and under <AutoText text="Widgets"/> check <AutoText text="Datepicker" type="italics"/>. At the bottom of the page, under <AutoText text="Theme"/>, <AutoText text="Custom Theme" type="italics"/> should be selected. For <AutoText text="Theme Folder Name:"/>, enter <AutoText text="CollectionTheme" type="italics"/>. Leave <AutoText text="CSS Scope"/> blank. Click <AutoText text="Download"/>. In the pop-up window, select <AutoText text="Save File"/> and click <AutoText text="OK"/> to download the zip file.</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="customize-05">Go to the folder where the zip file was downloaded, and unzip the folder (on Windows, right-click, select <AutoText text="Extract All..."/> and click <AutoText text="Extract"/>).</Text>
+<Text id="customie-06">The extracted folder should be named <AutoText text="jquery-ui-1.10.2.custom" type="italics"/>, or something similar, and should contain three folders (css, development-bundle, js) and an html file (index.html). In the <AutoText text="css"/> folder, there is a folder called <AutoText text="CollectionTheme"/>. Copy this entire folder into <Path>Greenstone3 &rarr; web &rarr; sites &rarr; localsite &rarr; collect &rarr; backdrop &rarr; style</Path>.</Text>
+</NumberedItem>
+<Heading>
+<Text id="customize-06">Setting a collection's theme</Text>
+</Heading>
+<NumberedItem>
+<Text id="customize-07">Open the Greenstone Librarian Interface (from the Windows <AutoText text="Start" type="italics"/> menu) and open the <AutoText text="backdrop"/> collection (use the <AutoText key="glidict::Menu.File"/> menu).</Text>
+</NumberedItem>
+<NumberedItem>
+<Text id="customize-08">In the <AutoText key="glidict::GUI.Format"/> panel, select <AutoText key="glidict::CDM.GUI.Formats"/>. Add the following template to the bottom of the <AutoText text="global"/> format features (this can be copied from <AutoText text="gs3-collect-theme.txt" type="italics"/>):</Text>
+<Format>
+&lt;xsl:template name=&quot;additionalHeaderContent&quot;&gt;<br/>
+<Tab n="1"/>&lt;xsl:variable name=&quot;httpCollection&quot;&gt;<br/>
+<Tab n="2"/>&lt;xsl:value-of select=&quot;/page/pageResponse/collection/metadataList/metadata[@name='httpPath']&quot;/&gt;<br/>
+<Tab n="1"/>&lt;/xsl:variable&gt;<br/>
+<Tab n="1"/>&lt;link href=&quot;{$httpCollection}/style/CollectionTheme/jquery-ui-1.10.2.custom.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br/>
+&lt;/xsl:template&gt;<br/>
+</Format>
+</NumberedItem>
+<NumberedItem>
+<Text id="customize-09">Click <AutoText key="glidict::CreatePane.Preview_Collection"/> to see the <AutoText text="backdrop"/> collection with the new, custom theme.</Text>
+</NumberedItem>
+</Content>
+</Tutorial>
+</MajorVersion>
 </TutorialList>
