Foundry support for item summary

git-svn-id: https://svn.libreccm.org/ccm/trunk@3078 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-01-15 13:58:27 +00:00
parent e5f3432bcb
commit 8cb473a69f
9 changed files with 598 additions and 9 deletions

View File

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<foundry:configuration xmlns:foundry="http://foundry.libreccm.org">
<setting id="content-view-menu/layout">horizontal</setting>
<setting id="category-step-summary/show-delete-link">false</setting>
<setting id="summary/show-comments">yes</setting>
<setting id="summary/show-none-comment">yes</setting>
</foundry:configuration>

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8" ?>
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
<text id="greeting">
<translation lang="de">Willkommen</translation>
<translation lang="en">Welcome</translation>
</text>
<text id="category-step/header">
<translation lang="de">Kategorienzuweisen bearbeiten</translation>
<translation lang="en">Edit assigned categories</translation>
</text>
<text id="category-step/add-categories">
<translation lang="de">Kategoriezuweisung ändern</translation>
<translation lang="en">Change associated categories</translation>
</text>
<text id="category-step/no-categories">
<translation lang="de">Es sind keine Kategorien dieses Kontextes zugewiesen</translation>
<translation lang="en">There are no categories assigned in this context.</translation>
</text>
<text id="category-step/remove-category">
<translation lang="de">Zuweisung aufheben</translation>
<translation lang="en">Remove assignment</translation>
</text>
<text id="summary/itemSummary/header">
<translation lang="en">Item Summary</translation>
<translation lang="de">Zusammenfassung</translation>
</text>
<text id="summary/itemSummary/type">
<translation lang="en">Content type: </translation>
<translation lang="de">Dokumenttyp</translation>
</text>
<text id="summary/itemSummary/name">
<translation lang="en">Name: </translation>
<translation lang="de">Name: </translation>
</text>
<text id="summary/itemSummary/title">
<translation lang="en">Title: </translation>
<translation lang="de">Titel: </translation>
</text>
<text id="summary/itemSummary/description">
<translation lang="en">Description: </translation>
<translation lang="de">Beschreibung: </translation>
</text>
<text id="summary/itemSummary/subjectCategories">
<translation lang="en">Subject categories: </translation>
<translation lang="de">Schlagwörter: </translation>
</text>
<text id="summary/categorySummary/header">
<translation lang="en">Categories</translation>
<translation lang="de">Kategorien</translation>
</text>
<text id="summary/stableLink/header">
<translation lang="en">Stable Link</translation>
<translation lang="de">Permalink</translation>
</text>
<text id="summary/lifecycle/header">
<translation lang="en">Lifecyle</translation>
<translation lang="de">Lebenszyklus</translation>
</text>
<text id="summary/lifecycle/noLifecycle">
<translation lang="en">No lifecycle</translation>
<translation lang="de">Kein Lebenszyklus definiert</translation>
</text>
<text id="summary/lifecycle/itemNotYetPublished/startText">
<translation lang="en">This item is scheduled to be published on </translation>
<translation lang="de">Dieser Dokument wird am </translation>
</text>
<text id="summary/lifecycle/itemNotYetPublished/middleText">
<translation lang="en"> and will </translation>
<translation lang="de">veröffentlicht und </translation>
</text>
<text id="summary/lifecycle/itemNotYetPublished/endText">
<translation lang="en">.</translation>
<translation lang="de"> entfernt werden.</translation>
</text>
<text id="summary/lifecycle/itemAlreadyEnded/startText">
<translation lang="en">This item was published on </translation>
<translation lang="de">Dieser Dokument wurde am</translation>
</text>
<text id="summary/lifecycle/itemAlreadyEnded/middleText">
<translation lang="en">and expired on </translation>
<translation lang="de"> veröffentlicht und </translation>
</text>
<text id="summary/lifecycle/itemAlreadyEnded/endText">
<translation lang="en">.</translation>
<translation lang="de"> wieder entfernt.</translation>
</text>
<text id="summary/lifecycle/itemPublished/startText">
<translation lang="en">This item was published on </translation>
<translation lang="de">Dieser Dokument wurde am </translation>
</text>
<text id="summary/lifecycle/itemPublished/middleText">
<translation lang="en"> and will </translation>
<translation lang="de"> veröffentlicht und wird </translation>
</text>
<text id="summary/lifecycle/itemPublished/endText">
<translation lang="en">.</translation>
<translation lang="de">entfernt.</translation>
</text>
<text id="summary/workflow/header">
<translation lang="en">Workflow</translation>
<translation lang="de">Arbeitsablauf</translation>
</text>
<text id="summary/workflow/restartEditing">
<translation lang="en">Restart editing</translation>
<translation lang="de">Erneut bearbeiten</translation>
</text>
<text id="summary/workflow/noComment">
<translation lang="en">No Comment</translation>
<translation lang="de">Kein Kommentar</translation>
</text>
<text id="summary/revisionSummary/header">
<translation lang="en">Revisions</translation>
<translation lang="de">Revisionen</translation>
</text>
<text id="summary/revisionSummary/currentRevision">
<translation lang="en">Current Revision</translation>
<translation lang="de">Aktuelle Revision</translation>
</text>
<text id="summary/revisionSummary/initialRevision">
<translation lang="en">Initial Revision</translation>
<translation lang="de">Ursprüngliche Revision</translation>
</text>
<text id="summary/revisionSummary/viewRevision">
<translation lang="en">View Revision</translation>
<translation lang="de">Revision ansehen</translation>
</text>
</foundry:static-texts>

