- Foundry support for FSI

- Some bugfixes for Foundry, especially for ItemList (URL for generating link to detail view was not passed through).


git-svn-id: https://svn.libreccm.org/ccm/trunk@3009 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-12-05 18:53:39 +00:00
parent 33e7772a08
commit 3ae747e8b8
13 changed files with 177 additions and 174 deletions

View File

@ -8,6 +8,7 @@
<application name="login" origin="internal">admin-layout.xml</application> <application name="login" origin="internal">admin-layout.xml</application>
<application name="navigation" class="portalPage">portal-workspace.xml</application> <application name="navigation" class="portalPage">portal-workspace.xml</application>
<application name="navigation" class="portalGridPage">portal-workspace-grid.xml</application> <application name="navigation" class="portalGridPage">portal-workspace-grid.xml</application>
<application name="navigation" class="simplePage">nav-default.xml</application>
<application name="none" class="cms-admin" origin="internal">admin-layout.xml</application> <application name="none" class="cms-admin" origin="internal">admin-layout.xml</application>
<application name="portal">portal-workspace.xml</application> <application name="portal">portal-workspace.xml</application>
<default>default-layout.xml</default> <default>default-layout.xml</default>
@ -27,6 +28,9 @@
<content-item content-type="com.arsdigita.cms.contenttypes.Event"> <content-item content-type="com.arsdigita.cms.contenttypes.Event">
content-items/event-detail.xml content-items/event-detail.xml
</content-item> </content-item>
<content-item content-type="com.arsdigita.cms.contenttypes.FileStorageItem">
content-items/fsi-detail.xml
</content-item>
<content-item content-type="com.arsdigita.cms.contenttypes.MultiPartArticle"> <content-item content-type="com.arsdigita.cms.contenttypes.MultiPartArticle">
content-items/mpa-detail.xml content-items/mpa-detail.xml
</content-item> </content-item>
@ -45,6 +49,12 @@
<content-item content-type="com.arsdigita.cms.contenttypes.Article"> <content-item content-type="com.arsdigita.cms.contenttypes.Article">
content-items/article-list.xml content-items/article-list.xml
</content-item> </content-item>
<content-item content-type="com.arsdigita.cms.contenttypes.FileStorageItem">
content-items/fsi-list.xml
</content-item>
<content-item content-type="com.arsdigita.cms.contenttypes.NewsItem">
content-items/article-list.xml
</content-item>
<content-item content-type="com.arsdigita.cms.contenttypes.MultiPartArticle"> <content-item content-type="com.arsdigita.cms.contenttypes.MultiPartArticle">
content-items/mpa-list.xml content-items/mpa-list.xml
</content-item> </content-item>

View File

