Fehlende Mandalay-Dateien hinzugfügt.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2292 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-08-05 09:48:47 +00:00
parent 6afb52c1fd
commit 856eaf827e
2 changed files with 611 additions and 2 deletions

View File

@ -261,14 +261,14 @@ public final class XSLTemplate {
*/ */
public final boolean isModified() { public final boolean isModified() {
if (s_log.isDebugEnabled()) { if (s_log.isDebugEnabled()) {
s_log.debug("Checking if the XSL files for " + this + " " s_log.debug("Checking if the XSL files for " + this.getSource().toString() + " "
+ "have been modified and need to be re-read"); + "have been modified and need to be re-read");
} }
final Iterator iter = m_dependents.iterator(); final Iterator iter = m_dependents.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
final URL url = Templating.transformURL((URL) iter.next()); final URL url = Templating.transformURL((URL) iter.next());
Assert.exists(url, URL.class); Assert.exists(url, URL.class);
if (url.getProtocol().equals("file")) { if (url.getProtocol().equals("file")) {

View File

@ -0,0 +1,609 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet
[<!ENTITY nbsp '&#160;'>]>
<!--
Copyright 2013 Jens Pelzetter
This file is part of Mandalay
Mandalay is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Mandalay 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<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"
xmlns:mandalay="http://mandalay.quasiweb.de"
exclude-result-prefixes="xsl bebop cms nav"
version="1.0">
<xsl:template name="CT_SimpleOrganization_graphics"
match="cms:item[objectType='com.arsdigita.cms.contenttypes.SimpleOrganization']"
mode="detailed_view">
<!-- 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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'setImage'" />
<xsl:with-param name="default"
select="'true'" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageCaption">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'setImageCaption'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'setImageMaxWidth'" />
<xsl:with-param name="default"
select="''" />
</xsl:call-template>
</xsl:variable>
<div id="details">
<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>
<p>
<xsl:value-of select="./SimpleOrganizationDescription" />
</p>
</div>
</xsl:template>
<xsl:template name="CT_SimpleOrganizationList"
match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.SimpleOrganization']"
mode="list_view">
<!-- 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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setImage'" />
<xsl:with-param name="default"
select="'true'" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageCaption">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setImageCaption'" />
<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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setImageMaxWidth'" />
<xsl:with-param name="default"
select="''" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setLinkToDetails">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setLeadTextLength'" />
<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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setMoreButton'" />
<xsl:with-param name="default"
select="'false'" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setContact">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setContact'" />
<xsl:with-param name="default"
select="'true'" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setContactEntryKey">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'listView/setContactEntryKey'" />
<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:with-param name="setZoomLink"
select="false"/>
</xsl:call-template>
</xsl:if>
<xsl:choose>
<xsl:when test="$setLinkToDetails = 'true' or (string-length(nav:attribute[@name='lead']) &gt; $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="./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="./title" />
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</a>
</xsl:when>
<!--<xsl:when test="$setLinkToDetails != 'true' and string-length(./contacts/contact[@contactType='commonContact']/contactentries[./keyId='homepage']/value) &gt; 0">
<a class="CIname">
<xsl:attribute name="href">
<xsl:value-of select="./contacts/contact[@contactType='commonContact']/contactentries[./keyId='homepage']/value" />
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of select="./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="./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="./title" />
</span>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="nav:attribute[@name='lead'] and $setLeadText = 'true'">
<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']) &gt; $setLeadTextLength">
<xsl:text>...</xsl:text>
<xsl:if test="$setMoreButton = 'true'">
<span class="moreButton">
<a>
<xsl:attribute name="href">
<xsl:value-of select="nav:path" />
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="id"
select="'moreButtonTitle'" />
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="id"
select="'moreButton'" />
</xsl:call-template>
</a>
</span>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:if>
<xsl:if test="$setContact = 'true'">
<span class="contact">
<xsl:if test="./contacts/contact[@contactType='commonContact']/address">
<span class="address">
<span class="street">
<xsl:value-of select="./contacts/contact[@contactType='commonContact']/address/address"/>
</span>
<span class="postalCodeCity">
<span class="postalCode"><xsl:value-of select="./contacts/contact[@contactType='commonContact']/address/postalCode"/></span>
<span>&nbsp;</span>
<span class="postalCode"><xsl:value-of select="./contacts/contact[@contactType='commonContact']/address/city"/></span>
</span>
</span>
</xsl:if>
<xsl:for-each select="./contacts/contact[@contactType='commonContact']/contactentries">
<xsl:sort select="key" />
<xsl:variable name="showContactEntry">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="concat('contactentry/',./keyId,'/show')" />
<xsl:with-param name="default"
select="true" />
</xsl:call-template>
</xsl:variable>
<xsl:if test="($showContactEntry = 'true') or (string-length($showContactEntry) = 0)">
<span class="contactentry">
<xsl:if test="$setContactEntryKey = 'true'">
<span class="contactentryKey">
<xsl:value-of select="./key" />
<xsl:variable name="separator">
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module"
select="'GenericContact'" />
<xsl:with-param name="id"
select="'separator'" />
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="mandalay:string-replace">
<xsl:with-param name="string"
select="$separator" />
<xsl:with-param name="from"
select="' '" />
<xsl:with-param name="to"
select="'&nbsp;'" />
</xsl:call-template>
</span>
</xsl:if>
<span class="contactentryValue">
<xsl:choose>
<xsl:when test="(substring(./value, 1, 7) = 'http://') or (substring(./value, 1, 3) = 'www') or contains(./value, '@')">
<a>
<xsl:choose>
<xsl:when test="contains(./value, '@')">
<xsl:attribute name="href">
<xsl:value-of select="concat('mailto:', ./value)" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">
<xsl:value-of select="./value" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="./value" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="mandalay:string-replace">
<xsl:with-param name="string"
select="./value" />
<xsl:with-param name="from"
select="' '" />
<xsl:with-param name="to"
select="'&nbsp;'" />
</xsl:call-template>
<!--<xsl:value-of select="./value"/>-->
</xsl:otherwise>
</xsl:choose>
</span>
<!-- contactentry value-->
</span>
<!-- span contactentry -->
</xsl:if>
</xsl:for-each>
</span>
<!-- span contact -->
</xsl:if>
</xsl:template>
<xsl:template name="CT_SimpleOrganization_Link"
match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.SimpleOrganization']"
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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<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="'SimpleOrganization'" />
<xsl:with-param name="setting"
select="'linkView/setMoreButton'" />
<xsl:with-param name="default"
select="'false'" />
</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) &gt; $setDescriptionLength and $setDescriptionLength != '0')">
<a>
<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) &gt; $setDescriptionLength and $setDescriptionLength != '0')">
<a>
<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) &gt; $setDescriptionLength">
<xsl:text>...</xsl:text>
<xsl:if test="$setMoreButton = 'true'">
<span class="moreButton">
<a>
<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:getStaticText">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="id"
select="'moreButtonTitle'" />
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module"
select="'SimpleOrganization'" />
<xsl:with-param name="id"
select="'moreButton'" />
</xsl:call-template>
</a>
</span>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
</xsl:template>
</xsl:stylesheet>