View File

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<foundry:configuration xmlns:foundry="http://foundry.libreccm.org">
<setting id="content-view-menu/layout">horizontal</setting>
<setting id="category-step-summary/show-delete-link">false</setting>
<setting id="summary/show-comments">yes</setting>
<setting id="summary/show-none-comment">yes</setting>
</foundry:configuration>

View File

@ -24,6 +24,7 @@
version="2.0">
<xsl:import href="lib/bebop.xsl"/>
<xsl:import href="lib/cms.xsl"/>
<!--<xsl:import href="lib/portlets.xsl"/>-->
<xsl:import href="lib/global-vars.xsl"/>
<xsl:import href="lib/search.xsl"/>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet>
<!--
Copyright 2015 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"
exclude-result-prefixes="xsl"
version="2.0">
<xsl:import href="cms/item-summary.xsl"/>
</xsl:stylesheet>

View File

@ -0,0 +1,310 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet>
<!--
Copyright 2015 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: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"
exclude-result-prefixes="xsl bebop cms foundry nav"
version="2.0">
<!-- Show item summary -->
<xsl:template match="cms:itemSummary">
<div class="cmsSummarySection">
<h3 class="cmsSummaryHeading">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/itemSummary/header')"/>
</h3>
<div class="cmsSummaryBody table">
<div class="tableRow">
<span class="key">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/itemSummary/type')"/>
</span>
<span class="value">
<xsl:value-of select="@objectType"/>
</span>
</div>
</div>
<div class="tableRow">
<span class="key">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/itemSummary/name')"/>
</span>
<span class="value">
<xsl:value-of select="@name"/>
</span>
</div>
<div class="tableRow">
<span class="key">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/itemSummary/title')"/>
</span>
<span class="value">
<xsl:value-of select="@title"/>
</span>
</div>
<xsl:apply-templates select="cms:subjectCategories"/>
<div class="tableRow">
<span class="key">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/itemSummary/description')"/>
</span>
<span class="value">
<xsl:value-of disable-output-escaping="yes" select="@description"/>
</span>
</div>
</div>
</xsl:template>
<!-- show subject categories -->
<xsl:template match="cms:subjectCategories">
<div class="tableRow">
<span class="key">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/itemSummary/subjectCategories')"/>
</span>
<span class="value">
<xsl:apply-templates/>
</span>
</div>
</xsl:template>
<!-- Shows a subject category -->
<xsl:template match="cms:subjectCategory">
<ul>
<li>
<xsl:value-of disable-output-escaping="yes" select="."/>
</li>
</ul>
</xsl:template>
<!-- Shows the categories -->
<xsl:template match="cms:categorySummary">
<div class="cmsSummarySection">
<h3 class="cmsSummaryHeading">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/categorySummary/header')"/>
</h3>
<div class="cmsSummaryBody">
<xsl:apply-templates mode="summary"/>
</div>
</div>
</xsl:template>
<!-- cms:category is using to different syntax. The other one is located
in cmsCategoryStep. -->
<xsl:template match="cms:category" mode="summary">
<ul class="categoryList">
<li>
<xsl:value-of disable-output-escaping="yes" select="."/>
</li>
</ul>
</xsl:template>
<!-- shows the stable link -->
<xsl:template match="cms:linkSummary">
<div class="cmsSummarySection">
<h3 class="cmsSummaryHeading">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/stableLink/header')"/>
</h3>
<div class="cmsSummaryBody">
<a href="{@url}">
<xsl:value-of select="@url"/>
</a>
</div>
</div>
</xsl:template>
<!-- Shows the lifecycle -->
<xsl:template match="cms:lifecycleSummary">
<div class="cmsSummarySection">
<h3 class="cmsSummaryHeading">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/header')"/>
</h3>
<div class="cmsSummaryBody table">
<xsl:choose>
<xsl:when test="@noLifecycle">
<span class="noInfo">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/noLifecycle')"/>
</span>
</xsl:when>
<xsl:otherwise>
<span class="key">
<xsl:value-of select="@name"/>
</span>
<span class="value">
<xsl:choose>
<xsl:when test="@hasBegun='false'">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemNotYetPublished/startText')"/>
<xsl:value-of select="@startDate"/>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemNotYetPublished/middleText')"/>
<xsl:value-of select="@endDateString"/>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemNotYetPublished/endText')"/>
</xsl:when>
<xsl:when test="@hasEnded='true'">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemAlreadyEnded/startText')"/>
<xsl:value-of select="@startDate"/>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemAlreadEnded/middleText')"/>
<xsl:value-of select="@endDate"/>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemAlreadyEnded/endText')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemPublished/startText')"/>
<xsl:value-of select="@startDate"/>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemPublished/middleText')"/>
<xsl:value-of select="@endDateString"/>
<xsl:value-of select="foundry:get-static-text('cms',
'summary/lifecycle/itemPublished/endText')"/>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:template>
<!-- Shows the workflow -->
<xsl:template match="cms:workflowSummary">
<div class="cmsSummarySection">
<h3 class="cmsSummaryHeading">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/workflow/header')"/>
</h3>
<div class="cmsSummaryBody">
<xsl:if test="@restartWorkflowURL">
<a href="{@restartWorkflowURL}">
<xsl:value-of select="foundry:get-static-text('cms',
'summary/workflow/restartEditing')"/>
</a>
</xsl:if>
<xsl:apply-templates/>
</div>
</div>
</xsl:template>
<!-- Shows a task -->
<xsl:template match="cms:task">
<div class="cmsTask tableRow">
<span class="tableCell">
<span class="key">
<xsl:value-of select="@name"/>
</span>
<span class="status tableCell">
(
<xsl:value-of select="@state"/>
)
</span>
</span>
<xsl:if test="foundry:boolean(foundry:get-setting('cms', 'show-comments', 'true'))">
<xsl:if test="not(cms:taskComment)">
<xsl:if test="foundry:boolean(foundry:get-setting('cms', 'show-none-comments', 'true'))">
<span class="noInfo tableCell">
<xsl:value-of select="foundry:get-static-text('cms', 'summary/workflow/noComment')"/>
</span>
</xsl:if>
</xsl:if>
<xsl:apply-templates/>
</xsl:if>
</div>
</xsl:template>
<!-- Shows a non-empty comment -->
<xsl:template match="cms:taskComment">
<xsl:if test="./@comment != '' and ./@comment != ' '">
<span class="cmsTaskComment">
<xsl:value-of select="./@comment"/>
<br />
<span class="cmsTaskCommentCredentials">
<xsl:value-of select="concat(./@date, '&#x20;', './@author')"/>
</span>
</span>
</xsl:if>
</xsl:template>
<!-- Shows information about revisions -->
<xsl:template match="cms:transactionSummary">
<div class="cmsSummarySection">
<h3 class="cmsSummaryHeading">
<xsl:value-of select="foundry:get-static-text('cms', 'summary/revisionSummary/header')"/>
</h3>
<div class="cmsSummaryBody table">
<div class="tableRow">
<span class="cmsCurrentRevision tableCell">
<xsl:value-of select="./@lastModifiedDate"/>
</span>
<span class="cmsCurrentRevision tableCell">
<xsl:value-of select="foundry:get-static-text('cms', 'summary/revisionSummary/currentRevision')"/>
</span>
</div>
<xsl:apply-templates/>
<div class="tableRow">
<span class="cmsInitialRevision tableCell">
<xsl:value-of select="@creationDate"/>
</span>
<span class="cmsInitialRevision tableCell">
<xsl:value-of select="foundry:get-static-text('cms', 'summary/revisionSummary/inititalRevision')"/>
</span>
</div>
</div>
</div>
</xsl:template>
<!-- Shows information about transactions -->
<xsl:template match="cms:transaction">
<div class="cmsTransaction tableRow">
<span class="cmsTransactionDate tableCell">
<a href="/ccm{@url}">
<xsl:attribute name="title">
<xsl:value-of select="foundry:get-static-text('cms', 'summary/revisionSummary/viewRevision')"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="foundry:get-static-text('cms', 'summary/revisionSummary/viewRevision')"/>
</xsl:attribute>
<xsl:value-of select="./@date"/>
</a>
</span>
<span class="cmsTransactionAuthor tableCell">
<xsl:value-of select="./@author"/>
</span>
<span class="cmsTransactionLink tableCell">
</span>
</div>
</xsl:template>
</xsl:stylesheet>

