Changeset 23813
- Timestamp:
- 2011-03-25T11:12:23+13:00 (13 years ago)
- Location:
- main/trunk/greenstone3/web
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/WEB-INF/classes/interface_default.properties
r20466 r23813 23 23 ######################## 24 24 about.noservices=There are no services available for this collection. 25 about.services= Services available:25 about.services=Extra services available: 26 26 about.servicehelp=You can access the services by clicking on the buttons below or on the names on the navigation bar. The navigation bar is persistent across all pages in the collection. 27 27 #about.description=Description: … … 54 54 pref.encoding=Encoding: 55 55 pref.hitsperpage=Number of hits per page: 56 pref.maxDocs=Maximum documents to return: 56 57 pref.all=all 57 58 pref.set_prefs=Set preferences … … 60 61 pref.berrybasket.off=off 61 62 pref.book=Book viewer mode: 62 63 63 64 64 ################## … … 86 86 external.text=The link you have selected is external to any of your currently selected collections. If you still wish to view this link and your browser has access to the Web, you can {0} to this page; otherwise use your browsers "back" button to return to the previous document. 87 87 external.go_forward=go forward 88 89 ################## 90 # help page 91 ################## 92 help.topicstitle=<h2>Topics</h2> 93 94 help.findinginformationtitle=<h2>How to find information in the {0} collection</h2> 95 help.findinginformation=There are {0} ways to find information in this collection: 96 help.searchdesc=search for particular words that appear in the text by clicking the Search button 97 help.browsedesc=browse documents by <i>{0}</i> by clicking the <i>{0}</i> button 98 99 help.readingdocstitle=<h2>How to read the documents</h2> 100 help.readingdocs=<p>You can tell when you have arrived at an individual book or document because its title, \ 101 or an image of the front cover, appears at the top left of the page. In some collections, a table of contents appears, \ 102 while in others (eg. when the paged image option is used) just the page number is shown, along with a box that allows you \ 103 to select a new page and go forward and backward. In the table of contents, the current section heading is in bold face, \ 104 and the table is expandable -- click on the folders to open or close them; click on the open book at the top to close it.</p>\ 105 <p>Underneath is the text of the current section. When you have read through it, there are arrows at the \ 106 bottom to take you on to the next section or back to the previous one.</p>\ 107 <p>Below the title or front-cover image are some buttons. Click on <i>EXPAND DOCUMENT</i> to expand out the whole text \ 108 of the current section, or book. If the document is large, this could take a long time and use a lot of memory! \ 109 Click on <i>EXPAND CONTENTS</i> to expand out the whole table of contents so that you can see the titles of all \ 110 chapters and subsections. Click on <i>DETACH PAGE</i> to make a new browser window for this document. \ 111 (This is useful if you want to compare documents, or read two at once.)</p> 112 113 help.openbookshelf=Open this bookshelf 114 help.sectionarrows=Go to the previous/next section 115 116 help.searchingtitle=<h2>How to search for particular words</h2> 117 help.searching=<p>From the search page, you make a query in these simple steps:</p>\ 118 <ol><li>Specify what items you want to search</li>\ 119 <li>Say whether you want to search for all or just some of the words</li>\ 120 <li>Type in the words you want to search for</li>\ 121 <li>Click the <i>Begin Search</i> button</li>\ 122 </ol>\ 123 <p>When you make a query, the titles of twenty matching documents will be shown. \ 124 There is a button at the end to take you on to the next twenty documents. From \ 125 there you will find buttons to take you on to the third twenty or back to the \ 126 first twenty, and so on. Click the title of any document, or the little button \ 127 beside it, to see it.</p>\ 128 <p>A maximum of 50 is imposed on the number of \ 129 documents returned. You can change this number by clicking the \ 130 <i>PREFERENCES</i> button at the top of the page.</p> 131 132 help.querytermstitle=<h3>Search Terms</h3> 133 help.queryterms=<p>Whatever you type into the query box is interpreted as a list of words or phrases \ 134 called "search terms." A term is a single word containing only letters and digits, or a phrase \ 135 consisting of a sequence of words enclosed in double quotes ("..."). Terms are separated by white spaces. \ 136 If any other characters such as punctuation appear, they serve to separate terms just as though they were \ 137 spaces. And then they are ignored. You can't search for words that include punctuation.</p> \ 138 <p>For example, the query</p> \ 139 <ul><kbd>Agro-forestry in the Pacific Islands: Systems for Sustainability (1993)</kbd></ul> \ 140 <p>will be treated the same as</p> \ 141 <ul><kbd>Agro forestry in the Pacific Islands Systems for Sustainability 1993 </kbd></ul> 142 143 help.querytypetitle=<h3>Query type</h3> 144 help.querytype=<p>There are two different kinds of query. </p>\ 145 <ul>\ 146 <li>Queries for <b>all</b> of the words. These look for documents (or chapters, or titles) \ 147 that contain all the words you have specified. Documents that satisfy the query are displayed, in build order. </li>\ 148 <li>Queries for <b>some</b> of the words. Just list some terms that are likely to appear in \ 149 the documents you are looking for. Documents are displayed in order of how closely they match the query. \ 150 When determining the degree of match, </li>\ 151 <ul> \ 152 <li> the more search term occurrences a document contains, the closer it matches; </li>\ 153 <li> terms which are rare in the collection as a whole are more important than common ones; </li>\ 154 <li> short documents match better than long ones. </li>\ 155 </ul> \ 156 </ul> \ 157 <p>Use as many search terms as you like--a whole sentence, or even a whole paragraph. If you specify only \ 158 one term, documents will be ordered by its frequency of occurrence.</p> 159 160 help.queryscopetitle=<h3>Scope of queries</h3> 161 help.queryscope=<p>In most collections you are given a choice of different indexes to search. For example, there might \ 162 be author or title indexes. Or there might be chapter or paragraph indexes. Generally, \ 163 the full matching document is returned regardless of which index you search.</p> \ 164 <p>If documents are books, they will be opened at the appropriate place.</p> 165 166 help.changingpreferencestitle=<h2>Changing your preferences</h2> 167 help.changingpreferences=<p>When you click the <i>PREFERENCES</i> button at the top of the page you will \ 168 be able to change some features of the interface to suit your own requirements.</p> 169 170 help.collectionpreferencestitle=<h3>Collection preferences</h3> 171 help.collectionpreferences=<p>Some collections comprise several subcollections, which can be searched \ 172 independently or together, as one unit. If so, you can select which \ 173 subcollections to include in your searches on the Preferences page. </p> 174 175 help.languagepreferencestitle=<h3>Language preferences</h3> 176 help.languagepreferences=<p>Each collection has a default presentation language, but you can switch to \ 177 a different language if you like. You can also alter the encoding scheme \ 178 used by Greenstone for output to the browser -- the software chooses \ 179 sensible defaults, but with some browsers it may be necessary to switch to \ 180 a different encoding scheme to ensure correct character display. \ 181 All collections allow you to switch from the standard graphical interface format to a textual one. This \ 182 is particularly useful for visually impaired users who use large screen fonts or speech synthesizers for output.</p> 183 184 help.presentationpreferencestitle=<h3>Presentation preferences</h3> 185 help.presentationpreferences=<p>Depending on the particular collection, \ 186 there may be several options you can set that control the presentation. </p> \ 187 <p>Collections of Web pages allow you to suppress the Greenstone navigation bar at the top of each document page, \ 188 so that once you have done a search you land at the exact Web page that matches without any Greenstone header. \ 189 To do another search you will have to use your browser's "back" button. These collections also allow you to suppress \ 190 Greenstone's warning message when you click a link that takes you out of the digital library collection and on to the \ 191 Web itself. And in some Web collections you can control whether the links on the search results page take you straight \ 192 to the actual URL in question, rather than to the digital library's copy of the page. </p> 193 194 help.searchpreferencestitle=<h2>Search preferences</h2> 195 help.searchpreferences1=<p>You can switch to an "advanced" query mode which allows you to combine terms \ 196 using & (for "and"), | (for "or"), and ! (for "not"), using parentheses for \ 197 grouping if desired. This allows you to specify more precise queries. </p>\ 198 <p>It is possible to get a large query box, so that you can easily do paragraph-sized searching. \ 199 It is surprisingly quick to search for large amounts of text. </p>\ 200 201 help.searchpreferences2=<p>You can turn on the search history feature, which shows you your last few \ 202 queries. This makes it easy to repeat slightly modified versions of previous queries.</p> \ 203 <p>Finally, you can control the number of hits returned, and the \ 204 number presented on each screenful.</p> 205 206 help.mgsearchpreferences=<p>A pair of buttons controls whether upper and lower case must match when searching. \ 207 For example, if "ignore case differences" is selected, snail farming will be treated the same as Snail Farming and SNAIL FARMING. </p> 208 88 209 ################## 89 210 # authentication page -
main/trunk/greenstone3/web/interfaces/oran/js/berrybasket.js
r19854 r23813 59 59 // they are set to be invisible to prevent flickering when first loaded (see berry.css) 60 60 61 var berries = $('img');61 var berries = document.getElementsByTagName('img'); 62 62 var berrybasket = new YAHOO.util.DDTarget('berrybasket','basket'); 63 63 … … 87 87 88 88 var responseFailure = function(o){ 89 alert("CHECKOUT FAILED"); 89 90 //alert( arguments.callee ); 90 91 } … … 165 166 var basketHandle = YAHOO.util.Dom.get('baskethandle'); 166 167 var berries = YAHOO.util.Dom.get('berries'); 167 var div = document.createElement('div');168 var list = document.createElement('ol');169 168 var width = 500; 170 169 var height = 40; 171 170 var i=0; 172 171 173 list.id = 'doclist';174 175 172 //remove berryImages in the berry basket 176 173 while (berries.hasChildNodes()) { … … 180 177 basketHandle.removeChild(basketHandle.firstChild); 181 178 } 179 180 var div = document.createElement('div'); 181 berries.appendChild(div); 182 var list = document.createElement('ol'); 183 div.appendChild(list); 184 185 list.id = 'doclist'; 182 186 183 187 //put the berries in 184 for (i in berryList){188 for (i; i < berryList.length; i++){ 185 189 var berryItem = berryList[i]; 186 190 var berryElement = document.createElement('li'); 191 list.appendChild(berryElement); 187 192 var title = berryItem.getAttribute('title'); 188 193 var root_title = berryItem.getAttribute('root_title'); 189 var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');194 //var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name'); 190 195 191 196 if (root_title != ""){ … … 197 202 title = title.substring(0,20)+" ... "+title.substr(title.length-35,35); 198 203 } 199 200 berryElement.appendChild(document.createTextNode(title)); 204 201 205 berryElement.setAttribute("class","berryitem"); 202 list.appendChild(berryElement); 203 height +=18; 206 berryElement.setAttribute("title",title); 207 berryElement.innerHTML = title; 208 height +=40; 204 209 } 205 210 … … 207 212 oldWidth = berryBasket.style.width; 208 213 oldBg = berryBasket.style.background; 209 berryBasket.style.height = height;210 berryBasket.style.width = width;214 //berryBasket.style.height = height; 215 //berryBasket.style.width = width; 211 216 berryBasket.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat'; 212 217 berryBasket.style.cursor = "default"; 213 218 berryBasket.className = "show"; 214 div.appendChild(list); 215 berries.appendChild(div); 216 berries.style.height = height - 40; 219 //berries.style.height = height - 40; 217 220 218 221 //put the full view link in 219 222 var fullView = document.createElement('a'); 220 223 berries.appendChild(fullView); 224 225 //Find the collection in the cgi parameters 226 var url = window.location.href; 227 var colstart = url.indexOf("&c="); 228 var collectionName = ""; 229 if (colstart != -1) 230 { 231 var colend = url.indexOf("&", (colstart + 1)); 232 if (colend == -1) 233 { 234 colend = url.length - 1; 235 } 236 collectionName = url.substring(colstart + 3, colend); 237 } 238 221 239 fullView.appendChild(document.createTextNode('Full View »')); 222 fullView.setAttribute("href","?a=g&sa=berry&c=&s=DisplayList&rt=r ");240 fullView.setAttribute("href","?a=g&sa=berry&c=&s=DisplayList&rt=r&p.c=" + collectionName); 223 241 fullView.setAttribute("id","berryFullViewLink"); 224 225 242 226 243 //toggle expand/collapse links -
main/trunk/greenstone3/web/interfaces/oran/js/berrycheckout.js
r19854 r23813 15 15 16 16 function navigate(e){ 17 18 var target = e.target;17 18 var target = this; 19 19 20 20 if ( target.id.toLowerCase() == '' ) { … … 46 46 var parea =YAHOO.util.Dom.get('pretextarea'); 47 47 urlonly = false; 48 49 this.value='URL only view'; 50 48 51 populateUrlsAndMetadata(parea); 49 52 return; … … 56 59 populateUrls(parea); 57 60 urlonly = true; 61 62 this.value='URL and Metadata view'; 63 58 64 return; 59 65 } … … 91 97 } 92 98 99 function pageLoad(){ 100 for(var j = 0; j < options.length; j++) 101 { 102 var ele = document.getElementById(options[j]); 103 YAHOO.util.Event.addListener(ele, 'click', navigate); 104 } 105 106 showFullView(); 107 } 108 93 109 function showFullView(){ 94 110 … … 101 117 return; 102 118 } 103 104 119 105 120 var trashbin = document.createElement('div'); … … 277 292 input.setAttribute("value", "send"); 278 293 content.appendChild(input); 279 280 } 281 294 295 YAHOO.util.Event.addListener(input, 'click', navigate); 296 } 282 297 283 298 function buildPreview(parent){ … … 285 300 var div = document.createElement('div'); 286 301 var cb = document.createElement('input'); 287 cb.type = 'checkbox'; 288 302 cb.setAttribute('class', 'sendbutton'); 303 cb.type = 'button'; 304 cb.id = 'urlcheck'; 305 if (urlonly) 306 { 307 cb.value='URL and Metadata view'; 308 } 309 else 310 { 311 cb.value='URL only view'; 312 } 313 314 YAHOO.util.Event.addListener(cb, 'click', navigate); 315 289 316 var img = document.createElement('img'); 290 317 img.src = 'interfaces/default/images/check3.gif'; … … 296 323 urls.id = 'urls'; 297 324 urls.className = 'berrycheck'; 298 urls.appendChild(document.createTextNode('URL only'));325 //urls.appendChild(document.createTextNode('URL only')); 299 326 div.appendChild(urls); 300 327 … … 312 339 parent.appendChild(parea); 313 340 314 populateUrlsAndMetadata(parea); 315 316 341 if(urlonly) 342 { 343 populateUrls(parea); 344 } 345 else 346 { 347 populateUrlsAndMetadata(parea); 348 } 317 349 } 318 350 … … 406 438 } 407 439 408 YAHOO.util.Event.addListener(window,'click', navigate); 409 YAHOO.util.Event.addListener(window,'load', showFullView); 410 411 440 YAHOO.util.Event.addListener(window,'load', pageLoad); 441 442 -
main/trunk/greenstone3/web/interfaces/oran/style/berry.css
r19855 r23813 39 39 display:block; 40 40 cursor: pointer; 41 text-align: right;41 text-align: left; 42 42 padding: .5em; 43 43 } … … 142 142 font-weight: bold; 143 143 cursor: pointer; 144 width: 5em;144 /*width: 5em;*/ 145 145 font-size: 90%; 146 146 margin: 1em 0 0 0; -
main/trunk/greenstone3/web/interfaces/oran/style/core.css
r22784 r23813 17 17 padding: 0; 18 18 line-height: 160%; 19 /* background: url('../images/layout/containerLeft.png') scroll repeat-y left top;*/20 19 background-color: #fff; 21 20 border: 1px solid #c8c3b9; 22 21 } 23 #container2 {24 /* background: url('../images/layout/containerRight.png') scroll repeat-y right top; */25 }26 /*27 #container3 {28 background: url('../images/layout/containerTop.png') scroll repeat-x left top;29 }30 #container4 {31 background: url('../images/layout/containerBottom.png') scroll repeat-x left bottom;32 padding: 10px;33 }34 */35 22 36 23 #gs_banner { 37 background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top; 24 /*background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top;*/ 25 background-color: #008800; 38 26 padding: 10px 20px 30px 20px; 39 27 min-height: 80px; 40 max-height: 110px;41 28 position: relative; 42 29 } … … 108 95 body.dAction #gs_banner h2 { 109 96 max-width: 600px; 110 font-size: 100%; 97 font-size: 100; 98 } 99 100 #titlearea { 101 padding-left: 1em; 102 padding-right: 1em; 103 height:60px; 104 background-color: #007200; 105 width:40%; 106 } 107 108 #titlesearchcontainer { 109 width:100%; 110 margin: 5px 0 5px; 111 } 112 113 #quicksearcharea { 114 width:60%; 115 text-align:right; 116 padding: 5px; 117 color:white; 118 background-color:#007200; 119 } 120 121 #quicksearcharea table{ 122 font-size:10px; 123 margin:0; 124 float: right; 125 } 126 127 #quicksearcharea a{ 128 font-size: 11px; 129 color:white; 130 text-transform:lowercase; 131 padding-left:10px; 132 } 133 134 #expandqueryboxbutton { 135 color:white; 136 text-decoration:none; 111 137 } 112 138 113 139 #breadcrumbs { 114 margin: 0 0 10px 0; 115 height: 30px; 116 line-height: 30px; 117 } 118 #gs_banner h2 { 119 margin: 0 0 10px 1em; 120 } 121 140 /*margin: 0 0 10px 0;*/ 141 height: 25px; 142 line-height: 15px; 143 } 122 144 123 145 /* css to make the tabs work */ 124 146 #nav { 125 position: 147 position:absolute; 126 148 width: auto; 127 149 bottom: 0; 128 right: 0;150 left: 0; 129 151 list-style: none; 130 152 margin:0; 131 padding: 0 15px 0 0;153 padding: 0 0 0 20px; 132 154 font-size: 14px; 133 155 } 134 156 135 157 #nav li { 136 float: right;158 float: left; 137 159 color: #fff; 138 160 background: transparent url('../images/tab-right.png') scroll no-repeat 100% -100px; 139 161 margin: 0 5px 0 0; 140 162 padding: 0 8px 0 0; 163 text-transform: capitalize; 141 164 } 142 165 143 166 #nav a { 167 144 168 display: block; 145 float: left; 146 169 float:left; 147 170 background: transparent url('../images/tab-left.png') no-repeat scroll 0 -100px; 148 171 margin:0; 149 172 padding: 5px 4px 3px 10px; 150 font-weight: normal;173 font-weight: bold; 151 174 color: #fff; 152 175 text-decoration: none; … … 164 187 list-style: none; 165 188 margin:0; 166 top: 15px;189 top: 7px; 167 190 right: 0; 168 191 padding: 0 15px 0 0; -
main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl
r23568 r23813 15 15 exclude-result-prefixes="util java util"> 16 16 17 <xsl:include href="header.xsl"/> 18 <!--<xsl:include href="formatmanager.xsl"/>--> 19 17 20 <xsl:include href="xml-to-gui.xsl"/> 18 21 <xsl:include href="xml-to-gui-templates.xsl"/> … … 33 36 34 37 <head> 35 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title> 36 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/> 37 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script> --> 38 <script type="text/javascript" src="interfaces/oran/js/jquery-1.4.2.js"><xsl:text> </xsl:text></script> 39 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8.2.custom.min.js"><xsl:text> </xsl:text></script> --> 40 <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/ui/jquery-ui.js"><xsl:text> </xsl:text></script> 41 <script type="text/javascript" src="interfaces/oran/js/jquery.selectboxes.js"><xsl:text> </xsl:text></script> 42 <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"><xsl:text> </xsl:text></script> --> 43 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> --> 44 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> --> 45 38 <!-- ***** in header.xsl ***** --> 39 <xsl:call-template name="create-html-header"/> 46 40 <xsl:call-template name="berryBasketHeadTags"/> 47 41 </head> … … 51 45 <xsl:call-template name="displayErrorsIfAny"/> 52 46 53 <div id="container"> <div id="container2"><div id="container3"><div id="container4">47 <div id="container"> 54 48 55 49 <div id="gs_banner"> 56 50 57 <!-- show the title --> 58 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div> 59 <h2><xsl:call-template name="pageTitle"/></h2> 60 61 <xsl:if test="/page/pageResponse/collection"> 62 <!-- show home, help, preferences links --> 63 <ul id="bannerLinks"> 64 65 <!-- preferences --> 66 <li> 67 <a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"> 68 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 69 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 70 </a> 71 </li> 72 73 <!-- help --> 74 <li> 75 <a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"> 76 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 77 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 78 </a> 79 </li> 80 81 <li> 82 <a href="{$library_name}?a=p&amp;sa=home"> 83 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute> 84 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/> 85 </a> 86 </li> 87 88 </ul> 89 </xsl:if> 90 91 <!-- show the available 'services' (browse, search, etc.) --> 92 <xsl:if test="/page/pageResponse/collection/serviceList/service"> 93 <ul id="nav"> 94 <!-- show browse service, if it exists --> 95 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']"> 96 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']"> 97 <xsl:call-template name="navigationTab"/> 98 </xsl:for-each> 99 </xsl:if> 100 101 <!-- show search services (collapsed) if they exist --> 102 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']"> 103 <xsl:for-each select="/page/pageResponse/collection/serviceList"> 104 105 <!-- 106 using collapsedNavigationTab instead of navigationTab collapses 107 all the services of the given type onto one tab 108 --> 109 <xsl:call-template name="collapsedNavigationTab"> 110 <xsl:with-param name="type">query</xsl:with-param> 111 </xsl:call-template> 112 </xsl:for-each> 113 </xsl:if> 114 115 <!-- all other services --> 116 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]"> 117 <xsl:call-template name="navigationTab"/> 118 </xsl:for-each> 119 120 </ul> 121 </xsl:if> 51 <!-- ***** in header.xsl ***** --> 52 <xsl:call-template name="create-banner"/> 122 53 123 54 </div> 55 56 <!--<xsl:call-template name="formatmanagerpre"/>--> 124 57 125 <!-- *************************************************************************************** -->126 127 <!-- <xsl:variable name="foo"> -->128 <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->129 130 <xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">131 132 <!-- Sam2's div code -->133 134 <script type="text/javascript" src="interfaces/oran/js/innerxhtml.js"><xsl:text> </xsl:text></script>135 <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>136 137 <xsl:call-template name="xml-to-gui-templates">138 <xsl:with-param name="node-set" select="test"/>139 <xsl:with-param name="metadataSets" select="//metadataSetList"/>140 </xsl:call-template>141 142 <xsl:variable name="fmt1">143 <xsl:call-template name="xml-to-string">144 <xsl:with-param name="node-set" select="//format[@type='browse']"/>145 </xsl:call-template>146 </xsl:variable>147 148 <xsl:variable name="meta">149 <xsl:call-template name="xml-to-string">150 <xsl:with-param name="node-set" select="//metadataSetList"/>151 </xsl:call-template>152 </xsl:variable>153 154 <style type="text/css">155 .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }156 157 .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }158 159 .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}160 161 .resizable { width: 150px; height: 150px; padding: 0.5em; }162 163 .block { margin-left: 15px; border-left: dashed 1px black;}164 165 .droppable { background-color: #99dd99;}166 .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }167 168 <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->169 170 <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->171 </style>172 173 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>174 175 <table width="100%" border="1">176 177 <td width="75%">178 179 <button id="updateFormatStatement" type="button" onclick="updateFormatStatement()">Update Format Statement</button>180 <button id="saveFormatStatement" type="button" onclick="saveFormatStatement()">Save Format Statement</button>181 182 <div id="formatStatement">183 <div id="formatRoot">184 185 <xsl:call-template name="xml-to-gui">186 <xsl:with-param name="node-set" select="//format"/> <!-- [@type='browse']"/> -->187 <xsl:with-param name="metadataSets" select="//metadataSetList"/>188 </xsl:call-template>189 </div>190 </div>191 </td>192 193 194 <td width="25%" valign="top">195 <h2> Elements to add </h2>196 <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->197 <div class="draggable_gsf_template css_gsf_template block" title="gsf:template"><table class="header"><tbody><tr><td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table><table border="1"><tr class="tr"><td class="droppable" width="10px"></td></tr></table></div><br/>198 199 <div class="draggable_gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata"><table class="header"><tbody><tr><td class="header">CHOOSE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>200 201 <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata"><table class="header"><tbody><tr><td class="header"><xsl:call-template name="meta-to-combo">202 <xsl:with-param name="metadataSets" select="//metadataSetList"/>203 <xsl:with-param name="current" select="ex.Title"/>204 </xsl:call-template></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>205 206 <div class="draggable_gsf_link css_gsf_link block" title="gsf:link"><table class="header"><tbody><tr><td class="header">LINK<select>207 <option value = "document" selected = "document">Document</option>208 <option value = "classifier">Classifier</option>209 <option value = "source">Source</option>210 <option value = "horizontal">Horizontal</option>211 </select></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>212 213 <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch"><table class="header"><tbody><tr><td class="header">SWITCH</td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>214 215 <div class="draggable_gsf_when css_gsf_when block" title="gsf:when"><table class="header"><tbody><tr><td class="header">WHEN<xsl:value-of select="@test"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>216 217 <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise"><table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>218 219 <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon"><table class="header"><tbody><tr><td class="header">ICON<select><option value = "document" selected = "document">Document</option><option value = "classifier">Classifier</option><option value = "source">Source</option></select></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>220 <br/>221 <div class="draggable_gsf_text css_text" title="text"><table class="header"><tbody><tr><td class="header"><input type="text" name="rawtextinput" size="10" value=""/></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>222 <div class="draggable_table css_table" title="gsf:table">NEW TABLE</div>223 <div class="draggable_tr css_tr" title="gsf:row">NEW TABLE ROW</div>224 <div class="draggable_td css_td" title="gsf:column">NEW TABLE COLUMN</div>225 226 </td>227 </table>228 229 <!--230 <div id="format">231 <p>232 <b>Format string here</b>233 <i>234 <xsl:value-of select="$fmt1"/>235 </i>236 </p>237 </div> -->238 <!-- <p>239 <i>240 <xsl:value-of select="$meta"/>241 </i>242 </p>243 </div> -->244 </xsl:if>245 246 <!-- *************************************************************************************** -->247 <!--<H2>Preview</H2>248 249 <div id="my_categories"><xsl:text> </xsl:text></div>250 251 <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe>252 253 <xsl:variable name="preview"> -->254 <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->255 58 <div id="gs_content"> 256 59 <!-- … … 261 64 262 65 </div> 263 <!-- </xsl:variable> 264 265 <script type="text/javascript"> 266 preview_html = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$preview"/><xsl:text disable-output-escaping="yes">';</xsl:text> 267 </script> 268 269 <div id="result"> 270 Here 271 </div>--> 66 67 <!--<xsl:call-template name="formatmanagerpost"/>--> 272 68 273 69 <div id="gs_footer"> … … 280 76 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div> 281 77 282 </div> </div></div></div>78 </div> 283 79 284 80 </body> 285 81 </html> 286 82 </xsl:template> 287 288 83 </xsl:stylesheet> 289 84 -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/berry.xsl
r20465 r23813 10 10 <!-- use the 'main' layout --> 11 11 <xsl:include href="layouts/main.xsl"/> 12 12 13 13 <!-- set page title --> 14 14 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/></xsl:template> 15 15 16 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> </xsl:template>17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template> 18 18 19 19 <!-- the page content --> … … 24 24 var doc; 25 25 var docList = new Array(); 26 <xsl:for-each select="/page/pageResponse/collection/item"> 27 <xsl:text disable-output-escaping="yes"> 28 doc = new Array();</xsl:text> 26 <xsl:for-each select="/page/pageResponse/berryList/item"> 27 <xsl:text disable-output-escaping="yes">doc = new Array();</xsl:text> 29 28 <xsl:for-each select="@*"> 30 <xsl:text disable-output-escaping="yes"> 31 doc["</xsl:text><xsl:value-of select="name()" /><xsl:text disable-output-escaping="yes">"]='</xsl:text><xsl:value-of select="." /><xsl:text disable-output-escaping="yes">';</xsl:text> 29 <xsl:text disable-output-escaping="yes">doc["</xsl:text> 30 <xsl:value-of select="name()" /> 31 <xsl:text disable-output-escaping="yes">"]='</xsl:text> 32 <xsl:value-of select="." /> 33 <xsl:text disable-output-escaping="yes">';</xsl:text> 32 34 </xsl:for-each> 33 <xsl:text disable-output-escaping="yes"> 34 docList[</xsl:text> 35 <xsl:text disable-output-escaping="yes">docList[</xsl:text> 35 36 <xsl:value-of select="position()-1"/> 36 <xsl:text>] = doc; 37 </xsl:text> 37 <xsl:text>] = doc;</xsl:text> 38 38 </xsl:for-each> 39 39 </script> -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl
r20477 r23813 21 21 22 22 <!-- show the classifiers if more than one (title, subject, etc.) --> 23 < xsl:if test="service/classifierList/classifier[2]">23 <!--<xsl:if test="service/classifierList/classifier[2]"> 24 24 <div id="classifierList" class="navList"> 25 25 <ul> … … 30 30 <div class="clear"><xsl:text> </xsl:text></div> 31 31 </div> 32 </xsl:if> 32 </xsl:if>--> 33 33 34 34 <!-- this right sidebar --> 35 <div id="rightSidebar"> 36 <!-- show the berry basket if it's turned on --> 37 <gslib:berryBasket/> 38 <xsl:text> </xsl:text> 39 </div> 35 <xsl:if test="$berryBasketOn"> 36 <div id="rightSidebar"> 37 <!-- show the berry basket if it's turned on --> 38 <gslib:berryBasket/> 39 <xsl:text> </xsl:text> 40 </div> 41 </xsl:if> 40 42 41 43 <!-- -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl
r22785 r23813 19 19 20 20 <!-- set page breadcrumbs --> 21 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template> 21 <xsl:template name="breadcrumbs"> 22 <gslib:siteLink/><gslib:rightArrow/> 23 <gslib:collectionNameLinked/><gslib:rightArrow/> 24 <a> 25 <xsl:attribute name="href"> 26 <xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="/page/pageResponse/document/documentNode[1]/@nodeID"/>&dt=<xsl:value-of select="/page/pageResponse/document/documentNode/@docType"/>&p.a=b&p.s=<xsl:value-of select="/page/pageResponse/service/@name"/> 27 </xsl:attribute> 28 <xsl:variable name="documentTitleVar"> 29 <gslib:documentTitle/> 30 </xsl:variable> 31 Document 32 </a> 33 </xsl:template> 22 34 23 35 <!-- the page content --> … … 45 57 46 58 <!-- display the document --> 47 <xsl:choose> 48 59 <xsl:choose> 49 60 <xsl:when test="@external != ''"> 50 61 <xsl:call-template name="externalPage"> … … 132 143 133 144 </xsl:template> 134 <xsl:template name="externalPage"> 135 <xsl:param name="external"/> 136 <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable> 137 <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2> 138 <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/> 139 </p> 140 </xsl:template> 141 145 146 <xsl:template name="externalPage"> 147 <xsl:param name="external"/> 148 <xsl:variable name="go_forward_link"> 149 <a> 150 <xsl:attribute name="href"> 151 <xsl:value-of select="$external"/> 152 </xsl:attribute> 153 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/> 154 </a> 155 </xsl:variable> 156 <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2> 157 <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/></p> 158 </xsl:template> 142 159 143 160 <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually --> -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/help.xsl
r19988 r23813 15 15 16 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> </xsl:template>17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template> 18 18 19 19 <!-- the page content --> 20 20 <xsl:template match="page"> 21 Help text goes here 21 <xsl:call-template name="helpTopics"/> 22 <xsl:call-template name="findingInformationHelp"/> 23 <xsl:call-template name="readingDocsHelp"/> 24 <xsl:call-template name="searchingHelp"/> 25 <xsl:call-template name="preferencesHelp"/> 26 </xsl:template> 27 28 <xsl:template name="helpTopics"> 29 30 </xsl:template> 31 32 <xsl:template name="findingInformationHelp"> 33 <xsl:variable name="searchEnabled"> 34 <xsl:choose> 35 <xsl:when test="/page/pageResponse/collection[@name=$collName]/serviceList/service[@type='query']">1</xsl:when> 36 <xsl:otherwise>0</xsl:otherwise> 37 </xsl:choose> 38 </xsl:variable> 39 40 <xsl:variable name="numClassifiers"> 41 <xsl:value-of select="count(/page/pageResponse/collection[@name=$collName]/serviceList/service[@name = 'ClassifierBrowse']/classifierList/classifier)"/> 42 </xsl:variable> 43 44 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.findinginformationtitle')"/> 45 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.findinginformation', $searchEnabled + $numClassifiers)"/> 46 47 <!-- using actual <ul> and <li> tags here would cause the XML parser to break --> 48 <xsl:text disable-output-escaping="yes"><ul></xsl:text> 49 <xsl:if test="$searchEnabled = 1"> 50 <xsl:text disable-output-escaping="yes"><li></xsl:text> 51 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchdesc')"/> 52 <xsl:text disable-output-escaping="yes"></li></xsl:text> 53 </xsl:if> 54 55 <xsl:for-each select="/page/pageResponse/collection[@name=$collName]/serviceList/service[@name = 'ClassifierBrowse']/classifierList/classifier"> 56 <xsl:text disable-output-escaping="yes"><li></xsl:text> 57 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.browsedesc', ./displayItem[@name = 'name'])"/> 58 <xsl:text disable-output-escaping="yes"></li></xsl:text> 59 </xsl:for-each> 60 <xsl:text disable-output-escaping="yes"></ul></xsl:text> 61 </xsl:template> 62 63 <xsl:template name="readingDocsHelp"> 64 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.readingdocstitle')"/> 65 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.readingdocs')"/> 66 67 <table> 68 <tr> 69 <td colspan="2"><img src="interfaces/oran/images/bookshelf.png"/></td> 70 <td><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.openbookshelf')"/></td> 71 </tr> 72 <tr> 73 <td><img src="interfaces/oran/images/previous.png"/></td> 74 <td><img src="interfaces/oran/images/next.png"/></td> 75 <td><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.sectionarrows')"/></td> 76 </tr> 77 </table> 78 </xsl:template> 79 80 <xsl:template name="searchingHelp"> 81 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchingtitle')"/> 82 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searching')"/> 83 84 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.querytermstitle')"/> 85 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.queryterms')"/> 86 87 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.querytypetitle')"/> 88 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.querytype')"/> 89 90 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.queryscopetitle')"/> 91 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.queryscope')"/> 92 </xsl:template> 93 94 <xsl:template name="preferencesHelp"> 95 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.changingpreferencestitle')"/> 96 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.changingpreferences')"/> 97 98 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.collectionpreferencestitle')"/> 99 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.collectionpreferences')"/> 100 101 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.languagepreferencestitle')"/> 102 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.languagepreferences')"/> 103 104 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.presentationpreferencestitle')"/> 105 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.presentationpreferences')"/> 106 107 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchpreferencestitle')"/> 108 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchpreferences1')"/> 109 <xsl:if test="/page/pageResponse/collection[@name=$collName and (@type='mgpp' or @type='mg')]"> 110 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.mgsearchpreferences')"/> 111 </xsl:if> 112 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchpreferences2')"/> 22 113 </xsl:template> 23 114 </xsl:stylesheet> -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl
r20405 r23813 19 19 <!-- the page content --> 20 20 <xsl:template match="/page"> 21 22 <!-- 23 Add some javascript to the page that notices when a preference is changed 24 so that, if the user tries to navigate away from the page without clicking 25 the "Set preferences" button, it asks them if they want their preferences 26 saved or not 27 --> 28 <script type="text/javascript"><xsl:text disable-output-escaping="yes"> 29 var modified = false; 30 31 function assembleURLFromForm(formElem) 32 { 33 var url = "dev"; 34 var selectNodes = formElem.getElementsByTagName("select"); 35 var inputNodes = formElem.getElementsByTagName("input"); 36 37 for (var i = 0; i < selectNodes.length; i++) 38 { 39 var current = selectNodes[i]; 40 url += (url == "dev") ? "?" : "&"; 41 url += current.name + "="; 42 url += current.options[current.selectedIndex].text; 43 } 44 45 for (var i = 0; i < inputNodes.length; i++) 46 { 47 var current = inputNodes[i]; 48 if (current.type == "hidden" || current.type == "text") 49 { 50 url += (url == "dev") ? "?" : "&"; 51 url += current.name + "="; 52 url += current.value; 53 } 54 } 55 return url; 56 } 57 58 function checkModified(e) 59 { 60 if (modified) 61 { 62 var ok = confirm("Would you like to save your preferences?"); 63 64 if (ok) 65 { 66 var formElem = document.getElementById("prefform"); 67 formElem.submit(); 68 var xmlhttp; 69 if (window.XMLHttpRequest) 70 { 71 xmlhttp=new XMLHttpRequest(); 72 } 73 else 74 { 75 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 76 } 77 //assembleURLFromForm(formElem); 78 xmlhttp.open("GET",assembleURLFromForm(formElem),false); 79 xmlhttp.send(); 80 } 81 } 82 } 83 84 function changed() 85 { 86 modified = true; 87 } 88 89 function pageLoad() 90 { 91 var formElem = document.getElementById("prefform"); 92 93 var selectNodes = formElem.getElementsByTagName("select"); 94 var inputNodes = formElem.getElementsByTagName("input"); 95 96 YAHOO.util.Event.addListener(selectNodes, 'change', changed); 97 98 for(var i = 0; i < inputNodes.length; i++) 99 { 100 current = inputNodes[i]; 101 if(current.getAttribute("type") == null) 102 { 103 YAHOO.util.Event.on(current, 'keyup', changed); 104 } 105 } 106 } 107 108 YAHOO.util.Event.addListener(window, 'load', pageLoad); 109 YAHOO.util.Event.addListener(window, 'beforeunload', checkModified); 110 </xsl:text></script> 21 111 22 112 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> … … 24 114 25 115 <div id="queryform"> 26 <form name="PrefForm" method="get" action="{$library_name}" >116 <form name="PrefForm" method="get" action="{$library_name}" id="prefform"> 27 117 28 118 <input type='hidden' name='a' value='p'/> … … 89 179 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></h3> 90 180 <div id="searchprefs"> 91 <xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable> 181 <xsl:variable name="hits"> 182 <xsl:choose> 183 <xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"> 184 <xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/> 185 </xsl:when> 186 <xsl:otherwise> 187 20 188 </xsl:otherwise> 189 </xsl:choose> 190 </xsl:variable> 92 191 <div class="paramLabel"> 93 192 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> … … 95 194 <div class="paramValue"> 96 195 <select name="hitsPerPage"> 97 <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 98 <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option> 99 <option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option> 100 <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option> 101 </select> 102 </div> 196 <option value="20"> 197 <xsl:if test="$hits=20"> 198 <xsl:attribute name="selected" /> 199 </xsl:if> 200 20 201 </option> 202 <option value="50"> 203 <xsl:if test="$hits=50"> 204 <xsl:attribute name="selected" /> 205 </xsl:if> 206 50 207 </option> 208 <option value="100"> 209 <xsl:if test="$hits=100"> 210 <xsl:attribute name="selected" /> 211 </xsl:if> 212 100 213 </option> 214 <option value="-1"> 215 <xsl:if test="$hits=-1"> 216 <xsl:attribute name="selected" /> 217 </xsl:if> 218 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/> 219 </option> 220 </select> 221 </div> 222 223 <br class="clear"/> 224 225 <xsl:variable name="mdocs"> 226 <xsl:choose> 227 <xsl:when test="/page/pageRequest/paramList/param[@name='maxDocs']"> 228 <xsl:value-of select="/page/pageRequest/paramList/param[@name='maxDocs']/@value"/> 229 </xsl:when> 230 <xsl:otherwise>100</xsl:otherwise> 231 </xsl:choose> 232 </xsl:variable> 233 <div class="paramLabel"> 234 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.maxDocs')"/> 235 </div> 236 <div class="paramValue"> 237 <input name="maxDocs" size="3" value="{$mdocs}" /> 238 </div> 239 103 240 <br class="clear"/> 104 241 </div> -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/query.xsl
r20465 r23813 36 36 <xsl:for-each select="paramList/param"> 37 37 <xsl:choose> 38 <xsl:when test="@name='case' or @name='stem' or @name='accent'"> 39 </xsl:when> 38 40 <xsl:when test="@type='multi'"> 39 41 <xsl:apply-templates select="."><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 40 42 </xsl:when> 43 <xsl:when test="@name = 'sortBy' or @name = 'maxDocs'"></xsl:when> 41 44 <xsl:otherwise> 42 45 <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable> … … 115 118 </xsl:template> 116 119 117 <!-- invisible params - used by other stuff. in the query form, we set to t ehdefault -->120 <!-- invisible params - used by other stuff. in the query form, we set to the default --> 118 121 <xsl:template match="param[@type='invisible']"> 119 122 <xsl:param name="ns">s1.</xsl:param> -
main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl
r22458 r23813 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:xslt="http://www.w3.org/1999/XSL/Transform" 5 xmlns:gslib="http://www.greenstone.org/XSL/Library" 6 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" 7 xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" 8 exclude-result-prefixes="util gslib gsf xslt"> 9 10 <!-- some global parameters - these are set by whoever is invoking the transformation --> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/XSL/Library" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" version="1.0" exclude-result-prefixes="util gslib gsf xslt"> 3 <!-- some global parameters - these are set by whoever is invoking the transformation --> 11 4 <xsl:param name="interface_name"/> 12 5 <xsl:param name="library_name"/> 13 14 6 <xsl:include href="xml-to-string.xsl"/> 15 16 7 <!-- every pages ....................................................................... --> 17 <xsl:template name="siteName"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/></xsl:template> 18 <xsl:template name="siteLink"><a href="./{$library_name}"><xsl:call-template name="siteName"/><xsl:text> </xsl:text></a></xsl:template> 19 20 <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/> </xsl:variable> 21 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/> 22 23 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 24 <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/> 25 26 <!-- template to get the name of the current collection --> 27 <xsl:template name="collectionName"> 28 <xsl:choose> 29 <xsl:when test="/page/pageResponse/collection"><xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/></xsl:when> 30 <xsl:otherwise>All Collections</xsl:otherwise> 31 </xsl:choose> 32 </xsl:template> 33 34 <xsl:template name="collectionNameShort"> 35 <xsl:value-of select="/page/pageResponse/collection/@name"/> 36 </xsl:template> 37 38 <xsl:template name="collectionNameLinked"> 39 <xsl:if test="/page/pageResponse/collection"> 40 <a> 41 <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&sa=about&c=<xsl:call-template name="collectionNameShort"/></xsl:attribute> 42 <xsl:call-template name="collectionName"/> 43 </a> 44 </xsl:if> 45 </xsl:template> 46 47 <!-- text to get the name of the current service ("Browse","Search" etc) --> 48 <xsl:template name="serviceName"> 49 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 50 </xsl:template> 51 52 <xsl:template name="textDirectionAttribute"> 53 <xsl:attribute name="dir"> 54 <xsl:choose> 55 <xsl:when test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:when> 56 <xsl:otherwise>ltr</xsl:otherwise> 57 </xsl:choose> 58 </xsl:attribute> 59 </xsl:template> 60 61 <xsl:template name="actionClass"> 62 <xsl:attribute name="class"><xsl:value-of select="/page/pageRequest/@action"/>Action <xsl:if test="/page/pageRequest/@subaction"><xsl:value-of select="/page/pageRequest/@subaction"/>Subaction</xsl:if></xsl:attribute> 63 </xsl:template> 64 65 <!-- username, if logged in --> 66 <!-- 8 <xsl:template name="siteName"> 9 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/> 10 </xsl:template> 11 <xsl:template name="siteLink"> 12 <a href="./{$library_name}"> 13 <xsl:call-template name="siteName"/> 14 <xsl:text> </xsl:text> 15 </a> 16 </xsl:template> 17 <xsl:variable name="a"> 18 <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/> 19 </xsl:variable> 20 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/> 21 <xsl:variable name="berrybasketswitch"> 22 <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/> 23 </xsl:variable> 24 <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/> 25 <!-- template to get the name of the current collection --> 26 <xsl:template name="collectionName"> 27 <xsl:choose> 28 <xsl:when test="/page/pageResponse/collection"> 29 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/> 30 </xsl:when> 31 <xsl:otherwise>All Collections</xsl:otherwise> 32 </xsl:choose> 33 </xsl:template> 34 <xsl:template name="collectionNameShort"> 35 <xsl:value-of select="/page/pageResponse/collection/@name"/> 36 </xsl:template> 37 <xsl:template name="collectionNameLinked"> 38 <xsl:if test="/page/pageResponse/collection"> 39 <a> 40 <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&sa=about&c=<xsl:call-template name="collectionNameShort"/></xsl:attribute> 41 <xsl:call-template name="collectionName"/> 42 </a> 43 </xsl:if> 44 </xsl:template> 45 <!-- text to get the name of the current service ("Browse","Search" etc) --> 46 <xsl:template name="serviceName"> 47 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 48 </xsl:template> 49 <xsl:template name="textDirectionAttribute"> 50 <xsl:attribute name="dir"> 51 <xsl:choose> 52 <xsl:when test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:when> 53 <xsl:otherwise>ltr</xsl:otherwise> 54 </xsl:choose> 55 </xsl:attribute> 56 </xsl:template> 57 <xsl:template name="actionClass"> 58 <xsl:attribute name="class"><xsl:value-of select="/page/pageRequest/@action"/>Action <xsl:if test="/page/pageRequest/@subaction"><xsl:value-of select="/page/pageRequest/@subaction"/>Subaction</xsl:if></xsl:attribute> 59 </xsl:template> 60 <!-- username, if logged in --> 61 <!-- 67 62 <xsl:template name="username"> 68 63 <xsl:if test="$un_s!=''"> … … 73 68 </xsl:template> 74 69 --> 75 76 <xsl:template name="defaultDividerBar"> 77 <xsl:param name='text'/> 78 <xsl:choose> 70 <xsl:template name="defaultDividerBar"> 71 <xsl:param name="text"/> 72 <xsl:choose> 79 73 <xsl:when test="$text"> 80 <div class="divbar"><xsl:value-of select="$text"/></div> 74 <div class="divbar"> 75 <xsl:value-of select="$text"/> 76 </div> 81 77 </xsl:when> 82 78 <xsl:otherwise> 83 <div class="divbar"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div> 79 <div class="divbar"> 80 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> 81 </div> 84 82 </xsl:otherwise> 85 83 </xsl:choose> 86 84 </xsl:template> 87 88 89 <xsl:template match="error"> 85 <xsl:template match="error"> 90 86 Error: <xsl:value-of select="."/> 91 87 </xsl:template> 92 93 94 <xsl:template name="displayErrorsIfAny"> 95 <xsl:if test="descendant::error"> 88 <xsl:template name="displayErrorsIfAny"> 89 <xsl:if test="descendant::error"> 96 90 <script language="Javascript"> 97 91 <xsl:text disable-output-escaping="yes"> 98 92 function removeAllChildren(node) { 99 93 while (node.hasChildNodes()) { … … 107 101 hide_link = document.getElementById("hide"); 108 102 removeAllChildren(hide_link); 109 hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/><xsl:text disable-output-escaping="yes">")); 103 hide_link.appendChild(document.createTextNode("</xsl:text> 104 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/> 105 <xsl:text disable-output-escaping="yes">")); 110 106 } else { 111 107 obj.style.display = "none"; 112 108 hide_link = document.getElementById("hide"); 113 109 removeAllChildren(hide_link); 114 hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">")); 110 hide_link.appendChild(document.createTextNode("</xsl:text> 111 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/> 112 <xsl:text disable-output-escaping="yes">")); 115 113 } 116 114 } 117 115 </xsl:text> 118 116 </script> 119 <p align='right'><a id="hide" href="javascript:toggleHideError(error);"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/></a></p> 117 <p align="right"> 118 <a id="hide" href="javascript:toggleHideError(error);"> 119 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/> 120 </a> 121 </p> 120 122 <div id="error" style="display: none;"> 121 123 <xsl:apply-templates select="descendant::error"/> 122 124 </div> 123 125 </xsl:if> 124 </xsl:template> 125 126 127 <xsl:template name="noTextBar"> 128 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> 129 </xsl:template> 130 131 132 <xsl:template name="poweredByGS3TextBar"> 133 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 134 </xsl:template> 135 136 <xsl:template name="rightArrow"><xsl:text disable-output-escaping="yes"> &raquo; </xsl:text></xsl:template> 137 138 139 140 <!-- site home ....................................................................... --> 141 142 <xsl:template name="siteHomePageTitle"> 143 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 144 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text> 145 </xsl:template> 146 147 148 <xsl:template name="selectACollectionTextBar"> 149 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 150 </xsl:template> 151 <xsl:template name="crossCollectionQuickSearchForm"> 152 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/> 153 </xsl:template> 154 155 <xsl:template match="service[@name='TextQuery']"> 156 <form name="QuickSearch" method="get" action="{$library_name}"> 157 <input type="hidden" name="a" value="q"/> 158 <input type="hidden" name="rt" value="rd"/> 159 <input type="hidden" name="s" value="{@name}"/> 160 <input type="hidden" name="s1.collection" value="all"/> 161 <input type="text" name="s1.query" size="20"/> 162 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/></xsl:attribute></input> 163 </form> 164 </xsl:template> 165 166 <xsl:template name="collectionLinkWithImage"> 167 <xsl:choose> 168 <xsl:when test="displayItem[@name='icon']"> 169 <a href="{$library_name}?a=p&sa=about&c={@name}"> 170 <img class="collectionLinkImage"> 171 <xsl:attribute name="alt"></xsl:attribute> 172 <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute> 173 </img> 174 <!-- 126 </xsl:template> 127 <xsl:template name="noTextBar"> 128 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> 129 </xsl:template> 130 <xsl:template name="poweredByGS3TextBar"> 131 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 132 </xsl:template> 133 <xsl:template name="rightArrow"> 134 <xsl:text disable-output-escaping="yes"> &raquo; </xsl:text> 135 </xsl:template> 136 <!-- site home ....................................................................... --> 137 <xsl:template name="siteHomePageTitle"> 138 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 139 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 140 <xsl:text> </xsl:text> 141 </xsl:template> 142 <xsl:template name="selectACollectionTextBar"> 143 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 144 </xsl:template> 145 <xsl:template name="crossCollectionQuickSearchForm"> 146 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/> 147 </xsl:template> 148 <xsl:template match="service[@name='TextQuery']"> 149 <form name="QuickSearch" method="get" action="{$library_name}"> 150 <input type="hidden" name="a" value="q"/> 151 <input type="hidden" name="rt" value="rd"/> 152 <input type="hidden" name="s" value="{@name}"/> 153 <input type="hidden" name="s1.collection" value="all"/> 154 <input type="text" name="s1.query" size="20"/> 155 <input type="submit"> 156 <xsl:attribute name="value"> 157 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/> 158 </xsl:attribute> 159 </input> 160 </form> 161 </xsl:template> 162 <xsl:template name="collectionLinkWithImage"> 163 <xsl:choose> 164 <xsl:when test="displayItem[@name='icon']"> 165 <a href="{$library_name}?a=p&sa=about&c={@name}"> 166 <img class="collectionLinkImage"> 167 <xsl:attribute name="alt"/> 168 <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute> 169 </img> 170 <!-- 175 171 <div class="collectionLink"> 176 172 <xsl:attribute name="style">background-image: url(/sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>);</xsl:attribute> … … 178 174 </div> 179 175 --> 180 </a> 176 </a> 177 </xsl:when> 178 <xsl:otherwise> 179 <a href="{$library_name}?a=p&sa=about&c={@name}"> 180 <div class="collectionLink"> 181 <xsl:value-of select="displayItem[@name='name']"/> 182 </div> 183 </a> 184 </xsl:otherwise> 185 </xsl:choose> 186 </xsl:template> 187 <xsl:template name="serviceClusterList"> 188 <xsl:apply-templates select="serviceClusterList"/> 189 </xsl:template> 190 <xsl:template match="serviceClusterList"> 191 <xsl:for-each select="serviceCluster"> 192 <a href="{$library_name}?a=p&sa=about&c={@name}"> 193 <xsl:value-of select="@name"/> 194 <xsl:value-of select="displayItem[@name='name']"/> 195 </a> 196 </xsl:for-each> 197 </xsl:template> 198 <xsl:template name="serviceLink"> 199 <div class="paramLabel"> 200 <a href="{$library_name}?a=q&rt=d&s={@name}"> 201 <xsl:value-of select="displayItem[@name='name']"/> 202 </a> 203 </div> 204 <div class="paramValue"> 205 <xsl:value-of select="displayItem[@name='description']"/> 206 </div> 207 <br class="clear"/> 208 </xsl:template> 209 <xsl:template name="authenticationLink"> 210 <xsl:for-each select="serviceList/service[@type='authen']"> 211 <li> 212 <a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="> 213 <xsl:value-of select="displayItem[@name='name']"/> 214 </a> 215 <xsl:value-of select="displayItem[@name='description']"/> 216 </li> 217 </xsl:for-each> 218 </xsl:template> 219 <xsl:template name="libraryInterfaceLink"> 220 <li> 221 <a href="{$library_name}?a=p&sa=gli4gs3"> 222 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/> 223 </a> 224 </li> 225 </xsl:template> 226 <xsl:template name="greenstoneLogoAlternateText"> 227 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 228 </xsl:template> 229 <!-- about page - collection home ....................................................................... --> 230 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 231 <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 232 <xsl:param name="pageType"/> 233 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/> 234 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/> 235 <xsl:template name="aboutCollectionPageTitle"> 236 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 237 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/> 238 <xsl:text> </xsl:text> 239 </xsl:template> 240 <xsl:template name="collectionHomeLinkWithLogoIfAvailable"> 241 <a href="{$library_name}?a=p&sa=about&c={$collName}"> 242 <xsl:choose> 243 <xsl:when test="$this-element/displayItem[@name='icon']"> 244 <img border="0"> 245 <xsl:attribute name="src"><xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/></xsl:attribute> 246 <xsl:attribute name="alt"> 247 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 248 </xsl:attribute> 249 <xsl:attribute name="title"> 250 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/> 251 </xsl:attribute> 252 </img> 253 </xsl:when> 254 <xsl:otherwise> 255 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 256 </xsl:otherwise> 257 </xsl:choose> 258 </a> 259 </xsl:template> 260 <xsl:template name="homeButtonTop"> 261 <a href="{$library_name}?a=p&sa=home"> 262 <xsl:attribute name="title"> 263 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/> 264 </xsl:attribute> 265 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/> 266 </a> 267 </xsl:template> 268 <xsl:template name="helpButtonTop"> 269 <xsl:choose> 270 <xsl:when test="$pageType='help'"> 271 <li> 272 <a> 273 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 274 </a> 275 </li> 276 </xsl:when> 277 <xsl:otherwise> 278 <li> 279 <a href="{$library_name}?a=p&sa=help&c={$collName}"> 280 <xsl:attribute name="title"> 281 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/> 282 </xsl:attribute> 283 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 284 </a> 285 </li> 286 </xsl:otherwise> 287 </xsl:choose> 288 </xsl:template> 289 <xsl:template name="preferencesButtonTop"> 290 <xsl:choose> 291 <xsl:when test="$pageType='pref'"> 292 <li> 293 <a> 294 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 295 </a> 296 </li> 297 </xsl:when> 298 <xsl:otherwise> 299 <li> 300 <a href="{$library_name}?a=p&sa=pref&c={$collName}"> 301 <xsl:attribute name="title"> 302 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/> 303 </xsl:attribute> 304 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 305 </a> 306 </li> 307 </xsl:otherwise> 308 </xsl:choose> 309 </xsl:template> 310 <xsl:template name="servicesNavigationBar"> 311 <xsl:for-each select="$this-element/serviceList/service"> 312 <xsl:variable name="action"> 313 <xsl:choose> 314 <xsl:when test="@name=$this-service">CURRENT</xsl:when> 315 <xsl:when test="@type='query'">q</xsl:when> 316 <xsl:when test="@type='browse'">b</xsl:when> 317 <xsl:when test="@type='process'">pr</xsl:when> 318 <xsl:when test="@type='applet'">a</xsl:when> 319 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 320 </xsl:choose> 321 </xsl:variable> 322 <xsl:choose> 323 <xsl:when test="$action='CURRENT'"> 324 <li> 325 <a> 326 <xsl:value-of select="displayItem[@name='name']"/> 327 </a> 328 </li> 329 </xsl:when> 330 <xsl:when test="$action !='DO_NOT_DISPLAY'"> 331 <li> 332 <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"> 333 <xsl:if test="displayItem[@name='description']"> 334 <xsl:attribute name="title"> 335 <xsl:value-of select="displayItem[@name='description']"/> 336 </xsl:attribute> 337 </xsl:if> 338 <xsl:value-of select="displayItem[@name='name']"/> 339 </a> 340 </li> 341 </xsl:when> 342 </xsl:choose> 343 </xsl:for-each> 344 </xsl:template> 345 <xsl:template name="collectionDescriptionTextAndServicesLinks"> 346 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/> 347 </xsl:template> 348 <xsl:template match="collection|serviceCluster"> 349 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 350 <xsl:apply-templates select="serviceList"> 351 <xsl:with-param name="collName" select="$collName"/> 352 </xsl:apply-templates> 353 </xsl:template> 354 <xsl:template match="serviceList"> 355 <xsl:param name="collName"/> 356 <xsl:if test="service[not(@type = 'query' or @type = 'browse' or @type = 'retrieve')]"> 357 <h3> 358 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/> 359 </h3> 360 <p> 361 <xsl:choose> 362 <xsl:when test="service"> 363 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/> 181 364 </xsl:when> 182 365 <xsl:otherwise> 183 <a href="{$library_name}?a=p&sa=about&c={@name}"> 184 <div class="collectionLink"> 185 <xsl:value-of select="displayItem[@name='name']"/> 186 </div> 187 </a> 366 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/> 188 367 </xsl:otherwise> 189 </xsl:choose> 190 </xsl:template> 191 192 193 <xsl:template name="serviceClusterList"> 194 <xsl:apply-templates select="serviceClusterList"/> 195 </xsl:template> 196 197 <xsl:template match="serviceClusterList"> 198 <xsl:for-each select="serviceCluster"> 199 <a href="{$library_name}?a=p&sa=about&c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a> 200 </xsl:for-each> 201 </xsl:template> 202 203 204 <xsl:template name="serviceLink"> 205 <div class="paramLabel"><a href="{$library_name}?a=q&rt=d&s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></div> 206 <div class="paramValue"><xsl:value-of select="displayItem[@name='description']"/></div> 207 <br class="clear"/> 208 </xsl:template> 209 210 211 <xsl:template name="authenticationLink"> 212 <xsl:for-each select="serviceList/service[@type='authen']"> 213 <li><a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li></xsl:for-each> 214 </xsl:template> 215 <xsl:template name="libraryInterfaceLink"> 216 <li><a href="{$library_name}?a=p&sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li> 217 </xsl:template> 218 <xsl:template name="greenstoneLogoAlternateText"> 219 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 220 </xsl:template> 221 222 <!-- about page - collection home ....................................................................... --> 223 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 224 <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 225 <xsl:param name="pageType"/> 226 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/> 227 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/> 228 229 230 <xsl:template name="aboutCollectionPageTitle"> 231 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 232 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/><xsl:text> </xsl:text> 233 </xsl:template> 234 235 236 <xsl:template name="collectionHomeLinkWithLogoIfAvailable"> 237 <a href="{$library_name}?a=p&sa=about&c={$collName}"> 238 <xsl:choose> 239 <xsl:when test="$this-element/displayItem[@name='icon']"> 240 <img border="0"> 241 <xsl:attribute name="src"> 242 <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/> 243 </xsl:attribute> 244 <xsl:attribute name="alt"> 245 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 246 </xsl:attribute> 247 <xsl:attribute name="title"> 248 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/> 249 </xsl:attribute> 250 </img> 251 </xsl:when> 252 <xsl:otherwise> 253 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 254 </xsl:otherwise> 255 </xsl:choose> 256 </a> 257 </xsl:template> 258 259 260 <xsl:template name="homeButtonTop"> 261 <a href="{$library_name}?a=p&sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute> 262 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></a> 263 </xsl:template> 264 265 266 <xsl:template name="helpButtonTop"> 368 </xsl:choose> 369 </p> 370 <xsl:if test="service"> 371 <div id="servicelist"> 372 <xsl:for-each select="service"> 373 <xsl:sort select="position()" order="descending" data-type="number"/> 374 <xsl:variable name="action"> 375 <xsl:choose> 376 <xsl:when test="@type='query'">q</xsl:when> 377 <xsl:when test="@type='browse'">b</xsl:when> 378 <xsl:when test="@type='process'">pr</xsl:when> 379 <xsl:when test="@type='applet'">a</xsl:when> 380 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 381 </xsl:choose> 382 </xsl:variable> 383 <xsl:if test="$action != 'DO_NOT_DISPLAY'"> 384 <div class="paramLabel"> 385 <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"> 386 <xsl:value-of select="displayItem[@name='name']"/> 387 </a> 388 </div> 389 <div class="paramLabel"> 390 <xsl:value-of select="displayItem[@name='description']"/> 391 </div> 392 <br class="clear"/> 393 </xsl:if> 394 </xsl:for-each> 395 </div> 396 </xsl:if> 397 </xsl:if> 398 </xsl:template> 399 <!-- classifier page ............................................................................ --> 400 <xsl:template name="collapsedNavigationTab"> 401 <xsl:param name="type"/> 402 <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/> 403 <li> 404 <xsl:if test="$isCurrent"> 405 <xsl:attribute name="class">current</xsl:attribute> 406 </xsl:if> 407 <a> 408 <xsl:if test="service[@name=$type]/displayItem[@name='description']"> 409 <xsl:attribute name="title"> 410 <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/> 411 </xsl:attribute> 412 </xsl:if> 413 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=q&rt=d&s=<xsl:value-of select="service[@type=$type]/@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute> 414 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/> 415 </a> 416 </li> 417 </xsl:template> 418 <xsl:template name="navigationTab"> 419 <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/> 420 <xsl:variable name="action"> 421 <xsl:choose> 422 <xsl:when test="@type='query'">q</xsl:when> 423 <xsl:when test="@type='browse'">b</xsl:when> 424 <xsl:when test="@type='process'">pr</xsl:when> 425 <xsl:when test="@type='applet'">a</xsl:when> 426 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 427 </xsl:choose> 428 </xsl:variable> 429 <xsl:if test="$action!='DO_NOT_DISPLAY'"> 430 <li> 431 <xsl:if test="$isCurrent"> 432 <xsl:attribute name="class">current</xsl:attribute> 433 </xsl:if> 434 <a> 435 <xsl:if test="displayItem[@name='description']"> 436 <xsl:attribute name="title"> 437 <xsl:value-of select="displayItem[@name='description']"/> 438 </xsl:attribute> 439 </xsl:if> 440 <xsl:choose> 441 <xsl:when test="classifierList/classifier/@name"> 442 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&rt=s&s=<xsl:value-of select="@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&cl=<xsl:value-of select="classifierList/classifier/@name"/></xsl:attribute> 443 </xsl:when> 444 <xsl:otherwise> 445 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&rt=d&s=<xsl:value-of select="@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute> 446 </xsl:otherwise> 447 </xsl:choose> 448 <xsl:value-of select="displayItem[@name='name']"/> 449 </a> 450 </li> 451 </xsl:if> 452 </xsl:template> 453 <xsl:template name="classifierLink"> 454 <xsl:if test="@name=/page/pageResponse/classifier/@name"> 455 <xsl:attribute name="class">current</xsl:attribute> 456 </xsl:if> 457 <a href="{$library_name}?a=b&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}"> 458 <xsl:value-of select="displayItem[@name='description']"/> 459 </a> 460 </xsl:template> 461 <!-- query page ............................................................................ --> 462 <xsl:template name="indexName"> 463 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 464 </xsl:template> 465 <xsl:template name="queryPageCollectionName"> 267 466 <xsl:choose> 268 <xsl:when test=" $pageType='help'">269 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>467 <xsl:when test="/page/pageResponse/collection"> 468 <gslib:aboutCollectionPageTitle/> 270 469 </xsl:when> 271 <xsl:otherwise> 272 <li><a href="{$library_name}?a=p&sa=help&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 273 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 274 </a></li> 275 </xsl:otherwise> 470 <xsl:otherwise>Cross-Collection</xsl:otherwise> 276 471 </xsl:choose> 277 </xsl:template> 278 279 280 <xsl:template name="preferencesButtonTop"> 281 <xsl:choose> 282 <xsl:when test="$pageType='pref'"> 283 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li> 284 </xsl:when> 285 <xsl:otherwise> 286 <li><a href="{$library_name}?a=p&sa=pref&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 287 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 288 </a></li> 289 </xsl:otherwise> 290 </xsl:choose> 291 </xsl:template> 292 293 <xsl:template name="servicesNavigationBar"> 294 <xsl:for-each select="$this-element/serviceList/service"> 295 <xsl:variable name="action"><xsl:choose> 296 <xsl:when test="@name=$this-service">CURRENT</xsl:when> 297 <xsl:when test="@type='query'">q</xsl:when> 298 <xsl:when test="@type='browse'">b</xsl:when> 299 <xsl:when test="@type='process'">pr</xsl:when> 300 <xsl:when test="@type='applet'">a</xsl:when> 301 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 302 </xsl:choose></xsl:variable> 303 <xsl:choose> 304 <xsl:when test="$action='CURRENT'"> 305 <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li> 306 </xsl:when> 307 <xsl:when test="$action !='DO_NOT_DISPLAY'"> 308 <li><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li> 309 </xsl:when> 310 </xsl:choose> 311 </xsl:for-each> 312 </xsl:template> 313 314 315 <xsl:template name="collectionDescriptionTextAndServicesLinks"> 316 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/> 317 </xsl:template> 318 319 <xsl:template match="collection|serviceCluster"> 320 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 321 <xsl:apply-templates select="serviceList"> 322 <xsl:with-param name="collName" select="$collName"/> 323 </xsl:apply-templates> 324 </xsl:template> 325 326 327 <xsl:template match="serviceList"> 328 <xsl:param name="collName"/> 329 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3> 330 <p> 331 <xsl:choose> 332 <xsl:when test="service"> 333 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/> 334 </xsl:when> 335 <xsl:otherwise> 336 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/> 337 </xsl:otherwise> 338 </xsl:choose> 339 </p> 340 341 <xsl:if test="service"> 342 <div id="servicelist"> 343 <xsl:for-each select="service"> 344 <xsl:sort select="position()" order="descending" data-type="number"/> 345 346 <xsl:variable name="action"><xsl:choose> 347 <xsl:when test="@type='query'">q</xsl:when> 348 <xsl:when test="@type='browse'">b</xsl:when> 349 <xsl:when test="@type='process'">pr</xsl:when> 350 <xsl:when test="@type='applet'">a</xsl:when> 351 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 352 </xsl:choose></xsl:variable> 353 <xsl:if test="$action != 'DO_NOT_DISPLAY'"> 354 <div class="paramLabel"><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a></div> 355 <div class="paramLabel"><xsl:value-of select="displayItem[@name='description']"/></div> 356 <br class="clear"/> 357 </xsl:if> 358 </xsl:for-each> 359 </div> 360 </xsl:if> 361 </xsl:template> 362 363 364 365 <!-- classifier page ............................................................................ --> 366 367 <xsl:template name="collapsedNavigationTab"> 368 <xsl:param name="type"/> 369 <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/> 370 <li> 371 <xsl:if test="$isCurrent"> 372 <xsl:attribute name="class">current</xsl:attribute> 373 </xsl:if> 374 <a> 375 <xsl:if test="service[@name=$type]/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/></xsl:attribute></xsl:if> 376 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=q&rt=d&s=<xsl:value-of select="service[@type=$type]/@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute> 377 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/> 378 </a> 379 </li> 380 </xsl:template> 381 382 <xsl:template name="navigationTab"> 383 384 <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/> 385 386 <xsl:variable name="action"><xsl:choose> 387 <xsl:when test="@type='query'">q</xsl:when> 388 <xsl:when test="@type='browse'">b</xsl:when> 389 <xsl:when test="@type='process'">pr</xsl:when> 390 <xsl:when test="@type='applet'">a</xsl:when> 391 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 392 </xsl:choose></xsl:variable> 393 394 <xsl:if test="$action!='DO_NOT_DISPLAY'"> 395 <li> 396 <xsl:if test="$isCurrent"> 397 <xsl:attribute name="class">current</xsl:attribute> 398 </xsl:if> 399 <a> 400 <xsl:if test="displayItem[@name='description']"> 401 <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute> 402 </xsl:if> 403 <xsl:choose> 404 <xsl:when test="classifierList/classifier/@name"> 405 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&rt=s&s=<xsl:value-of select="@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&cl=<xsl:value-of select="classifierList/classifier/@name"/></xsl:attribute> 406 </xsl:when> 407 <xsl:otherwise> 408 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&rt=d&s=<xsl:value-of select="@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute> 409 </xsl:otherwise> 410 </xsl:choose> 411 <xsl:value-of select="displayItem[@name='name']"/> 412 </a> 413 </li> 414 </xsl:if> 415 416 </xsl:template> 417 418 419 <xsl:template name="classifierLink"> 420 <xsl:if test="@name=/page/pageResponse/classifier/@name"><xsl:attribute name="class">current</xsl:attribute></xsl:if> 421 <a href="{$library_name}?a=b&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}"> 422 <xsl:value-of select="displayItem[@name='description']"/> 423 </a> 424 </xsl:template> 425 426 <!-- query page ............................................................................ --> 427 428 <xsl:template name="indexName"> 429 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 430 </xsl:template> 431 432 <xsl:template name="queryPageCollectionName"> 433 <xsl:choose><xsl:when test="/page/pageResponse/collection"><gslib:aboutCollectionPageTitle/></xsl:when><xsl:otherwise>Cross-Collection</xsl:otherwise></xsl:choose> 434 </xsl:template> 435 436 437 438 439 440 <!-- 472 </xsl:template> 473 <!-- 441 474 BERRY BASKET TEMPLATES 442 475 These get used on many different pages to add the 443 476 berry basket function to the site 444 477 --> 445 446 <!-- put the drag&drop berry basket on the page --> 447 <xsl:template name="berryBasket"> 448 <xsl:if test="$berryBasketOn"> 449 <div id="berrybasket" class="hide"> 450 <span>Berry Basket</span> 451 <span id="berryBasketExpandCollapseLinks" style="display: none;"> 452 <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a> 453 <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a> 454 </span> 455 <div id="baskethandle"><span><xsl:text> </xsl:text></span></div> 456 <div id ="berries"><span><xsl:text> </xsl:text></span></div> 457 </div> 458 </xsl:if> 459 </xsl:template> 460 461 <!-- include the required javascript and css for berry baskets --> 462 <xsl:template name="berryBasketHeadTags"> 463 <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script> 464 <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script> 465 <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script> 466 <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script> 467 <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script> 468 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script> 469 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script> 470 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script> 471 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 472 </xsl:template> 473 474 <!-- 478 <!-- put the drag&drop berry basket on the page --> 479 <xsl:template name="berryBasket"> 480 <xsl:if test="$berryBasketOn"> 481 <div id="berrybasket" class="hide"> 482 <span>Berry Basket</span> 483 <span id="berryBasketExpandCollapseLinks" style="display: none;"> 484 <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a> 485 <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a> 486 </span> 487 <div id="baskethandle"> 488 <span> 489 <xsl:text> </xsl:text> 490 </span> 491 </div> 492 <div id="berries"> 493 <span> 494 <xsl:text> </xsl:text> 495 </span> 496 </div> 497 </div> 498 </xsl:if> 499 </xsl:template> 500 <!-- include the required javascript and css for berry baskets --> 501 <xsl:template name="berryBasketHeadTags"> 502 <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script> 503 <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script> 504 <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script> 505 <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script> 506 <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script> 507 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script> 508 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script> 509 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script> 510 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 511 </xsl:template> 512 <!-- 475 513 create a little berry which can be drag&dropped onto the berry basket 476 514 used on classifier and search result pages 477 515 --> 478 <xsl:template name="documentBerryForClassifierOrSearchPage"> 479 <xsl:if test="$berryBasketOn"> 480 <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"> 481 <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute> 482 </img> 483 </xsl:if> 484 </xsl:template> 485 486 <!-- 516 <xsl:template name="documentBerryForClassifierOrSearchPage"> 517 <xsl:if test="$berryBasketOn"> 518 <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"> 519 <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute> 520 </img> 521 </xsl:if> 522 </xsl:template> 523 <!-- 487 524 create little berrys which can be drag&dropped onto the berry basket 488 525 used on the document page 489 526 --> 490 <xsl:template name="documentBerryForDocumentPage"> 491 <xsl:variable name="selectedNode"><xsl:value-of select="/page/pageResponse/document/@selectedNode"/></xsl:variable> 492 <xsl:variable name="rootNode"><xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/></xsl:variable> 493 494 <xsl:if test="$berryBasketOn"> 495 <div id="documentberries"> 496 <img class='pick' id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/> 497 <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span> 498 499 <xsl:if test="$selectedNode != $rootNode"> 500 <img class='pick' id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/> 501 <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span> 502 </xsl:if> 503 </div> 504 </xsl:if> 505 </xsl:template> 506 507 508 <!-- document page --> 509 <xsl:template name="documentTitle"> 510 <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/> 511 </xsl:template> 512 513 514 <xsl:template name="coverImage"> 515 <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img> 516 </xsl:template> 517 518 <xsl:template name="previousNextButtons"> 519 <!-- prev --> 520 <a> 521 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@selectedNode"/>.pp&sib=1&p.s=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.sa"]/@value'/>&p.a=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.a"]/@value'/></xsl:attribute> 522 <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/> 523 </a> 524 525 <!-- next --> 526 <a> 527 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@selectedNode"/>.np&sib=1&p.s=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.sa"]/@value'/>&p.a=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.a"]/@value'/></xsl:attribute> 528 <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/> 529 </a> 530 531 </xsl:template> 532 533 527 <xsl:template name="documentBerryForDocumentPage"> 528 <xsl:variable name="selectedNode"> 529 <xsl:value-of select="/page/pageResponse/document/@selectedNode"/> 530 </xsl:variable> 531 <xsl:variable name="rootNode"> 532 <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/> 533 </xsl:variable> 534 <xsl:if test="$berryBasketOn"> 535 <div id="documentberries"> 536 <img class="pick" id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/> 537 <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span> 538 <xsl:if test="$selectedNode != $rootNode"> 539 <img class="pick" id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/> 540 <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span> 541 </xsl:if> 542 </div> 543 </xsl:if> 544 </xsl:template> 545 <!-- document page --> 546 <xsl:template name="documentTitle"> 547 <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/> 548 </xsl:template> 549 <xsl:template name="coverImage"> 550 <img> 551 <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute> 552 </img> 553 </xsl:template> 554 <xsl:template name="previousNextButtons"> 555 <!-- prev --> 556 <a> 557 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@selectedNode"/>.pp&sib=1&p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name="p.s"]/@value"/>&p.sa=<xsl:value-of select="/page/pageRequest/paramList/param[@name="p.sa"]/@value"/>&p.a=<xsl:value-of select="/page/pageRequest/paramList/param[@name="p.a"]/@value"/></xsl:attribute> 558 <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/> 559 </a> 560 <!-- next --> 561 <a> 562 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@selectedNode"/>.np&sib=1&p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name="p.s"]/@value"/>&p.sa=<xsl:value-of select="/page/pageRequest/paramList/param[@name="p.sa"]/@value"/>&p.a=<xsl:value-of select="/page/pageRequest/paramList/param[@name="p.a"]/@value"/></xsl:attribute> 563 <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/> 564 </a> 565 </xsl:template> 534 566 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.