Integriertes Mandalay auf aktuellen Stand gebracht

git-svn-id: https://svn.libreccm.org/ccm/trunk@2312 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-09-01 08:20:34 +00:00
parent cef50ef24e
commit ffa311608f
6 changed files with 571 additions and 3 deletions

View File

@ -34,8 +34,7 @@
xmlns:terms="http://xmlns.redhat.com/london/terms/1.0"
xmlns:ppp="http://www.arsdigita.com/PublicPersonalProfile/1.0"
xmlns:atoz="http://www.arsdigita.com/atoz/1.0"
xmlns:mandalay="http://mandalay.quasiweb.de"
xmlns:atoz="http://xmlns.redhat.com/atoz/1.0"
xmlns:mandalay="http://mandalay.quasiweb.de"
exclude-result-prefixes="xsl aplaws bebop cms docs forum mandalay nav portal ppp search subsite terms ui"
version="1.0">

View File

@ -207,7 +207,7 @@
<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="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="'NewsItem'"/>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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/>.
-->
<settings>
<setting id="setImage">true</setting>
<setting id="setImageMaxHeight">300</setting>
<setting id="setImageMaxWidth">300</setting>
<setting id="setImageCaption">true</setting>
<setting id="setLeadText">true</setting>
<setting id="listView/setLeadText">true</setting>
<setting id="listView/setLeadTextLength">440</setting>
<setting id="listView/setMoreButton">true</setting>
<setting id="linkView/setImageAndText">true</setting>
<setting id="linkView/setImage">true</setting>
<setting id="linkView/setImageMaxHeight">200</setting>
<setting id="linkView/setImageMaxWidth">200</setting>
<setting id="linkView/setImageCaption">false</setting>
<setting id="linkView/setDescription">true</setting>
<setting id="linkView/setDescriptionLength">0</setting>
<setting id="linkView/setMoreButton">false</setting>
</settings>

View File

@ -41,6 +41,7 @@
<xsl:import href="types/XXX.xsl"/>
-->
<xsl:import href="types/ContentBundle.xsl"/>
<xsl:import href="types/DecisionTree.xsl"/>
<xsl:import href="types/PublicPersonalProfile.xsl"/>
<xsl:import href="types/SciDepartment.xsl"/>
<xsl:import href="types/SciInstitute.xsl"/>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet [<!ENTITY nbsp '<xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;'>]>
<!--
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:cms="http://www.arsdigita.com/cms/1.0"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:mandalay="http://mandalay.quasiweb.de"
xmlns:dabin="http://dabin.quasiweb.de"
exclude-result-prefixes="xsl bebop cms mandalay dabin"
version="1.0">
<xsl:import href="DecisionTree/DecisionTree.xsl"/>
</xsl:stylesheet>

View File

@ -0,0 +1,495 @@
<?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="bebop cms mandalay nav xsl"
version="1.0">
<xsl:template
name="CT_DecisionTree_graphics"
match="cms:item[objectType='com.arsdigita.cms.contenttypes.DecisionTree']"
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="'DecisionTree'"/>
<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="'DecisionTree'"/>
<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="'DecisionTree'"/>
<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="'DecisionTree'"/>
<xsl:with-param name="setting"
select="'setImageCaption'"/>
<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="'DecisionTree'"/>
<xsl:with-param name="setting"
select="'setLeadText'"/>
<xsl:with-param name="default"
select="'true'"/>
</xsl:call-template>
</xsl:variable>
<div id="greeting">
<xsl:if test="./pageDescription and $setLeadText = 'true'">
<div id="lead">
<xsl:value-of disable-output-escaping="yes"
select="./pageDescription"/>
</div>
</xsl:if>
</div>
<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>
<div id="mainBody">
<h2>
<xsl:value-of select="./sections/title"/>
</h2>
<div>
<xsl:value-of select="./sections/instructions"/>
</div>
<script type="text/javascript"
src="/templates/ccm-cms-types-decisiontree/forms.js"/>
<form method="get"
action="/templates/ccm-cms-types-decisiontree/form-handler.jsp">
<div>
<input name="section_oid"
type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="./sections[title]/@oid"/>
</xsl:attribute>
</input>
<input name="return_url"
type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="./customInfo/@currentURL"/>
</xsl:attribute>
</input>
<xsl:for-each select="./parameters">
<xsl:if test="./@name != 'output'">
<input type="hidden">
<xsl:attribute name="name">
<xsl:value-of select="./@name"/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="./@value"/>
</xsl:attribute>
</input>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="./sections/sectionOptions">
<xsl:sort select="./rank"/>
<p>
<label>
<xsl:attribute name="for">
<xsl:value-of select="./@oid"/>
</xsl:attribute>
<xsl:value-of select="./label"/>
</label>
<input type="radio">
<xsl:attribute name="name">
<xsl:value-of select="../parameterName"/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="./value"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="./@oid"/>
</xsl:attribute>
</input>
</p>
</xsl:for-each>
</div>
<div>
<input type="submit"
value="Cancel"
name="cancel"/>
<input type="submit"
onclick="return validate(this.form)"
value="Next >"
name="next"/>
</div>
</form>
</div>
</xsl:template>
<!-- DE Listenansicht -->
<!-- EN List View -->
<xsl:template
name="CT_DecisionTreeList"
match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.DecisionTree']"
mode="list_view">
<!-- DE Hole alle benötigten Einstellungen-->
<!-- EN Getting all needed setting-->
<xsl:variable name="setLeadText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'DecisionTree'"/>
<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="'DecisionTree'"/>
<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="'DecisionTree'"/>
<xsl:with-param name="setting"
select="'listView/setMoreButton'"/>
<xsl:with-param name="default"
select="'false'"/>
</xsl:call-template>
</xsl:variable>
<xsl:if
test="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']"/>&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:if>
</img>
</div>
</a>
</xsl:if>
<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: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']) > $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="'Article'"/>
<xsl:with-param name="id" select="'moreButtonTitle'"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'Article'"/>
<xsl:with-param name="id" select="'moreButton'"/>
</xsl:call-template>
</a>
</span>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:if>-->
</xsl:template>
<xsl:template name="CT_DecisionTree_Link"
match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.DecisionTree']">
<!-- DE Hole alle benötigten Einstellungen-->
<!-- EN Getting all needed setting-->
<xsl:variable name="setImageAndText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module"
select="'Article'"/>
<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="'Article'"/>
<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="'Article'"/>
<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="'Article'"/>
<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="'Article'"/>
<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="'Article'"/>
<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="'Article'"/>
<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="'Article'"/>
<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'">
<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:with-param name="setZoomLink"
select="'false'" />
</xsl:call-template>
</xsl:for-each>
</a>
</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="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: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 = '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="'Article'"/>
<xsl:with-param name="id"
select="'moreButtonTitle'"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module"
select="'Article'"/>
<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>