Commit a54cc05f authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

sort work items in index on personal entities

related to #126
parent 9a778ced
......@@ -5,7 +5,7 @@ xquery version "3.1";
: the index for a single notebook.
: The corresponding viewer module is `index-viewer.xqm`.
: @author Mathias Göbel
: @version 1.0.1
: @version 1.0.2
: @see https://fontane-nb.dariah.eu/register.html
:)
module namespace ixp="http://fontane-nb.dariah.eu/index-processor";
......@@ -385,6 +385,7 @@ element xhtml:li {
let $target := $creator/@target => substring-before(" ")
let $targetId := $target => substring-after(":")
let $targetNode := $ixp:dataCollection/id($targetId)
let $title := string($targetNode/*[1])
let $htmlResource :=
(: TODO remove condition_s_ for final production release :)
if($targetNode)
......@@ -393,6 +394,7 @@ element xhtml:li {
then "two entities with same ID: " || $targetId
else ixp:get-list-by-entity( $targetNode )
else "target-not-available"
order by $title
return
element xhtml:li {
attribute class {"item"},
......@@ -400,7 +402,7 @@ element xhtml:li {
attribute href { "register.html?e=" || string-join($targetId) },
if($targetNode[2])
then "two entities with same ID: " || $targetId
else string($targetNode/*[1])
else $title
},
text{ " " },
element xhtml:span {
......@@ -1481,3 +1483,4 @@ else
}
}
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment