Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort resources numerically, so 3 < 22 < 111 #291

Merged
merged 1 commit into from Feb 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/collections.xql
Expand Up @@ -47,7 +47,7 @@ declare function local:sub-collections($root as xs:string, $children as xs:strin
let $processChild :=
local:collections(concat($root, '/', $child), $child, $user)
where exists($processChild)
order by $child ascending
order by $child collation "http://www.w3.org/2013/collation/UCA?numeric=yes"
return
<children json:array="true">
{ $processChild }
Expand Down Expand Up @@ -91,7 +91,7 @@ declare function local:list-collection-contents($collection as xs:string, $user
return
$r
for $resource in ($subcollections, $resources)
order by $resource ascending
order by $resource collation "http://www.w3.org/2013/collation/UCA?numeric=yes"
return
$resource
};
Expand Down Expand Up @@ -133,7 +133,7 @@ declare function local:resources($collection as xs:string, $user as xs:string) {
else
concat($collection, "/", $resource)
where sm:has-access(xs:anyURI($path), "r")
order by $resource ascending
order by $resource collation "http://www.w3.org/2013/collation/UCA?numeric=yes"
return
let $permissions := sm:get-permissions(xs:anyURI($path))/sm:permission
let $owner := $permissions/@owner/string()
Expand Down Expand Up @@ -434,7 +434,7 @@ declare function local:edit-properties($resources as xs:string*) {
<select name="owner">
{
for $user in $users
order by $user
order by $user collation "http://www.w3.org/2013/collation/UCA?numeric=yes"
return
<option value="{$user}">
{
Expand All @@ -453,7 +453,7 @@ declare function local:edit-properties($resources as xs:string*) {
<select name="group">
{
for $group in sm:list-groups()
order by $group
order by $group collation "http://www.w3.org/2013/collation/UCA?numeric=yes"
return
<option value="{$group}">
{
Expand Down