@ -195,6 +195,10 @@ header nav ul li.active a {
color: #ff9840; color: #ff9840;
} }
main.content-width {
margin-bottom: 11em;
}
main h1 { main h1 {
margin-top: 1em; margin-top: 1em;
font-family: "Caption", sans-serif; font-family: "Caption", sans-serif;
@ -289,7 +293,7 @@ main nav ul li.active:after {
footer { footer {
margin: 0; margin: 0;
padding-bottom: 0; padding-bottom: 0;
position: absolute; position: fixed;
bottom: 0em; bottom: 0em;
left: 0; left: 0;
width: 100%; width: 100%;

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<content-item-layout> <content-item-layout>
<h2> <a>
<content-item-title/> <content-item-title/>
</h2> </a>
<div class="lead"> <div class="lead">
<lead-text/> <lead-text/>
</div> </div>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<content-item-layout>
<div class="lead">
<fsi-description/>
</div>
<fsi-link use-filename="yes" mode="stream">
<a>
<show-text module="fsi">links/view</show-text>
</a>
</fsi-link>
<fsi-link use-filename="yes" mode="download">
<a>
<show-text module="fsi">links/download</show-text>
</a>
</fsi-link>
</content-item-layout>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<content-item-layout>
<a>
<content-item-title/>
</a>
<div class="lead">
<fsi-description/>
</div>
</content-item-layout>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<content-item-layout> <content-item-layout>
<h2> <a>
<content-item-title/> <content-item-title/>
</h2> </a>
</content-item-layout> </content-item-layout>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<page-layout>
<head>
<title>
<separator>: </separator>
<show-text>layout/page/head/title</show-text>
<show-page-title/>
</title>
<load-css-files/>
</head>
<body>
<include file="fragments/header-with-nav.xml"/>
<main class="content-width">
<include file="fragments/second-level-nav.xml"/>
<div>
<h1>
<show-page-title/>
</h1>
<content-item mode="detail"/>
</div>
<object-list id="itemList">
<ul>
<object-list-item>
<li>
<content-item mode="list"/>
</li>
</object-list-item>
</ul>
</object-list>
</main>
<include file="fragments/footer.xml"/>
</body>
</page-layout>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
<text id="links/download">
<translation lang="de">Herunterladen</translation>
<translation lang="en">Download</translation>
</text>
<text id="links/view">
<translation lang="de">Ansehen</translation>
<translation lang="en">View</translation>
</text>
</foundry:static-texts>

View File

@ -33,6 +33,7 @@
<xsl:import href="content-items/bookmark.xsl"/> <xsl:import href="content-items/bookmark.xsl"/>
<xsl:import href="content-items/decisiontree.xsl"/> <xsl:import href="content-items/decisiontree.xsl"/>
<xsl:import href="content-items/event.xsl"/> <xsl:import href="content-items/event.xsl"/>
<xsl:import href="content-items/fsi.xsl"/>
<xsl:import href="content-items/mpa.xsl"/> <xsl:import href="content-items/mpa.xsl"/>
<xsl:import href="content-items/news.xsl"/> <xsl:import href="content-items/news.xsl"/>
<xsl:import href="content-items/siteproxy.xsl"/> <xsl:import href="content-items/siteproxy.xsl"/>
@ -132,173 +133,6 @@
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
<!--<xsl:variable name="contentitem-tree">
<xsl:choose>
<xsl:when test="$data-tree/nav:greetingItem">
<xsl:copy-of select="$data-tree/nav:greetingItem/cms:item/*"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$data-tree/cms:contentPanel/cms:item/*"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>-->
<!--<xsl:variable name="oid" select="$contentitem-tree/masterVersion/@oid"/>-->
<!--<xsl:variable name="content-section">
<xsl:choose>
<xsl:when test="$data-tree/nav:greetingItem">
<xsl:value-of select="$data-tree/nav:greetingItem/cms:pathInfo/cms:sectionPath"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$data-tree/cms:contentPanel/cms:pathInfo/cms:sectionPath"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>-->
<!--<xsl:variable name="category" select="foundry:read-current-category()"/>
<xsl:variable name="content-type" select="$contentitem-tree/objectType"/>
<xsl:variable name="template-map">
<xsl:copy-of select="document(foundry:gen-path('conf/templates.xml'))/templates/content-items/detail/*"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$template-map/content-item[@oid = $oid]">
<xsl:message>
<xsl:value-of select="foundry:message-info('Found template for this special item.')"/>
</xsl:message>
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[@oid = $oid]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section
and @category = $category
and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section
and @category = $category
and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section
and @category = $category
and not(@content-type)]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section
and @category = $category
and not(@content-type)]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section
and not(@category)
and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section
and not(@category)
and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section
and not(@category)
and not(@content-type)]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section
and not(@category)
and not(@content-type)]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[not(@content-section)
and @category = $category
and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[not(@content-section)
and @category = $category
and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[not(@content-section)
and @category = $category
and not(@content-type)]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[not(@content-section)
and @category = $category
and not(@content-type)]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/content-item[not(@content-section)
and not(@category)
and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/content-item[not(@content-section)
and not(@category)
and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$template-map/default">
<xsl:message>
<xsl:value-of select="foundry:message-info('No template for item found. Using default')"/>
</xsl:message>
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="$template-map/default"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:value-of select="foundry:message-info('No template for item found and not default configured. Using internal default')"/>
</xsl:message>
<xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file"
select="'contentitem-default-detail.xml'"/>
<xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/>
<xsl:with-param name="internal"
select="true()"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>-->
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
This file is part of the Foundry Theme Engine for LibreCCM
Foundry 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.
Foundry 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 Foundry If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
xmlns:foundry="http://foundry.libreccm.org"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:ui="http://www.arsdigita.com/ui/1.0"
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
version="2.0">
<xsl:template match="/content-item-layout//fsi-description">
<xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:choose>
<xsl:when test="$contentitem-tree/description">
<xsl:value-of disable-output-escaping="yes"
select="$contentitem-tree/description"/>
</xsl:when>
<xsl:when test="$contentitem-tree/nav:attribute[@name = 'description']">
<xsl:value-of disable-output-escaping="yes"
select="$contentitem-tree/nav:attribute[@name = 'description']"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="/content-item-layout//fsi-link">
<xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:variable name="mode"
select="if (./@mode = 'stream')
then 'stream'
else 'download'"/>
<xsl:apply-templates>
<xsl:with-param name="href" tunnel="yes">
<xsl:choose>
<xsl:when test="foundry:boolean(./@use-filename)">
<xsl:value-of select="concat($dispatcher-prefix,
'/cms-service/',
$mode,
'/asset/',
$contentitem-tree/file/name,
'?asset_id=',
$contentitem-tree/file/id)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($dispatcher-prefix,
'/cms-service/',
$mode,
'/asset/?asset_id=',
$contentitem-tree/file/id)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
</xsl:stylesheet>

View File

@ -96,6 +96,7 @@
select="concat(./nav:attribute[@name = 'masterVersion.id'], select="concat(./nav:attribute[@name = 'masterVersion.id'],
'_', '_',
nav:attribute[@name = 'name'])"/> nav:attribute[@name = 'name'])"/>
<xsl:with-param name="href" tunnel="yes" select="./nav:path"/>
<xsl:with-param name="class"> <xsl:with-param name="class">
<xsl:choose> <xsl:choose>
<xsl:when test="position() = 1"> <xsl:when test="position() = 1">

View File

@ -4,6 +4,7 @@
top: 0; top: 0;
width: 1em; width: 1em;
height: 1em; height: 1em;
z-index: 999;
} }
#foundry-debug-panel #foundry-debug-panel-content{ #foundry-debug-panel #foundry-debug-panel-content{

View File

@ -114,9 +114,9 @@
<xsl:value-of select="./sections/instructions"/> <xsl:value-of select="./sections/instructions"/>
</div> </div>
<script type="text/javascript" <script type="text/javascript"
src="{$content-prefix}/templates/ccm-cms-types-decisiontree/forms.js"/> src="{$context-prefix}/templates/ccm-cms-types-decisiontree/forms.js"/>
<form method="get" <form method="get"
action="{}/templates/ccm-cms-types-decisiontree/form-handler.jsp"> action="{$context-prefix}/templates/ccm-cms-types-decisiontree/form-handler.jsp">
<div> <div>
<input name="section_oid" <input name="section_oid"
type="hidden"> type="hidden">