Skip to content

Commit b03b3f2

Browse files
committed
Added sorting missing formats by number of recommendations (#372)
1 parent 1e5d8c8 commit b03b3f2

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

SIS/clarin/views/sanity-check.xq

+18-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ declare option output:html-version "5";
1515
@author margaretha
1616
:)
1717

18+
let $sortBy := request:get-parameter('sortBy', '')
19+
1820
let $recommendations-strange-domains := sc:get-recommendations-with-missing-or-unknown-domains()
1921
let $recommendations-strange-levels := sc:get-recommendations-with-missing-or-unknown-levels()
2022
let $similar-recommendations := sc:get-similar-recommendations()
23+
24+
let $missingFormats := fm:list-missing-format-ids($sortBy)
25+
let $numOfMissingFormats := count($missingFormats)
26+
2127
return
2228

2329
<html lang="en">
@@ -50,16 +56,26 @@ return
5056
</div>
5157

5258
<div id="missing">
53-
<h2>List of missing format descriptions ({fm:count-missing-format-ids()}): </h2>
59+
<h2>List of missing format descriptions ({$numOfMissingFormats}): </h2>
5460
<p>The formats listed below are referenced by recommendations, but not yet described <a href="{app:link("views/list-formats.xq")}">inside the SIS</a>.
5561
Clicking on a format name below opens a list of centres whose recommendations reference that format. The number of such centres is shown in brackets.
5662
Clicking on the ⊕ character opens a pre-configured GitHub issue where you can suggest the content of the format description. Clicking on the
5763
<img src="{app:resource("copy.png","image")}" width="12" /> symbol copies the format ID, e.g. to be used in editing format recommendations.</p>
5864
<p>The list is also part of the sanity checking functionality: it may happen that some recommendation has a typo in the format ID, and then it
5965
will show up here.</p>
66+
67+
<p>
68+
<form id ="missing-form" action="{app:link("views/sanity-check.xq?#missing-form")}">
69+
<button name="sortBy" class="button" style="margin-right:15px;height:30px;width:200px;"
70+
type="submit" value= "id">Sort by Format Ids </button>
71+
<button name="sortBy" class="button" style="margin:0;height:30px;width:300px;"
72+
type="submit" value= "recommendation">Sort by Number of Recommendations</button>
73+
</form>
74+
</p>
75+
6076
<div style="column-count: 3;">
6177
<ul style="margin: 0; padding-left:15px;">
62-
{fm:list-missing-format-ids()}
78+
{$missingFormats}
6379
</ul>
6480
</div>
6581
</div>

0 commit comments

Comments
 (0)