Commit d7ec21d2 authored by barth23's avatar barth23
Browse files

modals integration complete

parent 63655202
......@@ -28,6 +28,25 @@ else if ($button_parameter = "places") then doc("/db/apps/sade-architrave/templa
else if ($button_parameter = "works") then doc("/db/apps/sade-architrave/templates/register/works.xml")//tei:item/tei:name[@xml:lang=$language]
else();
declare variable $entityClass :=
if ($button_parameter = "persons") then "persName"
else if ($button_parameter = "places") then "placeName"
else if ($button_parameter = "works") then "ArtWork"
else();
declare variable $entityAbbr :=
if ($button_parameter = "persons") then "psn"
else if ($button_parameter = "places") then "plc"
else if ($button_parameter = "works") then "wrk"
else();
declare variable $openEntity :=
if ($button_parameter = "persons") then "openPersName"
else if ($button_parameter = "places") then "openPlaceName"
else if ($button_parameter = "works") then "openArtWork"
else();
declare variable $entityElements :=
if ($button_parameter = "persons") then doc("/db/apps/sade-architrave/templates/register/persons.xml")//tei:person
else if ($button_parameter = "places") then doc("/db/apps/sade-architrave/templates/register/places.xml")//tei:place
......@@ -54,10 +73,26 @@ else
(:
for $index in (1 to count($entityElements))
where starts-with($place, $letter_value) :)
let $tgUri := data($entityElements[$pos]/@xml:id)
where matches(string($EntityNames[$pos]), $letter_query)
order by $EntityName/text()
return
element xhtml:li
{
element xhtml:a
{
attribute class {$entityClass},
attribute href {"#"},
attribute onclick {$openEntity || "('" || $entityAbbr || ":" || $tgUri || "')"},
attribute textgriduri {"('" || $entityAbbr || ":" || $tgUri || "')"},
$EntityName
}
}
(:
<li><a class="placeName" href="#" onclick="openPlaceName('plc:textgrid:3pg0g')" textgriduri="plc:textgrid:3pg0g">{$EntityName}, {data($entityElements[$pos]/@xml:id)}</a></li>
:)
}
</ul>
</div>
\ No newline at end of file
Supports Markdown
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