Foundry support for series-search-widget und publication-search-widget

ccm-docs
Jens Pelzetter 2019-10-27 10:28:06 +01:00
parent ec94a9e1f7
commit 5fce9907ef
3 changed files with 284 additions and 2 deletions

View File

@ -1 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2017 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-->
<!--
Processes the publication search widget.
Author: Jens Pelzetter, jens.pelzetter@googlemail.com
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
xmlns:foundry="http://foundry.libreccm.org"
xmlns:nav="http://ccm.redhat.com/navigation"
exclude-result-prefixes="xsl bebop cms foundry nav"
version="2.0">
<xsl:template match="cms:publication-search-widget">
<div class="publication-search-widget">
<xsl:choose>
<xsl:when test="./cms:selected-publication">
<p>
<xsl:value-of select="./cms:selected-publication/@title" />
</p>
<input type="hidden"
id="{./@name}"
value="{./selected-publication/@publicationId}" />
</xsl:when>
<xsl:otherwise>
<p id="{concat(./@name, '-selected')}">
<strong>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/no-publication-selected')" />
</strong>
</p>
<input type="hidden"
id="{./@name}"
name="{./@name}" />
</xsl:otherwise>
</xsl:choose>
<button id="{concat(./@name, 'select-publication-button')}"
type="button"
class="select-publication-button"
data-publicationtype="{./@publication-type}"
data-contentsection="{./@content-section}"
data-dialogId="{concat(./@name, '-dialog')}"
data-target="{./@name}">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/select-publication-button')" />
</button>
<dialog id="{concat(./@name, '-dialog')}"
class="publication-search-widget-dialog"
data-publicationtype="{./@publication-type}"
data-contentsection="{./@content-section}"
data-dispatcherPrefix="{$dispatcher-prefix}"
data-targetId="{./@name}">
<h3 class="titlebar">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/titlebar')" />
<button type="button"
class="close-button"
data-dialogId="{concat(./@name, '-dialog')}">
<span>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/titlebar/close')" />
</span>
</button>
</h3>
<div class="controls">
<input type="hidden" id="{concat(./@name, '-last-focus')}" />
<label for="{concat(./@name, 'publication-filter')}">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/filter-list')" />
</label>
<input type="text" id="{concat(./@name, '-dialog-publication-filter')}" />
<button type="button"
class="apply-filter"
data-dialogId="{concat(./@name, '-dialog')}">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/filter-list/apply')" />
</button>
</div>
<div class="selectable-publications">
<table>
<thead>
<tr>
<th>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/table/header/title')" />
</th>
<th>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/table/header/type')" />
</th>
<th>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'publication-search-widget/table/header/place')" />
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$publicationStr
</td>
<td>
$type
</td>
</tr>
</tbody>
</table>
</div>
</dialog>
</div>
</xsl:template>
</xsl:stylesheet>

View File

@ -20,7 +20,7 @@
*/ */
--> -->
<!-- <!--
Processes the publisher search widget. Processes the series search widget.
Author: Jens Pelzetter, jens.pelzetter@googlemail.com Author: Jens Pelzetter, jens.pelzetter@googlemail.com
--> -->
@ -38,10 +38,73 @@
<xsl:choose> <xsl:choose>
<xsl:when test="./cms:selected-series"> <xsl:when test="./cms:selected-series">
<p> <p>
<xsl:value-of select=" <xsl:value-of select="./cms:selected-series/@name" />
</p> </p>
<input type="hidden"
id="{./@name}"
value="{./selected-series/@seriesId}" />
</xsl:when> </xsl:when>
<xsl:otherwise>
<p id="{concat(./@name, '-selected')">
<strong>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/no-series-selected')" />
</strong>
</p>
</xsl:otherwise>
</xsl:choose> </xsl:choose>
<button id="{concat(./@name, 'select-series-button')}"
type="button"
class="select-series-button"
data-dialogId="{concat(./@name, '-dialog')}"
data-target="{./@name}">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/select-series-button')" />
</button>
<dialog id="{concat(./@name, '-dialog')}"
class="series-search-widget-dialog"
data-dispatcherPrefix="{$dispatcher-prefix}"
data-targetId="{./@name}">
<h3 class="titlebar">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/titlebar')" />
<button type="button"
class="close-button"
data-dialogId="{concat(./@name, '-dialog')}">
<span>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/titlebar/close')" />
</span>
</button>
</h3>
<div class="controls">
<input type="hidden" id="{concat(./@name, '-last-focus')}" />
<label for="{concat(./@name, 'series-filter')}">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/filter-list')" />
</label>
<input type="text" id="{concat(./@name, '-dialog-series-filter')}" />
<button type="button"
class="apply-filter"
data-dialogId="{concat(./@name, '-dialog')}">
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/filter-list/apply')" />
</button>
</div>
<div class="selectable-seriess">
<table>
<thead>
<tr>
<th>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/table/header/name')" />
</th>
<th>
<xsl:value-of select="foundry:get-internal-static-text('cms', 'series-search-widget/table/header/place')" />
</th>
</tr>
</thead>
</table>
<tbody>
<tr>
<td>$name</td>
</tr>
</tbody>
</div>
</dialog>
</div> </div>
</xsl:template> </xsl:template>

