Mandalay: Formatierungen
git-svn-id: https://svn.libreccm.org/ccm/trunk@2634 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0f42cbcd60
commit
ee43570f8e
|
|
@ -21,161 +21,161 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||||
exclude-result-prefixes="xsl bebop cms ui mandalay nav"
|
exclude-result-prefixes="xsl bebop cms ui mandalay nav"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
<xsl:template name="mandalay:languageSelector">
|
<xsl:template name="mandalay:languageSelector">
|
||||||
<xsl:param name="layoutTree" select="."/>
|
<xsl:param name="layoutTree" select="."/>
|
||||||
<xsl:param name="supportedLanguages">
|
<xsl:param name="supportedLanguages">
|
||||||
|
|
||||||
<!-- DE Entferne die Markierung für die Default-Sprache -->
|
<!-- DE Entferne die Markierung für die Default-Sprache -->
|
||||||
<!-- EN Remove the marking for default language -->
|
<!-- EN Remove the marking for default language -->
|
||||||
<xsl:call-template name="mandalay:string-replace">
|
<xsl:call-template name="mandalay:string-replace">
|
||||||
<xsl:with-param name="string">
|
<xsl:with-param name="string">
|
||||||
<xsl:call-template name="mandalay:string-replace">
|
<xsl:call-template name="mandalay:string-replace">
|
||||||
<xsl:with-param name="string" select="$languages"/>
|
<xsl:with-param name="string" select="$languages"/>
|
||||||
<xsl:with-param name="from" select="'['"/>
|
<xsl:with-param name="from" select="'['"/>
|
||||||
<xsl:with-param name="to" select="''"/>
|
<xsl:with-param name="to" select="''"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
<xsl:with-param name="from" select="']'"/>
|
<xsl:with-param name="from" select="']'"/>
|
||||||
<xsl:with-param name="to" select="''"/>
|
<xsl:with-param name="to" select="''"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:param>
|
</xsl:param>
|
||||||
|
|
||||||
<xsl:variable name="setLanguageNames">
|
<xsl:variable name="setLanguageNames">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="node" select="$layoutTree/setLanguageNames"/>
|
<xsl:with-param name="node" select="$layoutTree/setLanguageNames"/>
|
||||||
<xsl:with-param name="module" select="'languageSelector'"/>
|
<xsl:with-param name="module" select="'languageSelector'"/>
|
||||||
<xsl:with-param name="setting" select="'setLanguageNames'"/>
|
<xsl:with-param name="setting" select="'setLanguageNames'"/>
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:variable name="setLanguageNamesInCurrentLanguage">
|
<xsl:variable name="setLanguageNamesInCurrentLanguage">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="node" select="$layoutTree/setLanguageNamesInCurrentLanguage"/>
|
<xsl:with-param name="node" select="$layoutTree/setLanguageNamesInCurrentLanguage"/>
|
||||||
<xsl:with-param name="module" select="'languageSelector'"/>
|
<xsl:with-param name="module" select="'languageSelector'"/>
|
||||||
<xsl:with-param name="setting" select="'setLanguageNamesInCurrentLanguage'"/>
|
<xsl:with-param name="setting" select="'setLanguageNamesInCurrentLanguage'"/>
|
||||||
<xsl:with-param name="default" select="'false'"/>
|
<xsl:with-param name="default" select="'false'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:variable name="separator">
|
<xsl:variable name="separator">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="node" select="$layoutTree/separator"/>
|
<xsl:with-param name="node" select="$layoutTree/separator"/>
|
||||||
<xsl:with-param name="module" select="'languageSelector'"/>
|
<xsl:with-param name="module" select="'languageSelector'"/>
|
||||||
<xsl:with-param name="setting" select="'separator'"/>
|
<xsl:with-param name="setting" select="'separator'"/>
|
||||||
<xsl:with-param name="default" select="' | '"/>
|
<xsl:with-param name="default" select="' | '"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:variable name="langIter">
|
<xsl:variable name="langIter">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains($supportedLanguages, ' ')">
|
<xsl:when test="contains($supportedLanguages, ' ')">
|
||||||
<xsl:value-of select="substring-before($supportedLanguages, ' ')"/>
|
<xsl:value-of select="substring-before($supportedLanguages, ' ')"/>
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="$supportedLanguages"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:variable name="localizedLanguageText">
|
|
||||||
<xsl:choose>
|
|
||||||
|
|
||||||
<xsl:when test="$setLanguageNames = 'true' and $setLanguageNamesInCurrentLanguage = 'false'">
|
|
||||||
<xsl:call-template name="mandalay:getStaticText">
|
|
||||||
<xsl:with-param name="module" select="'languageSelector'"/>
|
|
||||||
<xsl:with-param name="id" select="$langIter"/>
|
|
||||||
<xsl:with-param name="lang" select="$langIter"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
|
|
||||||
<xsl:when test="$setLanguageNames = 'true' and $setLanguageNamesInCurrentLanguage = 'true'">
|
|
||||||
<xsl:call-template name="mandalay:getStaticText">
|
|
||||||
<xsl:with-param name="module" select="'languageSelector'"/>
|
|
||||||
<xsl:with-param name="id" select="$langIter"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="$langIter"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<span class="languageEntry">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$langIter = $negotiated-language">
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
selected languageEntry
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="$localizedLanguageText"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
languageEntry
|
|
||||||
</xsl:attribute>
|
|
||||||
<a>
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="contains($resultTree/@url, '?')">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="contains($resultTree/@url, 'lang=')">
|
|
||||||
<xsl:value-of select="substring-before($resultTree/@url, 'lang=')"/>
|
|
||||||
<xsl:value-of select="concat('lang=', $langIter)"/>
|
|
||||||
<xsl:value-of select="substring-after(substring-after($resultTree/@url, 'lang='), '&')"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="substring-before($resultTree/@url, '?')"/>
|
|
||||||
<xsl:value-of select="concat('?lang=', $langIter, '&')"/>
|
|
||||||
<xsl:value-of select="substring-after($resultTree/@url, '?')"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="concat($resultTree/@url, '?lang=', $langIter)"/>
|
<xsl:value-of select="$supportedLanguages"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
</xsl:attribute>
|
<xsl:variable name="localizedLanguageText">
|
||||||
<xsl:attribute name="title">
|
<xsl:choose>
|
||||||
<xsl:value-of select="$localizedLanguageText"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="$localizedLanguageText"/>
|
|
||||||
</a>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<!-- DE Wenn das nicht der letzte Eintrag in der Liste ist, dann füge den Seperator hinzu -->
|
<xsl:when test="$setLanguageNames = 'true' and $setLanguageNamesInCurrentLanguage = 'false'">
|
||||||
<!-- EN If this is not the last entry of the list, add the seperator -->
|
<xsl:call-template name="mandalay:getStaticText">
|
||||||
<xsl:if test="string-length($supportedLanguages) > 3">
|
<xsl:with-param name="module" select="'languageSelector'"/>
|
||||||
<xsl:value-of select="$separator"/>
|
<xsl:with-param name="id" select="$langIter"/>
|
||||||
</xsl:if>
|
<xsl:with-param name="lang" select="$langIter"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
<!-- DE Wenn mehr als 3 Zeichen im String sind, d.h. mehr als ein Spracheintrag,
|
<xsl:when test="$setLanguageNames = 'true' and $setLanguageNamesInCurrentLanguage = 'true'">
|
||||||
dann entferne den aktuellen Eintrag und gehe in Rekursion -->
|
<xsl:call-template name="mandalay:getStaticText">
|
||||||
<!-- EN If there more then 3 chars in the string, it means there is more then
|
<xsl:with-param name="module" select="'languageSelector'"/>
|
||||||
one language entry, so remove current entry and go recursiv -->
|
<xsl:with-param name="id" select="$langIter"/>
|
||||||
<xsl:if test="string-length($supportedLanguages) > 3">
|
</xsl:call-template>
|
||||||
<xsl:call-template name="mandalay:languageSelector">
|
</xsl:when>
|
||||||
<xsl:with-param name="supportedLanguages">
|
|
||||||
<xsl:call-template name="mandalay:string-replace">
|
|
||||||
<xsl:with-param name="string" select="$supportedLanguages"/>
|
|
||||||
<xsl:with-param name="from" select="concat($langIter, ' ')"/>
|
|
||||||
<xsl:with-param name="to" select="''"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
</xsl:template>
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$langIter"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<span class="languageEntry">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$langIter = $negotiated-language">
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
selected languageEntry
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="$localizedLanguageText"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
languageEntry
|
||||||
|
</xsl:attribute>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($resultTree/@url, '?')">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($resultTree/@url, 'lang=')">
|
||||||
|
<xsl:value-of select="substring-before($resultTree/@url, 'lang=')"/>
|
||||||
|
<xsl:value-of select="concat('lang=', $langIter)"/>
|
||||||
|
<xsl:value-of select="substring-after(substring-after($resultTree/@url, 'lang='), '&')"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="substring-before($resultTree/@url, '?')"/>
|
||||||
|
<xsl:value-of select="concat('?lang=', $langIter, '&')"/>
|
||||||
|
<xsl:value-of select="substring-after($resultTree/@url, '?')"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="concat($resultTree/@url, '?lang=', $langIter)"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="$localizedLanguageText"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="$localizedLanguageText"/>
|
||||||
|
</a>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<!-- DE Wenn das nicht der letzte Eintrag in der Liste ist, dann füge den Seperator hinzu -->
|
||||||
|
<!-- EN If this is not the last entry of the list, add the seperator -->
|
||||||
|
<xsl:if test="string-length($supportedLanguages) > 3">
|
||||||
|
<xsl:value-of select="$separator"/>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<!-- DE Wenn mehr als 3 Zeichen im String sind, d.h. mehr als ein Spracheintrag,
|
||||||
|
dann entferne den aktuellen Eintrag und gehe in Rekursion -->
|
||||||
|
<!-- EN If there more then 3 chars in the string, it means there is more then
|
||||||
|
one language entry, so remove current entry and go recursiv -->
|
||||||
|
<xsl:if test="string-length($supportedLanguages) > 3">
|
||||||
|
<xsl:call-template name="mandalay:languageSelector">
|
||||||
|
<xsl:with-param name="supportedLanguages">
|
||||||
|
<xsl:call-template name="mandalay:string-replace">
|
||||||
|
<xsl:with-param name="string" select="$supportedLanguages"/>
|
||||||
|
<xsl:with-param name="from" select="concat($langIter, ' ')"/>
|
||||||
|
<xsl:with-param name="to" select="''"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
<title>
|
<title>
|
||||||
<xsl:for-each select="showText | usePageTitle">
|
<xsl:for-each select="showText | usePageTitle">
|
||||||
<xsl:apply-templates select="."/>
|
<xsl:apply-templates select="."/>
|
||||||
<xsl:if test="position()!=last()">
|
<xsl:if test="position() != last()">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="node" select="../separator"/>
|
<xsl:with-param name="node" select="../separator"/>
|
||||||
<xsl:with-param name="module" select="'layoutParser'"/>
|
<xsl:with-param name="module" select="'layoutParser'"/>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -20,435 +20,466 @@
|
||||||
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
|
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xsl:stylesheet
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
exclude-result-prefixes="xsl bebop cms"
|
||||||
exclude-result-prefixes="xsl bebop cms"
|
version="1.0">
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<!-- DE Leadtext -->
|
<!-- DE Leadtext -->
|
||||||
<!-- EN lead text view -->
|
<!-- EN lead text view -->
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="lead">
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']"
|
||||||
<xsl:variable name="setLeadText">
|
mode="lead">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:variable name="setLeadText">
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="setting" select="'setLeadText'"/>
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
<xsl:with-param name="setting" select="'setLeadText'"/>
|
||||||
</xsl:call-template>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setNewsDateBeforeLead">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'setNewsDateBeforeLead'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setNewsDateAfterLead">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'setNewsDateAfterLead'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:if test="$setNewsDateBeforeLead = 'true'">
|
|
||||||
<xsl:apply-templates select="." mode="date"/>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="./lead and $setLeadText = 'true'">
|
|
||||||
<div class="lead">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="./lead"/>
|
|
||||||
</div>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$setNewsDateAfterLead = 'true'">
|
|
||||||
<xsl:apply-templates select="." mode="date"/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- DE Bild -->
|
|
||||||
<!-- EN image -->
|
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="image">
|
|
||||||
|
|
||||||
<!-- DE Hole alle benötigten Einstellungen-->
|
|
||||||
<!-- EN Getting all needed setting-->
|
|
||||||
<xsl:variable name="setImage">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'setImage'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setImageMaxHeight">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'setImageMaxHeight'"/>
|
|
||||||
<xsl:with-param name="default" select="''"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setImageMaxWidth">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'setImageMaxWidth'"/>
|
|
||||||
<xsl:with-param name="default" select="''"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setImageCaption">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'setImageCaption'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:if test="$setImage = 'true'">
|
|
||||||
<xsl:call-template name="mandalay:imageAttachment">
|
|
||||||
<xsl:with-param name="showCaption" select="$setImageCaption"/>
|
|
||||||
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
|
|
||||||
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="date">
|
|
||||||
<div id="newsDate">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="./newsDate/@date"/>
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- DE Vollansicht -->
|
|
||||||
<!-- EN Detailed view -->
|
|
||||||
<xsl:template name="CT_NewsItem_graphics" match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="detailed_view">
|
|
||||||
|
|
||||||
<!-- DE Hole alle benötigten Einstellungen-->
|
|
||||||
<!-- EN Getting all needed setting-->
|
|
||||||
<xsl:if test="./textAsset/content">
|
|
||||||
<div id="mainBody">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="./textAsset/content"/>
|
|
||||||
<div class="endFloat"/>
|
|
||||||
</div>
|
|
||||||
</xsl:if>
|
|
||||||
<div class="endFloat"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- DE Listenansicht -->
|
|
||||||
<!-- EN List view -->
|
|
||||||
<xsl:template name="CT_NewsItem_List" match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.NewsItem']" mode="list_view">
|
|
||||||
|
|
||||||
<!-- DE Hole alle benötigten Einstellungen-->
|
|
||||||
<!-- EN Getting all needed setting-->
|
|
||||||
<xsl:variable name="setNewsDate">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setNewsDate'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setDateFormat">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setDateFormat'"/>
|
|
||||||
<xsl:with-param name="default" select="'S'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setLinkToDetails">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setLinkToDetails'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setLeadText">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setLeadText'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setLeadTextLength">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setLeadTextLength'"/>
|
|
||||||
<xsl:with-param name="default" select="'0'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setImage">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setImage'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setMoreButton">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'listView/setMoreButton'"/>
|
|
||||||
<xsl:with-param name="default" select="'auto'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:if test="nav:attribute[@name='newsDate'] and $setNewsDate = 'true'">
|
|
||||||
<div class="dateline">
|
|
||||||
<xsl:value-of select="nav:attribute[@name='newsDate']/@date"/>
|
|
||||||
</div>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<xsl:if test="$setImage = 'true' and nav:attribute[@name='imageAttachments.image.id']">
|
|
||||||
<a>
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="nav:path"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="title">
|
|
||||||
<xsl:call-template name="mandalay:shying">
|
|
||||||
<xsl:with-param name="title">
|
|
||||||
<xsl:value-of select="nav:attribute[@name='title']"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:attribute>
|
|
||||||
|
|
||||||
<div class="image">
|
|
||||||
<img>
|
|
||||||
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&maxWidth=150&maxHeight=100</xsl:attribute>
|
|
||||||
<xsl:if test="nav:attribute[@name='imageAttachments.caption']">
|
|
||||||
<xsl:attribute name="alt"><xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="title"><xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/></xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
</img>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$setLinkToDetails = 'true' or (string-length(nav:attribute[@name='lead']) > $setLeadTextLength and $setLeadTextLength != '0')">
|
|
||||||
<a class="CIname">
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="nav:path"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="title">
|
|
||||||
<xsl:call-template name="mandalay:shying">
|
|
||||||
<xsl:with-param name="title">
|
|
||||||
<xsl:value-of select="nav:attribute[@name='title']"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:attribute>
|
</xsl:variable>
|
||||||
<xsl:call-template name="mandalay:shying">
|
<xsl:variable name="setNewsDateBeforeLead">
|
||||||
<xsl:with-param name="title">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='title']"/>
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
</xsl:with-param>
|
<xsl:with-param name="setting" select="'setNewsDateBeforeLead'"/>
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</a>
|
</xsl:variable>
|
||||||
</xsl:when>
|
<xsl:variable name="setNewsDateAfterLead">
|
||||||
<xsl:otherwise>
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<span class="CIname">
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='title']" />
|
<xsl:with-param name="setting" select="'setNewsDateAfterLead'"/>
|
||||||
</span>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:otherwise>
|
</xsl:call-template>
|
||||||
</xsl:choose>
|
</xsl:variable>
|
||||||
<xsl:if test="nav:attribute[@name='lead'] and $setLeadText = 'true'">
|
|
||||||
<xsl:if test="nav:attribute[@name='imageAttachments.image.id']">
|
|
||||||
<div class="image">
|
|
||||||
<img>
|
|
||||||
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&maxWidth=150&maxHeight=100</xsl:attribute>
|
|
||||||
<xsl:if test="nav:attribute[@name='imageAttachments.caption']">
|
|
||||||
<xsl:attribute name="alt"><xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="title"><xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/></xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
</img>
|
|
||||||
</div>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<br />
|
<xsl:if test="$setNewsDateBeforeLead = 'true'">
|
||||||
<span class="intro">
|
<xsl:apply-templates select="." mode="date"/>
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$setLeadTextLength = '0'">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='lead']" />
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="substring(nav:attribute[@name='lead'], 1, $setLeadTextLength)" />
|
|
||||||
<xsl:if test="string-length(nav:attribute[@name='lead']) > $setLeadTextLength">
|
|
||||||
<xsl:text>...</xsl:text>
|
|
||||||
<xsl:if test="$setMoreButton = 'auto'">
|
|
||||||
<xsl:call-template name="mandalay:moreButton">
|
|
||||||
<xsl:with-param name="href" select="nav:path"/>
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:if test="$setMoreButton = 'true'">
|
|
||||||
<xsl:call-template name="mandalay:moreButton">
|
|
||||||
<xsl:with-param name="href" select="nav:path"/>
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</span>
|
<xsl:if test="./lead and $setLeadText = 'true'">
|
||||||
</xsl:if>
|
<div class="lead">
|
||||||
<xsl:if test="nav:attribute[@name='newsDate'] and $setNewsDate = 'true'">
|
<xsl:value-of disable-output-escaping="yes" select="./lead"/>
|
||||||
<div class="endFloat"/>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
<xsl:if test="$setNewsDateAfterLead = 'true'">
|
||||||
|
<xsl:apply-templates select="." mode="date"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="CT_NewsItem_Link" match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.NewsItem']" mode="link_view">
|
<!-- DE Bild -->
|
||||||
|
<!-- EN image -->
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']"
|
||||||
|
mode="image">
|
||||||
|
|
||||||
<!-- DE Hole alle benötigten Einstellungen-->
|
<!-- DE Hole alle benötigten Einstellungen-->
|
||||||
<!-- EN Getting all needed setting-->
|
<!-- EN Getting all needed setting-->
|
||||||
<xsl:variable name="setLinkToDetails">
|
<xsl:variable name="setImage">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
<xsl:with-param name="setting" select="'linkView/setLinkToDetails'"/>
|
<xsl:with-param name="setting" select="'setImage'"/>
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="setImageAndText">
|
<xsl:variable name="setImageMaxHeight">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
<xsl:with-param name="setting" select="'linkView/setImageAndText'"/>
|
<xsl:with-param name="setting" select="'setImageMaxHeight'"/>
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
<xsl:with-param name="default" select="''"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="setImage">
|
<xsl:variable name="setImageMaxWidth">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
<xsl:with-param name="setting" select="'linkView/setImage'"/>
|
<xsl:with-param name="setting" select="'setImageMaxWidth'"/>
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
<xsl:with-param name="default" select="''"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="setImageMaxHeight">
|
<xsl:variable name="setImageCaption">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
<xsl:with-param name="setting" select="'linkView/setImageMaxHeight'"/>
|
<xsl:with-param name="setting" select="'setImageCaption'"/>
|
||||||
<xsl:with-param name="default" select="''"/>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="setImageMaxWidth">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'linkView/setImageMaxWidth'"/>
|
|
||||||
<xsl:with-param name="default" select="''"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setImageCaption">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'linkView/setImageCaption'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setDescription">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'linkView/setDescription'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setDescriptionLength">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'linkView/setDescriptionLength'"/>
|
|
||||||
<xsl:with-param name="default" select="'0'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="setMoreButton">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
<xsl:with-param name="setting" select="'linkView/setMoreButton'"/>
|
|
||||||
<xsl:with-param name="default" select="'auto'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<!-- DE Wenn es Bilder gibt, dann soll das erste hier als Link angezeigt werden -->
|
<xsl:if test="$setImage = 'true'">
|
||||||
<!-- EN -->
|
<xsl:call-template name="mandalay:imageAttachment">
|
||||||
<xsl:if test="./targetItem/imageAttachments and $setImage = 'true'">
|
<xsl:with-param name="showCaption" select="$setImageCaption"/>
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$setLinkToDetails = 'true' or (string-length(./linkDescription) > $setDescriptionLength and $setDescriptionLength != '0')">
|
|
||||||
<a class="CIname">
|
|
||||||
<xsl:attribute name="href"><xsl:text>/redirect/?oid=</xsl:text><xsl:value-of select="./targetItem/@oid"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="title">
|
|
||||||
<xsl:call-template name="mandalay:shying">
|
|
||||||
<xsl:with-param name="title">
|
|
||||||
<xsl:value-of select="./linkTitle"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:for-each select="./targetItem">
|
|
||||||
<xsl:call-template name="mandalay:imageAttachment">
|
|
||||||
<xsl:with-param name="showCaption" select="$setImageCaption" />
|
|
||||||
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
|
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
|
||||||
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
|
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:for-each>
|
|
||||||
</a>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:for-each select="./targetItem">
|
|
||||||
<xsl:call-template name="mandalay:imageAttachment">
|
|
||||||
<xsl:with-param name="showCaption" select="$setImageCaption" />
|
|
||||||
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
|
|
||||||
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
|
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$setImageAndText = 'true' or not(./targetItem/imageAttachments) or $setImage = 'false'">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$setLinkToDetails = 'true' or (string-length(./linkDescription) > $setDescriptionLength and $setDescriptionLength != '0')">
|
|
||||||
<a class="CIname">
|
|
||||||
<xsl:attribute name="href"><xsl:text>/redirect/?oid=</xsl:text><xsl:value-of select="./targetItem/@oid"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="title">
|
|
||||||
<xsl:call-template name="mandalay:shying">
|
|
||||||
<xsl:with-param name="title">
|
|
||||||
<xsl:value-of select="./linkTitle"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:call-template name="mandalay:shying">
|
|
||||||
<xsl:with-param name="title">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="./linkTitle"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</a>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:call-template name="mandalay:shying">
|
|
||||||
<xsl:with-param name="title">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="./linkTitle"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:if test="./linkDescription and $setDescription">
|
|
||||||
<br />
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$setDescriptionLength = '0'">
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="./linkDescription" />
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of disable-output-escaping="yes" select="substring(./linkDescription, 1, $setDescriptionLength)" />
|
|
||||||
<xsl:if test="string-length(./linkDescription) > $setDescriptionLength">
|
|
||||||
<xsl:text>...</xsl:text>
|
|
||||||
<xsl:if test="$setMoreButton = 'auto'">
|
|
||||||
<xsl:call-template name="mandalay:moreButton">
|
|
||||||
<xsl:with-param name="href" select="./targetItem/@oid"/>
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:if test="$setMoreButton = 'true'">
|
|
||||||
<xsl:call-template name="mandalay:moreButton">
|
|
||||||
<xsl:with-param name="href" select="./targetItem/@oid"/>
|
|
||||||
<xsl:with-param name="module" select="'NewsItem'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:template>
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']"
|
||||||
|
mode="date">
|
||||||
|
<div id="newsDate">
|
||||||
|
<xsl:value-of disable-output-escaping="yes" select="./newsDate/@date"/>
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- DE Vollansicht -->
|
||||||
|
<!-- EN Detailed view -->
|
||||||
|
<xsl:template name="CT_NewsItem_graphics"
|
||||||
|
match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']"
|
||||||
|
mode="detailed_view">
|
||||||
|
|
||||||
|
<!-- DE Hole alle benötigten Einstellungen-->
|
||||||
|
<!-- EN Getting all needed setting-->
|
||||||
|
<xsl:if test="./textAsset/content">
|
||||||
|
<div id="mainBody">
|
||||||
|
<xsl:value-of disable-output-escaping="yes" select="./textAsset/content"/>
|
||||||
|
<div class="endFloat"/>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
<div class="endFloat"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- DE Listenansicht -->
|
||||||
|
<!-- EN List view -->
|
||||||
|
<xsl:template name="CT_NewsItem_List"
|
||||||
|
match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.NewsItem']"
|
||||||
|
mode="list_view">
|
||||||
|
|
||||||
|
<!-- DE Hole alle benötigten Einstellungen-->
|
||||||
|
<!-- EN Getting all needed setting-->
|
||||||
|
<xsl:variable name="setNewsDate">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setNewsDate'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setDateFormat">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setDateFormat'"/>
|
||||||
|
<xsl:with-param name="default" select="'S'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setLinkToDetails">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setLinkToDetails'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setLeadText">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setLeadText'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setLeadTextLength">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setLeadTextLength'"/>
|
||||||
|
<xsl:with-param name="default" select="'0'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setImage">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setImage'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setMoreButton">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'listView/setMoreButton'"/>
|
||||||
|
<xsl:with-param name="default" select="'auto'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:if test="nav:attribute[@name='newsDate'] and $setNewsDate = 'true'">
|
||||||
|
<div class="dateline">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='newsDate']/@date"/>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:if test="$setImage = 'true' and nav:attribute[@name='imageAttachments.image.id']">
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="nav:path"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='title']"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
|
||||||
|
<div class="image">
|
||||||
|
<img>
|
||||||
|
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&maxWidth=150&maxHeight=100</xsl:attribute>
|
||||||
|
<xsl:if test="nav:attribute[@name='imageAttachments.caption']">
|
||||||
|
<xsl:attribute name="alt">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</img>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$setLinkToDetails = 'true' or (string-length(nav:attribute[@name='lead']) > $setLeadTextLength and $setLeadTextLength != '0')">
|
||||||
|
<a class="CIname">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="nav:path"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='title']"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
|
select="nav:attribute[@name='title']"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<span class="CIname">
|
||||||
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
|
select="nav:attribute[@name='title']" />
|
||||||
|
</span>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:if test="nav:attribute[@name='lead'] and $setLeadText = 'true'">
|
||||||
|
<xsl:if test="nav:attribute[@name='imageAttachments.image.id']">
|
||||||
|
<div class="image">
|
||||||
|
<img>
|
||||||
|
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&maxWidth=150&maxHeight=100</xsl:attribute>
|
||||||
|
<xsl:if test="nav:attribute[@name='imageAttachments.caption']">
|
||||||
|
<xsl:attribute name="alt">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</img>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<span class="intro">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$setLeadTextLength = '0'">
|
||||||
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
|
select="nav:attribute[@name='lead']" />
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
|
select="substring(nav:attribute[@name='lead'], 1, $setLeadTextLength)" />
|
||||||
|
<xsl:if test="string-length(nav:attribute[@name='lead']) > $setLeadTextLength">
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
<xsl:if test="$setMoreButton = 'auto'">
|
||||||
|
<xsl:call-template name="mandalay:moreButton">
|
||||||
|
<xsl:with-param name="href" select="nav:path"/>
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:if test="$setMoreButton = 'true'">
|
||||||
|
<xsl:call-template name="mandalay:moreButton">
|
||||||
|
<xsl:with-param name="href" select="nav:path"/>
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</span>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="nav:attribute[@name='newsDate'] and $setNewsDate = 'true'">
|
||||||
|
<div class="endFloat"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="CT_NewsItem_Link"
|
||||||
|
match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.NewsItem']"
|
||||||
|
mode="link_view">
|
||||||
|
|
||||||
|
<!-- DE Hole alle benötigten Einstellungen-->
|
||||||
|
<!-- EN Getting all needed setting-->
|
||||||
|
<xsl:variable name="setLinkToDetails">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setLinkToDetails'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setImageAndText">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setImageAndText'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setImage">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setImage'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setImageMaxHeight">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setImageMaxHeight'"/>
|
||||||
|
<xsl:with-param name="default" select="''"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setImageMaxWidth">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setImageMaxWidth'"/>
|
||||||
|
<xsl:with-param name="default" select="''"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setImageCaption">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setImageCaption'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setDescription">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setDescription'"/>
|
||||||
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setDescriptionLength">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setDescriptionLength'"/>
|
||||||
|
<xsl:with-param name="default" select="'0'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:variable name="setMoreButton">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
<xsl:with-param name="setting" select="'linkView/setMoreButton'"/>
|
||||||
|
<xsl:with-param name="default" select="'auto'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<!-- DE Wenn es Bilder gibt, dann soll das erste hier als Link angezeigt werden -->
|
||||||
|
<!-- EN -->
|
||||||
|
<xsl:if test="./targetItem/imageAttachments and $setImage = 'true'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$setLinkToDetails = 'true' or (string-length(./linkDescription) > $setDescriptionLength and $setDescriptionLength != '0')">
|
||||||
|
<a class="CIname">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>/redirect/?oid=</xsl:text>
|
||||||
|
<xsl:value-of select="./targetItem/@oid"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of select="./linkTitle"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:for-each select="./targetItem">
|
||||||
|
<xsl:call-template name="mandalay:imageAttachment">
|
||||||
|
<xsl:with-param name="showCaption" select="$setImageCaption" />
|
||||||
|
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
|
||||||
|
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:for-each>
|
||||||
|
</a>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:for-each select="./targetItem">
|
||||||
|
<xsl:call-template name="mandalay:imageAttachment">
|
||||||
|
<xsl:with-param name="showCaption" select="$setImageCaption" />
|
||||||
|
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
|
||||||
|
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$setImageAndText = 'true' or not(./targetItem/imageAttachments) or $setImage = 'false'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$setLinkToDetails = 'true' or (string-length(./linkDescription) > $setDescriptionLength and $setDescriptionLength != '0')">
|
||||||
|
<a class="CIname">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>/redirect/?oid=</xsl:text>
|
||||||
|
<xsl:value-of select="./targetItem/@oid"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of select="./linkTitle"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of disable-output-escaping="yes" select="./linkTitle"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</a>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="mandalay:shying">
|
||||||
|
<xsl:with-param name="title">
|
||||||
|
<xsl:value-of disable-output-escaping="yes" select="./linkTitle"/>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="mode">dynamic</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:if test="./linkDescription and $setDescription">
|
||||||
|
<br />
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$setDescriptionLength = '0'">
|
||||||
|
<xsl:value-of disable-output-escaping="yes" select="./linkDescription" />
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
|
select="substring(./linkDescription, 1, $setDescriptionLength)" />
|
||||||
|
<xsl:if test="string-length(./linkDescription) > $setDescriptionLength">
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
<xsl:if test="$setMoreButton = 'auto'">
|
||||||
|
<xsl:call-template name="mandalay:moreButton">
|
||||||
|
<xsl:with-param name="href" select="./targetItem/@oid"/>
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:if test="$setMoreButton = 'true'">
|
||||||
|
<xsl:call-template name="mandalay:moreButton">
|
||||||
|
<xsl:with-param name="href" select="./targetItem/@oid"/>
|
||||||
|
<xsl:with-param name="module" select="'NewsItem'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||||
exclude-result-prefixes="xsl bebop cms ui mandalay nav"
|
exclude-result-prefixes="xsl bebop cms ui mandalay nav"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
<xsl:template name="mandalay:minimizeHeader">
|
<xsl:template name="mandalay:minimizeHeader">
|
||||||
<xsl:param name="imageClass" select="''"/>
|
<xsl:param name="imageClass" select="''"/>
|
||||||
|
|
@ -80,9 +80,9 @@
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<xsl:value-of select="'$(document).ready(function() {'"/>
|
<xsl:value-of select="'$(document).ready(function() {'"/>
|
||||||
<xsl:value-of select="concat('minimizeImage.restore("', $imageClass, '", "', $linkClass ,'", "', $minimizeLabel, '", "', $maximizeLabel, '")')"/>
|
<xsl:value-of select="concat('minimizeImage.restore("', $imageClass, '", "', $linkClass ,'", "', $minimizeLabel, '", "', $maximizeLabel, '")')"/>
|
||||||
<xsl:value-of select="'});'"/>
|
<xsl:value-of select="'});'"/>
|
||||||
</script>
|
</script>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,80 +21,82 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xsl:stylesheet
|
<xsl:stylesheet
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
xmlns:ppp="http://www.arsdigita.com/PublicPersonalProfile/1.0"
|
xmlns:ppp="http://www.arsdigita.com/PublicPersonalProfile/1.0"
|
||||||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||||
exclude-result-prefixes="xsl bebop cms nav ppp mandalay"
|
exclude-result-prefixes="xsl bebop cms nav ppp mandalay"
|
||||||
version="1.0"
|
version="1.0"
|
||||||
>
|
>
|
||||||
|
|
||||||
<xsl:template match="ppp:profile">
|
<xsl:template match="ppp:profile">
|
||||||
<xsl:variable name="showOwnerName">
|
<xsl:variable name="showOwnerName">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
|
||||||
<xsl:with-param name="setting" select="'showOwnerName'"/>
|
|
||||||
<xsl:with-param name="default" select="'true'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:if test="$showOwnerName = 'true'">
|
|
||||||
<xsl:apply-templates select="ppp:ownerName"/>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates select="ppp:profileImage"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ppp:ownerName">
|
|
||||||
<div class="profileName">
|
|
||||||
<h1><xsl:value-of select="."/></h1>
|
|
||||||
</div>
|
|
||||||
<!--
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="name(..) = 'title'">
|
|
||||||
<xsl:call-template name="mandalay:title"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<h2>
|
|
||||||
<xsl:call-template name="mandalay:title"/>
|
|
||||||
</h2>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
-->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ppp:profileImage">
|
|
||||||
<xsl:variable name="showProfileImage">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
|
||||||
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
|
||||||
<xsl:with-param name="setting" select="'showProfileImage'"/>
|
|
||||||
<xsl:with-param name="default" select="'false'"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:if test="$showProfileImage = 'true'">
|
|
||||||
<div class="profileImage">
|
|
||||||
<xsl:call-template name="mandalay:imageAttachment">
|
|
||||||
<xsl:with-param name="showCaption" select="'false'"/>
|
|
||||||
<xsl:with-param name="setZoomLink" select="'false'"/>
|
|
||||||
<xsl:with-param name="setTextZoomLink" select="'false'"/>
|
|
||||||
<xsl:with-param name="maxWidth">
|
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
||||||
<xsl:with-param name="setting" select="'showProfileMaxWidth'"/>
|
<xsl:with-param name="setting" select="'showOwnerName'"/>
|
||||||
<xsl:with-param name="default" select="'200'"/>
|
<xsl:with-param name="default" select="'true'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:with-param>
|
</xsl:variable>
|
||||||
<xsl:with-param name="maxHeight">
|
|
||||||
|
<xsl:if test="$showOwnerName = 'true'">
|
||||||
|
<xsl:apply-templates select="ppp:ownerName"/>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates select="ppp:profileImage"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="ppp:ownerName">
|
||||||
|
<div class="profileName">
|
||||||
|
<h1>
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="name(..) = 'title'">
|
||||||
|
<xsl:call-template name="mandalay:title"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<h2>
|
||||||
|
<xsl:call-template name="mandalay:title"/>
|
||||||
|
</h2>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
-->
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="ppp:profileImage">
|
||||||
|
<xsl:variable name="showProfileImage">
|
||||||
<xsl:call-template name="mandalay:getSetting">
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
||||||
<xsl:with-param name="setting" select="'showProfileMaxHeight'"/>
|
<xsl:with-param name="setting" select="'showProfileImage'"/>
|
||||||
<xsl:with-param name="default" select="'200'"/>
|
<xsl:with-param name="default" select="'false'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:with-param>
|
</xsl:variable>
|
||||||
</xsl:call-template>
|
<xsl:if test="$showProfileImage = 'true'">
|
||||||
</div>
|
<div class="profileImage">
|
||||||
</xsl:if>
|
<xsl:call-template name="mandalay:imageAttachment">
|
||||||
</xsl:template>
|
<xsl:with-param name="showCaption" select="'false'"/>
|
||||||
|
<xsl:with-param name="setZoomLink" select="'false'"/>
|
||||||
|
<xsl:with-param name="setTextZoomLink" select="'false'"/>
|
||||||
|
<xsl:with-param name="maxWidth">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
||||||
|
<xsl:with-param name="setting" select="'showProfileMaxWidth'"/>
|
||||||
|
<xsl:with-param name="default" select="'200'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="maxHeight">
|
||||||
|
<xsl:call-template name="mandalay:getSetting">
|
||||||
|
<xsl:with-param name="module" select="'PublicPersonalProfile'"/>
|
||||||
|
<xsl:with-param name="setting" select="'showProfileMaxHeight'"/>
|
||||||
|
<xsl:with-param name="default" select="'200'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:with-param>
|
||||||
|
</xsl:call-template>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,14 @@
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:if test="$exclude != 'true'">
|
<xsl:if test="$exclude != 'true'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="(string-length($subsiteBannerText) < 1) or (contains(subsiteBannerText, 'Missing translation'))">
|
<xsl:when test="(string-length($subsiteBannerText) < 1) or (contains(subsiteBannerText, 'Missing translation'))">
|
||||||
<xsl:value-of select="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
|
<xsl:value-of select="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$subsiteBannerText"/>
|
<xsl:value-of select="$subsiteBannerText"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</div>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue