Mandalay support for the new SubSiteBanner

git-svn-id: https://svn.libreccm.org/ccm/trunk@2512 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-02-08 14:21:07 +00:00
parent f9e11f3f34
commit a4e3c23b55
7 changed files with 222 additions and 98 deletions

View File

@ -0,0 +1,34 @@
<?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/>.
-->
<translations>
<line id="lang">Deutsch</line>
<line id="version">0.1</line>
<!--
This file is used for the providing localised Texts for the SubSiteBanner
The id of the line is the name (URL) of the site, for example www.example.org.
If you use a none standard port, you must add the port: www.example.org:8080
-->
<line id="www.example.com">Die Beispiel-Firma</line>
<line id="www.example.org">Die Beispiel-Organisation</line>
</translations>

View File

@ -0,0 +1,34 @@
<?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/>.
-->
<translations>
<line id="lang">Deutsch</line>
<line id="version">0.1</line>
<!--
This file is used for the providing localised Texts for the SubSiteBanner
The id of the line is the name (URL) of the site, for example www.example.org.
If you use a none standard port, you must add the port: www.example.org:8080
-->
<line id="www.example.com">The Example Company</line>
<line id="www.example.org">The Example Organisation</line>
</translations>

View File

@ -59,6 +59,7 @@
<showText class="siteTitle"> <showText class="siteTitle">
<line>layout/page/header/title</line> <line>layout/page/header/title</line>
</showText> </showText>
<showSubSiteBanner/>
<div id="nav" class="contentWidth"> <div id="nav" class="contentWidth">
<showNavigationMenu> <showNavigationMenu>
<setMinLevel>0</setMinLevel> <setMinLevel>0</setMinLevel>

View File

@ -56,6 +56,10 @@
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="showSubSiteBanner">
<xsl:call-template name="subsiteBanner"/>
</xsl:template>
<xsl:template match="useEditLink"> <xsl:template match="useEditLink">
<xsl:choose> <xsl:choose>
<xsl:when test="$resultTree//cms:contentPanel/cms:item/editLink"> <xsl:when test="$resultTree//cms:contentPanel/cms:item/editLink">

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet [<!ENTITY nbsp '&#160;'>]>
<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"
exclude-result-prefixes="xsl bebop cms"
version="1.0">
<xsl:import href="subsite/subsiteBanner.xsl"/>
</xsl:stylesheet>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet [<!ENTITY nbsp '&#160;'>]>
<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:mandalay="http://mandalay.quasiweb.de"
xmlns:ui="http://www.arsdigita.com/ui/1.0"
exclude-result-prefixes="xsl bebop cms mandalay ui"
version="1.0">
<xsl:template name="subsiteBanner">
<xsl:param name="layoutTree" select="."/>
<xsl:if test="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']">
<div class="siteBanner subSiteBanner">
<xsl:variable name="subsiteBannerText">
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'subSiteBanner'"/>
<xsl:with-param name="id"
select="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="(string-length($subsiteBannerText) &lt; 1) or (contains(subsiteBannerText, 'Missing translation'))">
<xsl:value-of select="$resultTree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$subsiteBannerText"/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -41,9 +41,11 @@
<xsl:import href="includes/mandalay.xsl"/> <xsl:import href="includes/mandalay.xsl"/>
<xsl:import href="includes/navigation.xsl"/> <xsl:import href="includes/navigation.xsl"/>
<xsl:import href="includes/types.xsl"/>
<xsl:import href="includes/public-personal-profile.xsl"/> <xsl:import href="includes/public-personal-profile.xsl"/>
<xsl:import href="includes/piwik.xsl"/> <xsl:import href="includes/piwik.xsl"/>
<xsl:import href="includes/subsite.xsl"/>
<xsl:import href="includes/types.xsl"/>
<!--<xsl:import href="includes/weblog.xsl"/>--> <!--<xsl:import href="includes/weblog.xsl"/>-->
<!--<xsl:import href="includes/atoz.xsl"/>--> <!--<xsl:import href="includes/atoz.xsl"/>-->