Mandalay: Formatierungen

git-svn-id: https://svn.libreccm.org/ccm/trunk@2634 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-05-05 17:59:33 +00:00
parent 0f42cbcd60
commit ee43570f8e
7 changed files with 1403 additions and 1335 deletions

View File

@ -221,7 +221,7 @@
<title>
<xsl:for-each select="showText | usePageTitle">
<xsl:apply-templates select="."/>
<xsl:if test="position()!=last()">
<xsl:if test="position() != last()">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="node" select="../separator"/>
<xsl:with-param name="module" select="'layoutParser'"/>

View File

@ -20,8 +20,7 @@
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<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:cms="http://www.arsdigita.com/cms/1.0"
xmlns:nav="http://ccm.redhat.com/navigation"
@ -31,7 +30,8 @@
<!-- DE Leadtext -->
<!-- EN lead text view -->
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Event']" mode="lead">
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Event']"
mode="lead">
<xsl:variable name="setLeadText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'Event'"/>
@ -49,7 +49,8 @@
<!-- DE Bild -->
<!-- EN image -->
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Event']" mode="image">
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Event']"
mode="image">
<!-- DE Hole alle benötigten Einstellungen-->
<!-- EN Getting all needed setting-->
@ -93,7 +94,9 @@
<!-- DE Vollansicht -->
<!-- EN Detailed view -->
<xsl:template name="CT_Event_graphics" match="cms:item[objectType='com.arsdigita.cms.contenttypes.Event']" mode="detailed_view">
<xsl:template name="CT_Event_graphics"
match="cms:item[objectType='com.arsdigita.cms.contenttypes.Event']"
mode="detailed_view">
<!-- DE Hole alle benötigten Einstellungen-->
<!-- EN Getting all needed setting-->
@ -142,7 +145,7 @@
<xsl:variable name="setEventType">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'Event'"/>
<xsl:with-param name="setting" select="'setEventDate'"/>
<xsl:with-param name="setting" select="'setEventType'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
@ -197,17 +200,21 @@
<span class="value">
<xsl:choose>
<xsl:when test="$setDateFormat = 'L'">
<xsl:value-of disable-output-escaping="yes" select="./startDate/@longDate"/>
<xsl:value-of disable-output-escaping="yes"
select="./startDate/@longDate"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="./startDate/@date"/>
<xsl:value-of disable-output-escaping="yes"
select="./startDate/@date"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="./startTime/@time and ./endTime/@time and not(./startTime/@time = ./endTime/@time)">
<xsl:value-of select="$dateSeparator"/>
<xsl:value-of disable-output-escaping="yes" select="./startTime/@time"/>
<xsl:value-of disable-output-escaping="yes"
select="./startTime/@time"/>
<xsl:value-of select="$timeSeparator"/>
<xsl:value-of disable-output-escaping="yes" select="./endTime/@time"/>
<xsl:value-of disable-output-escaping="yes"
select="./endTime/@time"/>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'Event'" />
<xsl:with-param name="id" select="'timeAppendix'" />
@ -225,7 +232,8 @@
</xsl:call-template>
</span>
<span class="value">
<xsl:value-of disable-output-escaping="yes" select="./startTime/@time"/>
<xsl:value-of disable-output-escaping="yes"
select="./startTime/@time"/>
</span>
</div>
</xsl:if>
@ -242,10 +250,12 @@
<span class="value">
<xsl:choose>
<xsl:when test="$setDateFormat = 'L'">
<xsl:value-of disable-output-escaping="yes" select="./startDate/@longDate"/>
<xsl:value-of disable-output-escaping="yes"
select="./startDate/@longDate"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="./startDate/@date"/>
<xsl:value-of disable-output-escaping="yes"
select="./startDate/@date"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="./startTime">
@ -352,7 +362,9 @@
<xsl:if test="./mapLink and $setMapLink = 'true'">
<div class="mapLink tableRow">
<a>
<xsl:attribute name="href"><xsl:value-of select="./mapLink"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="./mapLink"/>
</xsl:attribute>
<span class="key">
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'Event'" />
@ -374,7 +386,9 @@
<!-- DE Listenansicht -->
<!-- EN List view -->
<xsl:template name="CT_Event_List" match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.Event']" mode="list_view">
<xsl:template name="CT_Event_List"
match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.Event']"
mode="list_view">
<!-- DE Hole alle benötigten Einstellungen-->
<!-- EN Getting all needed setting-->
@ -520,7 +534,9 @@
<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="href">
<xsl:value-of select="nav:path"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
@ -534,8 +550,12 @@
<img>
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&amp;maxWidth=150&amp;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: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>
@ -543,7 +563,9 @@
</xsl:if>
<a class="CIname">
<xsl:attribute name="href"><xsl:value-of select="nav:path"/></xsl:attribute>
<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">
@ -554,7 +576,8 @@
</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: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>
@ -565,10 +588,12 @@
<span class="intro">
<xsl:choose>
<xsl:when test="$setLeadTextLength = '0'">
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='lead']" />
<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: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'">
@ -593,7 +618,9 @@
</xsl:if>
</xsl:template>
<xsl:template name="CT_Event_Link" match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.Event']" mode="link_view">
<xsl:template name="CT_Event_Link"
match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.Event']"
mode="link_view">
<!-- DE Hole alle benötigten Einstellungen-->
<!-- EN Getting all needed setting-->
@ -658,7 +685,10 @@
<!-- EN -->
<xsl:if test="./targetItem/imageAttachments and $setImage = 'true'">
<a class="CIname">
<xsl:attribute name="href"><xsl:text>/redirect/?oid=</xsl:text><xsl:value-of select="./targetItem/@oid"/></xsl:attribute>
<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">
@ -678,7 +708,10 @@
</xsl:if>
<xsl:if test="$setImageAndText = 'true' or not(./targetItem/imageAttachments) or $setImage = 'false'">
<a class="CIname">
<xsl:attribute name="href"><xsl:text>/redirect/?oid=</xsl:text><xsl:value-of select="./targetItem/@oid"/></xsl:attribute>
<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">
@ -698,10 +731,12 @@
<br />
<xsl:choose>
<xsl:when test="$setDescriptionLength = '0'">
<xsl:value-of disable-output-escaping="yes" select="./linkDescription" />
<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: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'">