View File

@ -204,6 +204,97 @@
<translation lang="en">Close without selecting an publisher</translation> <translation lang="en">Close without selecting an publisher</translation>
</text> </text>
<text id="publication-search-widget/filter-list">
<translation lang="de">Filtern nach</translation>
<translation lang="en">Filter using</translation>
</text>
<text id="publication-search-widget/filter-list/apply">
<translation lang="de">Anwenden</translation>
<translation lang="en">Apply</translation>
</text>
<text id="publication-search-widget/no-publication-selected">
<translation lang="de">Keine Publikation ausgewählt</translation>
<translation lang="en">No publication selected</translation>
</text>
<text id="publication-search-widget/selected-publication">
<translation lang="de">Ausgewählte Publikation</translation>
<translation lang="en">Selected publication</translation>
</text>
<text id="publication-search-widget/selected-publication-name">
<translation lang="de">Publikation</translation>
<translation lang="en">Publication</translation>
</text>
<text id="publication-search-widget/selected-publication-type">
<translation lang="de">Type</translation>
<translation lang="en">Typ</translation>
</text>
<text id="publication-search-widget/select-publication-button">
<translation lang="de">Publikation auswählen</translation>
<translation lang="en">Select publication</translation>
</text>
<text id="publication-search-widget/table/header/name">
<translation lang="de">Name</translation>
<translation lang="en">Name</translation>
</text>
<text id="publication-search-widget/table/header/place">
<translation lang="de">Name</translation>
<translation lang="en">Name</translation>
</text>
<text id="publication-search-widget/titlebar">
<translation lang="de">Wählen Sie den zu verwendende Publikation aus</translation>
<translation lang="en">Select the publication to use</translation>
</text>
<text id="publication-search-widget/titlebar/close">
<translation lang="de">Ohne Auswahl schließen</translation>
<translation lang="en">Close without selecting an </translation>
</text>
<text id="series-search-widget/filter-list">
<translation lang="de">Filtern nach</translation>
<translation lang="en">Filter using</translation>
</text>
<text id="series-search-widget/filter-list/apply">
<translation lang="de">Anwenden</translation>
<translation lang="en">Apply</translation>
</text>
<text id="series-search-widget/no-series-selected">
<translation lang="de">Keine Reihe ausgewählt</translation>
<translation lang="en">No series selected</translation>
</text>
<text id="series-search-widget/selected-series">
<translation lang="de">Ausgewählte Reihe</translation>
<translation lang="en">Selected series</translation>
</text>
<text id="series-search-widget/selected-series-name">
<translation lang="de">Name</translation>
<translation lang="en">Name</translation>
</text>
<text id="series-search-widget/selected-series-type">
<translation lang="de">Type</translation>
<translation lang="en">Typ</translation>
</text>
<text id="series-search-widget/select-series-button">
<translation lang="de">Reihe auswählen</translation>
<translation lang="en">Select series</translation>
</text>
<text id="series-search-widget/table/header/name">
<translation lang="de">Name</translation>
<translation lang="en">Name</translation>
</text>
<text id="series-search-widget/table/header/place">
<translation lang="de">Name</translation>
<translation lang="en">Name</translation>
</text>
<text id="series-search-widget/titlebar">
<translation lang="de">Wählen Sie den zu verwendende Reihe aus</translation>
<translation lang="en">Select the series to use</translation>
</text>
<text id="series-search-widget/titlebar/close">
<translation lang="de">Ohne Auswahl schließen</translation>
<translation lang="en">Close without selecting an </translation>
</text>
<text id="summary/itemSummary/header"> <text id="summary/itemSummary/header">
<translation lang="en">Item Summary</translation> <translation lang="en">Item Summary</translation>
<translation lang="de">Zusammenfassung</translation> <translation lang="de">Zusammenfassung</translation>