View File

@ -22,8 +22,7 @@
<!-- This file was copied from Mandalay and edited to work with Foundry. -->
<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:foundry="http://foundry.libreccm.org"

View File

@ -73,7 +73,7 @@
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="/bebop:page/@class='cms-admin'">
<xsl:value-of select="concat($context-prefix, '/ccm/', ./@contentSectionName, '/admin/item.jsp?item_id=', ./@id, '&amp;setTab=1')"/>
<xsl:value-of select="concat($context-prefix, '/ccm/', ./@contentSectionName, '/admin/item.jsp?item_id=', ./@id, '&amp;set_tab=1')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./@url"/>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
<text id="greeting">
<translation lang="de">Willkommen</translation>
<translation lang="en">Welcome</translation>
@ -22,4 +23,113 @@
<translation lang="de">Zuweisung aufheben</translation>
<translation lang="en">Remove assignment</translation>
</text>
<text id="summary/itemSummary/header">
<translation lang="en">Item Summary</translation>
<translation lang="de">Zusammenfassung</translation>
</text>
<text id="summary/itemSummary/type">
<translation lang="en">Content type: </translation>
<translation lang="de">Dokumenttyp</translation>
</text>
<text id="summary/itemSummary/name">
<translation lang="en">Name: </translation>
<translation lang="de">Name: </translation>
</text>
<text id="summary/itemSummary/title">
<translation lang="en">Title: </translation>
<translation lang="de">Titel: </translation>
</text>
<text id="summary/itemSummary/description">
<translation lang="en">Description: </translation>
<translation lang="de">Beschreibung: </translation>
</text>
<text id="summary/itemSummary/subjectCategories">
<translation lang="en">Subject categories: </translation>
<translation lang="de">Schlagwörter: </translation>
</text>
<text id="summary/categorySummary/header">
<translation lang="en">Categories</translation>
<translation lang="de">Kategorien</translation>
</text>
<text id="summary/stableLink/header">
<translation lang="en">Stable Link</translation>
<translation lang="de">Permalink</translation>
</text>
<text id="summary/lifecycle/header">
<translation lang="en">Lifecyle</translation>
<translation lang="de">Lebenszyklus</translation>
</text>
<text id="summary/lifecycle/noLifecycle">
<translation lang="en">No lifecycle</translation>
<translation lang="de">Kein Lebenszyklus definiert</translation>
</text>
<text id="summary/lifecycle/itemNotYetPublished/startText">
<translation lang="en">This item is scheduled to be published on </translation>
<translation lang="de">Dieser Dokument wird am </translation>
</text>
<text id="summary/lifecycle/itemNotYetPublished/middleText">
<translation lang="en"> and will </translation>
<translation lang="de">veröffentlicht und </translation>
</text>
<text id="summary/lifecycle/itemNotYetPublished/endText">
<translation lang="en">.</translation>
<translation lang="de"> entfernt werden.</translation>
</text>
<text id="summary/lifecycle/itemAlreadyEnded/startText">
<translation lang="en">This item was published on </translation>
<translation lang="de">Dieser Dokument wurde am</translation>
</text>
<text id="summary/lifecycle/itemAlreadyEnded/middleText">
<translation lang="en">and expired on </translation>
<translation lang="de"> veröffentlicht und </translation>
</text>
<text id="summary/lifecycle/itemAlreadyEnded/endText">
<translation lang="en">.</translation>
<translation lang="de"> wieder entfernt.</translation>
</text>
<text id="summary/lifecycle/itemPublished/startText">
<translation lang="en">This item was published on </translation>
<translation lang="de">Dieser Dokument wurde am </translation>
</text>
<text id="summary/lifecycle/itemPublished/middleText">
<translation lang="en"> and will </translation>
<translation lang="de"> veröffentlicht und wird </translation>
</text>
<text id="summary/lifecycle/itemPublished/endText">
<translation lang="en">.</translation>
<translation lang="de">entfernt.</translation>
</text>
<text id="summary/workflow/header">
<translation lang="en">Workflow</translation>
<translation lang="de">Arbeitsablauf</translation>
</text>
<text id="summary/workflow/restartEditing">
<translation lang="en">Restart editing</translation>
<translation lang="de">Erneut bearbeiten</translation>
</text>
<text id="summary/workflow/noComment">
<translation lang="en">No Comment</translation>
<translation lang="de">Kein Kommentar</translation>
</text>
<text id="summary/revisionSummary/header">
<translation lang="en">Revisions</translation>
<translation lang="de">Revisionen</translation>
</text>
<text id="summary/revisionSummary/currentRevision">
<translation lang="en">Current Revision</translation>
<translation lang="de">Aktuelle Revision</translation>
</text>
<text id="summary/revisionSummary/initialRevision">
<translation lang="en">Initial Revision</translation>
<translation lang="de">Ursprüngliche Revision</translation>
</text>
<text id="summary/revisionSummary/viewRevision">
<translation lang="en">View Revision</translation>
<translation lang="de">Revision ansehen</translation>
</text>
</foundry:static-texts>