View File

@ -20,8 +20,7 @@
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<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:nav="http://ccm.redhat.com/navigation"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
@ -31,7 +30,8 @@
<!-- DE Leadtext -->
<!-- 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']"
mode="lead">
<xsl:variable name="setLeadText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'NewsItem'"/>
@ -69,7 +69,8 @@
<!-- DE Bild -->
<!-- EN image -->
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="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-->
@ -111,7 +112,8 @@
</xsl:if>
</xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="date">
<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>
@ -119,7 +121,9 @@
<!-- DE Vollansicht -->
<!-- EN Detailed view -->
<xsl:template name="CT_NewsItem_graphics" match="cms:item[objectType='com.arsdigita.cms.contenttypes.NewsItem']" mode="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-->
@ -134,7 +138,9 @@
<!-- 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">
<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-->
@ -196,7 +202,9 @@
<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="href">
<xsl:value-of select="nav:path"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
@ -210,8 +218,12 @@
<img>
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&amp;maxWidth=150&amp;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: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>
@ -221,7 +233,9 @@
<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="href">
<xsl:value-of select="nav:path"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
@ -232,7 +246,8 @@
</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: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>
@ -240,7 +255,8 @@
</xsl:when>
<xsl:otherwise>
<span class="CIname">
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='title']" />
<xsl:value-of disable-output-escaping="yes"
select="nav:attribute[@name='title']" />
</span>
</xsl:otherwise>
</xsl:choose>
@ -250,8 +266,12 @@
<img>
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&amp;maxWidth=150&amp;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: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>
@ -261,10 +281,12 @@
<span class="intro">
<xsl:choose>
<xsl:when test="$setLeadTextLength = '0'">
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='lead']" />
<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: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'">
@ -289,7 +311,9 @@
</xsl:if>
</xsl:template>
<xsl:template name="CT_NewsItem_Link" match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.NewsItem']" mode="link_view">
<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-->
@ -363,7 +387,10 @@
<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="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">
@ -396,7 +423,10 @@
<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="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">
@ -429,7 +459,8 @@
<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: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'">

View File

@ -29,7 +29,7 @@
xmlns:mandalay="http://mandalay.quasiweb.de"
exclude-result-prefixes="xsl bebop cms nav ppp mandalay"
version="1.0"
>
>
<xsl:template match="ppp:profile">
<xsl:variable name="showOwnerName">
@ -48,9 +48,11 @@
<xsl:template match="ppp:ownerName">
<div class="profileName">
<h1><xsl:value-of select="."/></h1>
<h1>
<xsl:value-of select="."/>
</h1>
</div>
<!--
<!--
<xsl:choose>
<xsl:when test="name(..) = 'title'">
<xsl:call-template name="mandalay:title"/>
@ -61,7 +63,7 @@
</h2>
</xsl:otherwise>
</xsl:choose>
-->
-->
</xsl:template>
<xsl:template match="ppp:profileImage">