From: <jen...@us...> - 2013-07-12 10:47:07
|
Revision: 18674 http://sourceforge.net/p/exist/code/18674 Author: jenspetersen Date: 2013-07-12 10:47:03 +0000 (Fri, 12 Jul 2013) Log Message: ----------- [tamboti] changes to integration of ziziphus and wiki in tamboti. Modified Paths: -------------- apps/tamboti/modules/search/collections.xql apps/tamboti/themes/default/modules/session.xql Modified: apps/tamboti/modules/search/collections.xql =================================================================== --- apps/tamboti/modules/search/collections.xql 2013-07-12 10:30:30 UTC (rev 18673) +++ apps/tamboti/modules/search/collections.xql 2013-07-12 10:47:03 UTC (rev 18674) @@ -68,7 +68,7 @@ :) declare function col:create-tree-node($title as xs:string, $collection-path as xs:string, $is-folder as xs:boolean, $icon-path as xs:string?, $tooltip as xs:string?, $writeable as xs:boolean, $additonal-classes as xs:string*, $expand as xs:boolean, $has-lazy-children as xs:boolean, $explicit-children as element(node)*) as element(node) { <node> - <title>{uu:unescape-collection-path($title)}</title> + <title>{translate(uu:unescape-collection-path($title), '_', ' ')}</title> <key>{uu:unescape-collection-path($collection-path)}</key> <isFolder>{$is-folder}</isFolder> <writeable>{$writeable}</writeable> Modified: apps/tamboti/themes/default/modules/session.xql =================================================================== --- apps/tamboti/themes/default/modules/session.xql 2013-07-12 10:30:30 UTC (rev 18673) +++ apps/tamboti/themes/default/modules/session.xql 2013-07-12 10:47:03 UTC (rev 18674) @@ -211,10 +211,10 @@ <abbr class="unapi-id" title="{bs:get-item-uri($item/@ID)}"></abbr> { let $collection := util:collection-name($item) - let $collection-short := functx:replace-first($collection, '/db/', '') + let $collection := translate(functx:replace-first($collection, '/db/', ''), '_', ' ') let $clean := clean:cleanup($item) return - retrieve-mods:format-detail-view(string($currentPos), $clean, $collection-short) + retrieve-mods:format-detail-view(string($currentPos), $clean, $collection) (: What is $currentPos used for? :) } </td> @@ -292,14 +292,13 @@ </td> <td class="detail-xml" style="vertical-align:top;"> { bs:toolbar($item, $isWritable, $id) } - <!--NB: why is this phoney HTML tag used to anchor the Zotero unIPA?--> <!--Zotero does not import vra records <abbr class="unapi-id" title="{bs:get-item-uri(concat($item, $id-position))}"></abbr>--> { let $collection := util:collection-name($item) - let $collection-short := functx:replace-first($collection, '/db/', '') + let $collection := translate(functx:replace-first($collection, '/db/', ''), '_', ' ') let $clean := clean:cleanup($item) return - retrieve-vra:format-detail-view(string($currentPos), $clean, $collection-short, $type, $id) + retrieve-vra:format-detail-view(string($currentPos), $clean, $collection, $type, $id) } </td> </tr> @@ -331,10 +330,10 @@ <!--Zotero does not import tei records <abbr class="unapi-id" title="{bs:get-item-uri(concat($item, $id-position))}"></abbr>--> { let $collection := util:collection-name($item) - let $collection-short := functx:replace-first($collection, '/db/', '') + let $collection := translate(functx:replace-first($collection, '/db/', ''), '_', ' ') let $clean := clean:cleanup($item) return - retrieve-tei:format-detail-view(string($currentPos), $clean, $collection-short, $document-uri, $node-id) + retrieve-tei:format-detail-view(string($currentPos), $clean, $collection, $document-uri, $node-id) } </td> </tr> @@ -363,10 +362,10 @@ <a> { let $collection := util:collection-name($item) - let $collection-short := functx:replace-first($collection, '/db/', '') + let $collection := translate(functx:replace-first($collection, '/db/', ''), '_', ' ') let $clean := clean:cleanup($item) return - retrieve-mods:format-list-view(string($currentPos), $clean, $collection-short) + retrieve-mods:format-list-view(string($currentPos), $clean, $collection) (: Originally $item was passed to retrieve-mods:format-list-view() - was there a reason for that? Performance? :) } </a> @@ -406,10 +405,10 @@ <a> { let $collection := util:collection-name($item) - let $collection-short := functx:replace-first($collection, '/db/', '') + let $collection := translate(functx:replace-first($collection, '/db/', ''), '_', ' ') let $clean := clean:cleanup($item) return - retrieve-vra:format-list-view(string($currentPos), $clean, $collection-short) + retrieve-vra:format-list-view(string($currentPos), $clean, $collection) } </a> </td> @@ -445,10 +444,10 @@ <a> { let $collection := util:collection-name($item) - let $collection-short := functx:replace-first($collection, '/db/', '') + let $collection := translate(functx:replace-first($collection, '/db/', ''), '_', ' ') (:let $clean := clean:cleanup($item):) return - retrieve-tei:format-list-view(string($currentPos), $item, $collection-short, $document-uri, $node-id) + retrieve-tei:format-list-view(string($currentPos), $item, $collection, $document-uri, $node-id) } </a> </td> @@ -553,30 +552,32 @@ else () return <div class="actions-toolbar"> - <a target="_new" href="source.xql?id={$id}&clean=yes"> + <a target="_new" href="source.xql?id={$id}&clean=yes"> <img title="View XML Source of Record" src="theme/images/script_code.png"/> </a> { (: if the item's collection is writable, display edit/delete and move buttons :) if ($isWritable) - then ( - if (xmldb:collection-available("/db/apps/ziziphus/") and name($item) eq 'vra') - then ( - <a target="_new" href="/exist/apps/ziziphus/record.html?id={$id}&workdir={$workdir}&imagepath={$imagepath}"> - <img title="Edit VRA Record" src="theme/images/page_edit.png"/> - </a> - ) else (), - if (name($item) eq 'mods') - then - <a href="../edit/edit.xq?id={$item/@ID}&collection={util:collection-name($item)}&type={$item/mods:extension/*:template}"> - <img title="Edit MODS Record" src="theme/images/page_edit.png"/> - </a> - else () - , - <a class="remove-resource" href="#{$id}"><img title="Delete Record" src="theme/images/delete.png"/></a>, - <a class="move-resource" href="#{$id}"><img title="Move Record" src="theme/images/shape_move_front.png"/></a>, - $upload-button - + then + ( + if (xmldb:collection-available("/db/apps/ziziphus/") and name($item) eq 'vra') + then + <a target="_new" href="/exist/apps/ziziphus/record.html?id={$id}&workdir={$workdir}&imagepath={$imagepath}"> + <img title="Edit VRA Record" src="theme/images/page_edit.png"/> + </a> + else + if (name($item) eq 'mods') + then + <a href="../edit/edit.xq?id={$item/@ID}&collection={util:collection-name($item)}&type={$item/mods:extension/*:template}"> + <img title="Edit MODS Record" src="theme/images/page_edit.png"/> + </a> + else () + , + <a class="remove-resource" href="#{$id}"><img title="Delete Record" src="theme/images/delete.png"/></a> + , + <a class="move-resource" href="#{$id}"><img title="Move Record" src="theme/images/shape_move_front.png"/></a> + , + $upload-button ) else () } |