Commit 5e1b64da authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

sort work items in index on personal entities

parent 9aa11ba8
...@@ -5,7 +5,7 @@ xquery version "3.1"; ...@@ -5,7 +5,7 @@ xquery version "3.1";
: the index for a single notebook. : the index for a single notebook.
: The corresponding viewer module is `index-viewer.xqm`. : The corresponding viewer module is `index-viewer.xqm`.
: @author Mathias Göbel : @author Mathias Göbel
: @version 1.0.1 : @version 1.0.2
: @see https://fontane-nb.dariah.eu/register.html : @see https://fontane-nb.dariah.eu/register.html
:) :)
module namespace ixp="http://fontane-nb.dariah.eu/index-processor"; module namespace ixp="http://fontane-nb.dariah.eu/index-processor";
...@@ -385,6 +385,7 @@ element xhtml:li { ...@@ -385,6 +385,7 @@ element xhtml:li {
let $target := $creator/@target => substring-before(" ") let $target := $creator/@target => substring-before(" ")
let $targetId := $target => substring-after(":") let $targetId := $target => substring-after(":")
let $targetNode := $ixp:dataCollection/id($targetId) let $targetNode := $ixp:dataCollection/id($targetId)
let $title := string($targetNode/*[1])
let $htmlResource := let $htmlResource :=
(: TODO remove condition_s_ for final production release :) (: TODO remove condition_s_ for final production release :)
if($targetNode) if($targetNode)
...@@ -393,6 +394,7 @@ element xhtml:li { ...@@ -393,6 +394,7 @@ element xhtml:li {
then "two entities with same ID: " || $targetId then "two entities with same ID: " || $targetId
else ixp:get-list-by-entity( $targetNode ) else ixp:get-list-by-entity( $targetNode )
else "target-not-available" else "target-not-available"
order by $title
return return
element xhtml:li { element xhtml:li {
attribute class {"item"}, attribute class {"item"},
...@@ -400,7 +402,7 @@ element xhtml:li { ...@@ -400,7 +402,7 @@ element xhtml:li {
attribute href { "register.html?e=" || string-join($targetId) }, attribute href { "register.html?e=" || string-join($targetId) },
if($targetNode[2]) if($targetNode[2])
then "two entities with same ID: " || $targetId then "two entities with same ID: " || $targetId
else string($targetNode/*[1]) else $title
}, },
text{ " " }, text{ " " },
element xhtml:span { element xhtml:span {
...@@ -1481,3 +1483,4 @@ else ...@@ -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