Foundry: Documentation for several tags.

git-svn-id: https://svn.libreccm.org/ccm/trunk@3408 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-05-18 09:30:20 +00:00
parent 5151297373
commit d3c0f5c714
6 changed files with 425 additions and 86 deletions

View File

@ -53,11 +53,14 @@
<xsl:import href="content-items/assets/related-links.xsl"/> <xsl:import href="content-items/assets/related-links.xsl"/>
<foundry:doc-file> <foundry:doc-file>
<foundry:doc-file-title>Tags for displaying Content Items</foundry:doc-file-title> <foundry:doc-file-title>
Tags for displaying Content Items
</foundry:doc-file-title>
<foundry:doc-file-desc> <foundry:doc-file-desc>
<p> <p>
These tags are common tags for displaying Content Items. For most Content Types These tags are common tags for displaying Content Items.
there are special tags provided by other files. For most Content Types there are special tags provided by other
files.
</p> </p>
</foundry:doc-file-desc> </foundry:doc-file-desc>
</foundry:doc-file> </foundry:doc-file>
@ -65,47 +68,53 @@
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
<p> <p>
The <code>content-item</code> element with the attribute <code>mode</code> set to The <code>content-item</code> element with the attribute <
<code>detail</code> or without the attribute inserts the HTML representation of the code>mode</code> set to <code>detail</code> or without the
detail view of the current content item. The content item can either be the greeting attribute inserts the HTML representation of the detail view of
item or normal item. the current content item. The content item can either be the
greeting item or normal item.
</p> </p>
<p> <p>
The HTML representation of a content item is defined using special templates The HTML representation of a content item is defined using
with the <code>contentitem-layout</code> element as root. Usually these templates special templates with the <code>contentitem-layout</code>
are located in the <code>templates/content-items</code> folder. Which template is element as root. Usually these templates are located in the
used for a particular content item is defined by the <code>conf/templates.xml</code> <code>templates/content-items</code> folder. Which template is
file. In this file there is a <code>content-items</code> element below the used for a particular content item is defined by the
<code>templates</code> element. The association between templates and <code>conf/templates.xml</code> file. In this file there is a
content items is described by the <code>content-item</code> elements in the <code>content-items</code> element below the
<code>content-items</code> element. The <code>content-item</code> has four <code>templates</code> element. The association between
optional attributes (at least on must be present) which are used to limit the templates and content items is described by the
content items for which a template is used. The four attributes are: <code>content-item</code> elements in the
<code>content-items</code> element. The
<code>content-item</code> has four optional attributes
(at least on must be present) which are used to limit the
content items for which a template is used. The four attributes
are:
</p> </p>
<dl> <dl>
<dt> <dt>
<code>oid</code> <code>oid</code>
</dt> </dt>
<dd> <dd>
Limit the use of the template to a specific content item, identified by its Limit the use of the template to a specific content item,
OID (the OID of the master version). Can't be used in combination with the other identified by its OID (the OID of the master version). Can't
attributes. be used in combination with the other attributes.
</dd> </dd>
<dt> <dt>
<code>content-section</code> <code>content-section</code>
</dt> </dt>
<dd> <dd>
The name of the content section to which the item belongs. Can be used The name of the content section to which the item belongs.
in combination with the <code>category</code> and <code>content-type</code> Can be used in combination with the <code>category</code>
attributes. and <code>content-type</code> attributes.
</dd> </dd>
<dt> <dt>
<code>category</code> <code>category</code>
</dt> </dt>
<dd> <dd>
The template is only used for the content item if the item is viewed as The template is only used for the content item if the item
item of the category. The category is set as a path containing the names is viewed as item of the category. The category is set as
the categories. a path containing the names the categories.
</dd> </dd>
<dt> <dt>
<code>content-type</code> <code>content-type</code>
@ -116,7 +125,9 @@
</dl> </dl>
</foundry:doc-desc> </foundry:doc-desc>
<foundry:doc-see-also> <foundry:doc-see-also>
<foundry:doc-link href="#layout-templates">The template system</foundry:doc-link> <foundry:doc-link href="#layout-templates">
The template system
</foundry:doc-link>
</foundry:doc-see-also> </foundry:doc-see-also>
</foundry:doc> </foundry:doc>
<xsl:template match="content-item[@mode = 'detail' or not(@mode)]"> <xsl:template match="content-item[@mode = 'detail' or not(@mode)]">
@ -191,91 +202,91 @@
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section <xsl:when test="$template-map/content-item[@content-section = $content-section
and @category = $category and @category = $category
and @content-type = $content-type]"> and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section select="$template-map/content-item[@content-section = $content-section
and @category = $category and @category = $category
and @content-type = $content-type]"/> and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section <xsl:when test="$template-map/content-item[@content-section = $content-section
and @category = $category and @category = $category
and not(@content-type)]"> and not(@content-type)]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section select="$template-map/content-item[@content-section = $content-section
and @category = $category and @category = $category
and not(@content-type)]"/> and not(@content-type)]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section <xsl:when test="$template-map/content-item[@content-section = $content-section
and not(@category) and not(@category)
and @content-type = $content-type]"> and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section select="$template-map/content-item[@content-section = $content-section
and not(@category) and not(@category)
and @content-type = $content-type]"/> and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[@content-section = $content-section <xsl:when test="$template-map/content-item[@content-section = $content-section
and not(@category) and not(@category)
and not(@content-type)]"> and not(@content-type)]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[@content-section = $content-section select="$template-map/content-item[@content-section = $content-section
and not(@category) and not(@category)
and not(@content-type)]"/> and not(@content-type)]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[not(@content-section) <xsl:when test="$template-map/content-item[not(@content-section)
and @category = $category and @category = $category
and @content-type = $content-type]"> and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[not(@content-section) select="$template-map/content-item[not(@content-section)
and @category = $category and @category = $category
and @content-type = $content-type]"/> and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[not(@content-section) <xsl:when test="$template-map/content-item[not(@content-section)
and @category = $category and @category = $category
and not(@content-type)]"> and not(@content-type)]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[not(@content-section) select="$template-map/content-item[not(@content-section)
and @category = $category and @category = $category
and not(@content-type)]"/> and not(@content-type)]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="$template-map/content-item[not(@content-section) <xsl:when test="$template-map/content-item[not(@content-section)
and not(@category) and not(@category)
and @content-type = $content-type]"> and @content-type = $content-type]">
<xsl:call-template name="foundry:process-contentitem-template"> <xsl:call-template name="foundry:process-contentitem-template">
<xsl:with-param name="template-file" <xsl:with-param name="template-file"
select="$template-map/content-item[not(@content-section) select="$template-map/content-item[not(@content-section)
and not(@category) and not(@category)
and @content-type = $content-type]"/> and @content-type = $content-type]"/>
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
select="$contentitem-tree"/> select="$contentitem-tree"/>
</xsl:call-template> </xsl:call-template>
@ -316,9 +327,10 @@
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
<p> <p>
The <code>content-item</code> with the <code>mode</code> attribute set to The <code>content-item</code> with the <code>mode</code>
<code>link</code> insert the HTML representation of a content item. In this case attribute set to <code>link</code> insert the HTML
the content item to show is provided using by a XSL parameter which has to be representation of a content item. In this case the content item
to show is provided using by a XSL parameter which has to be
provided by a surrounding tag like <code>related-link</code>. provided by a surrounding tag like <code>related-link</code>.
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
@ -372,28 +384,33 @@
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
<p> <p>
The <code>content-item</code> element with the <code>mode</code> attribute set to The <code>content-item</code> element with the <code>mode</code>
<code>list</code> inserts the HTML representation of the the list view of a content attribute set to <code>list</code> inserts the HTML
item. The list view is primarily used in object lists. representation of the the list view of a content item. The list
view is primarily used in object lists.
</p> </p>
<p> <p>
As for the detail view, the HTML representation of the list view of a conten item is As for the detail view, the HTML representation of the list view
defined using special templates with the <code>contentitem-layout</code> element as of a conten item is defined using special templates with the
root. Usually these templates are located in the <code>contentitem-layout</code> element as root. Usually these
<code>templates/content-items</code> folder. Which is used for a particular content templates are located in the
item is defined in the <code>conf/templates.xml</code> file. In this file there is <code>templates/content-items</code> folder. Which is used for a
a <code>content-items</code> element below the <code>templates</code> element. particular content item is defined in the
<code>conf/templates.xml</code> file. In this file there is a
<code>content-items</code> element below the
<code>templates</code> element.
</p> </p>
<p> <p>
There three attributes which can be used to define in which cases a specific There three attributes which can be used to define in which
template is used: cases a specific template is used:
</p> </p>
<dl> <dl>
<dt>style</dt> <dt>style</dt>
<dd> <dd>
Used to select a specific style for the list view of the item. To select a style Used to select a specific style for the list view of the
add a <code>style</code> attribute to the <code>content-item</code> attribute item. To select a style add a <code>style</code> attribute
in the application layout file. to the <code>content-item</code> attribute in the
application layout file.
</dd> </dd>
<dt>content-type</dt> <dt>content-type</dt>
<dd>The content-type of the item.</dd> <dd>The content-type of the item.</dd>
@ -401,8 +418,9 @@
<code>category</code> <code>category</code>
</dt> </dt>
<dd> <dd>
The template is only used for the content item if the item is viewed as item of The template is only used for the content item if the item
the category. The category is set as a path contains the names the categories. is viewed as item of the category. The category is set as a
path contains the names the categories.
</dd> </dd>
</dl> </dl>
</foundry:doc-desc> </foundry:doc-desc>
@ -570,6 +588,14 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Root element for the layout templates describing a content item
layout.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout"> <xsl:template match="content-item-layout">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
@ -579,6 +605,13 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Show the title of the current content item.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//content-item-title"> <xsl:template match="content-item-layout//content-item-title">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
@ -595,8 +628,9 @@
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
<p> <p>
Provides a link to content item itself. Useful if a content item is shown using a Provides a link to content item itself. Useful if a content item
portlet and you want to create a link to the normal detail view of the item. is shown using a portlet and you want to create a link to the
normal detail view of the item.
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
@ -606,10 +640,22 @@
<xsl:apply-templates> <xsl:apply-templates>
<xsl:with-param name="href" <xsl:with-param name="href"
tunnel="yes" tunnel="yes"
select="concat($context-prefix, '/redirect/?oid=', $contentitem-tree/masterVersion/@oid)"/> select="concat($context-prefix,
'/redirect/?oid=',
$contentitem-tree/masterVersion/@oid)"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Generic tag to test if a content item has a specific property.
The tags enclosed by <code>if-property</code> are only
processed if the content item has a property with the provided
name.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="/content-item-layout//if-property"> <xsl:template match="/content-item-layout//if-property">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:variable name="name" select="./@name"/> <xsl:variable name="name" select="./@name"/>
@ -625,6 +671,20 @@
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Generic tag to show the value of the property with the
specified name. This tag can be used if there are no special
tags for a content type.
</p>
</foundry:doc-desc>
<foundry:doc-see-also>
<foundry:doc-link href="#show-date-property">
Generic tag for showing date properties
</foundry:doc-link>
</foundry:doc-see-also>
</foundry:doc>
<xsl:template match="/content-item-layout//show-property"> <xsl:template match="/content-item-layout//show-property">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:variable name="name" select="./@name"/> <xsl:variable name="name" select="./@name"/>
@ -664,7 +724,25 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Generic tag for showing date properties. The format of the
date is configured using one or more <code>date-element</code>
inside this tag.
</p>
</foundry:doc-desc>
<foundry:doc-see-also>
<foundry:doc-link href="#show-property">
Generic tag for showing properties.
</foundry:doc-link>
</foundry:doc-see-also>
<foundry:doc-see-also>
<foundry:doc-link href="#date-format">
How to format date values in Foundry.
</foundry:doc-link>
</foundry:doc-see-also>
</foundry:doc>
<xsl:template match="/content-item-layout//show-date-property"> <xsl:template match="/content-item-layout//show-date-property">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:variable name="name" select="./@name"/> <xsl:variable name="name" select="./@name"/>

View File

@ -29,12 +29,42 @@
exclude-result-prefixes="xsl xs bebop cms formbuilder foundry nav ui" exclude-result-prefixes="xsl xs bebop cms formbuilder foundry nav ui"
version="2.0"> version="2.0">
<foundry:doc-file>
<foundry:doc-file-title>
Tags for ccm-cms-types-formitem and ccm-cms-types-formsectionitem
</foundry:doc-file-title>
<foundry:doc-file-desc>
<p>
The tags in these file are used to create the HTML
representation of the FormItem (and the FormSectionItems used
by the FormItem).
</p>
</foundry:doc-file-desc>
</foundry:doc-file>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the description of a FormItem.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="/content-item-layout//form-description"> <xsl:template match="/content-item-layout//form-description">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:value-of select="$contentitem-tree/form/description"/> <xsl:value-of select="$contentitem-tree/form/description"/>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the components (the controls) of a form. Unfortunately
is not yet possible to customise the HTML of the form
components.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="/content-item-layout//form-components"> <xsl:template match="/content-item-layout//form-components">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>

View File

@ -28,6 +28,23 @@
exclude-result-prefixes="xsl xs bebop cms foundry nav ui" exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
version="2.0"> version="2.0">
<foundry:doc-file>
<foundry:doc-file-title>Tags for ccm-cms-types-filestorageitem</foundry:doc-file-title>
<foundry:doc-file-desc>
<p>
The tags in these file can be used to output the special
properties of the file storage item.
</p>
</foundry:doc-file-desc>
</foundry:doc-file>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the description of a file storage item.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="/content-item-layout//fsi-description"> <xsl:template match="/content-item-layout//fsi-description">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
@ -43,6 +60,35 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the link to download the file associated with the
file storage item. The tag has an optional attribute to decide
if the link should force a download or not.
</p>
</foundry:doc-desc>
<foundry:doc-attributes>
<foundry:doc-attribute name="mode">
<p>
If set to <code>stream</code> the file will be opened
in the approbriate program or browser plugin if available.
If not set or set to <code>download</code> the link
should cause a downlaod.
</p>
<p>
The real behaviour depends on the configuration of the
browser used to to view the site.
</p>
</foundry:doc-attribute>
<foundry:doc-attribute name="use-filename">
<p>
If set to <code>true</code> the name of the file associated
with the file storage item is included into the link.
</p>
</foundry:doc-attribute>
</foundry:doc-attributes>
</foundry:doc>
<xsl:template match="/content-item-layout//fsi-link"> <xsl:template match="/content-item-layout//fsi-link">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>

View File

@ -28,6 +28,29 @@
exclude-result-prefixes="xsl xs bebop cms foundry nav ui" exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
version="2.0"> version="2.0">
<foundry:doc-file>
<foundry:doc-file-title>Common tags for content types derived from GenericOrganizationalUnit</foundry:doc-file-title>
<foundry:doc-file-desc>
<p>
The tags in these file are used to create the HTML representation
of types derived from GenericOrganzationalUnit, for example
SciProject, SciDepartment or SciInstitute.
</p>
<p>
The informations about a organizational unit are provided
in several sections (tabs).
</p>
</foundry:doc-file-desc>
</foundry:doc-file>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Root element for outputting the available tabs of organizational
unit.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-available-tabs"> <xsl:template match="content-item-layout//orgaunit-available-tabs">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
@ -41,6 +64,14 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
This tag encloses the HTML for a individual tab. It also
passes the URL for viewing the tab to the enclosed elements.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-available-tabs//available-tab"> <xsl:template match="content-item-layout//orgaunit-available-tabs//available-tab">
<xsl:param name="available-tabs" tunnel="yes"/> <xsl:param name="available-tabs" tunnel="yes"/>
@ -65,12 +96,36 @@
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the name of the avilable tab.
</p>
</foundry:doc-desc>
<foundry:doc-see-also>
<foundry:doc-link href="#tab-label">
Alternative tag for labeling a tab.
</foundry:doc-link>
</foundry:doc-see-also>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-available-tabs//available-tab//tab-name"> <xsl:template match="content-item-layout//orgaunit-available-tabs//available-tab//tab-name">
<xsl:param name="label" tunnel="yes"/> <xsl:param name="label" tunnel="yes"/>
<xsl:value-of select="$label"/> <xsl:value-of select="$label"/>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
This tag is alternative for <code>tab-name</code>. It uses
the tab name and the type name of the orga unit to lookup
the label in the localisable texts of the theme. More
specifially it looks for a text in in
<code>texts/$orgaunit-type-name.xml</code> with the name of
the tab as id.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-available-tabs//available-tab//tab-label"> <xsl:template match="content-item-layout//orgaunit-available-tabs//available-tab//tab-label">
<xsl:param name="label" tunnel="yes"/> <xsl:param name="label" tunnel="yes"/>
<xsl:param name="orgaunit-type-name" tunnel="yes"/> <xsl:param name="orgaunit-type-name" tunnel="yes"/>
@ -78,6 +133,15 @@
<xsl:value-of select="foundry:get-static-text(lower-case($orgaunit-type-name), $label)"/> <xsl:value-of select="foundry:get-static-text(lower-case($orgaunit-type-name), $label)"/>
</xsl:template> </xsl:template>
<foundry:doc type="template-tag" section="user">
<foundry:doc-desc>
<p>
Enclosing tag for several other tags for displaying informations
about a organisational unit. The tag passes several informations
to the enclosed tags.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit"> <xsl:template match="content-item-layout//orgaunit">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
@ -91,6 +155,17 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Encloses the tags for displaying the informations from the
current tag. The immediate sub elements of this tag can only
be <code>tab</code>. The <code>name</code> attribute of the
<code>tab</code> elements defines for which tab the layout
enclosed by a <code>tab</code> element is used.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-current-tab"> <xsl:template match="content-item-layout//orgaunit-current-tab">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
@ -107,6 +182,13 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Generic tag to output a property in a tab of a orga unit.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-current-tab//tab//show-tab-property"> <xsl:template match="content-item-layout//orgaunit-current-tab//tab//show-tab-property">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
@ -121,6 +203,23 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<foundry:doc section="user" section="user">
<foundry:doc-desc>
<p>
Outputs the content of the current tab as text. If the
<code>disable-output-escaping</code> attribute is set
to <code>true</code> the content is shown as it is. Otherwise
some characters are escaped.
</p>
</foundry:doc-desc>
<foundry:doc-attributes>
<foundry:doc-attribute name="disable-output-escaping">
<p>
Disable output escaping?
</p>
</foundry:doc-attribute>
</foundry:doc-attributes>
</foundry:doc>
<xsl:template match="content-item-layout//orgaunit-current-tab//tab//show-tab-content"> <xsl:template match="content-item-layout//orgaunit-current-tab//tab//show-tab-content">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
@ -135,12 +234,27 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the value of the <code>addendum</code> property
of an orga unit.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//addendum"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//addendum">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
<xsl:value-of select="$orgaunit-data/addendum"/> <xsl:value-of select="$orgaunit-data/addendum"/>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Root tag for showing the list of members of an orga unit.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
@ -151,6 +265,13 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Encloses the layout for an individual member entry.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member">
<xsl:param name="members" tunnel="yes"/> <xsl:param name="members" tunnel="yes"/>
@ -171,6 +292,14 @@
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the status of the current member. The text itself
is retrieved from <code>texts/$orgaunit-type-name</code>.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//member-status"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//member-status">
<xsl:param name="member-status" tunnel="yes"/> <xsl:param name="member-status" tunnel="yes"/>
<xsl:param name="orgaunit-type-name" tunnel="yes"/> <xsl:param name="orgaunit-type-name" tunnel="yes"/>
@ -180,6 +309,14 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the role of the current member. The text itself
is retrieved from <code>texts/$orgaunit-type-name</code>.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//member-role"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//member-role">
<xsl:param name="member-role" tunnel="yes"/> <xsl:param name="member-role" tunnel="yes"/>
<xsl:param name="orgaunit-type-name" tunnel="yes"/> <xsl:param name="orgaunit-type-name" tunnel="yes"/>
@ -189,6 +326,13 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Shows the contact entries associated with a member.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//member-contact-entries"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//member-contact-entries">
<xsl:param name="person" tunnel="yes"/> <xsl:param name="person" tunnel="yes"/>
@ -206,6 +350,13 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//if-member-role-is"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//if-member-role-is">
<xsl:param name="member-role" tunnel="yes"/> <xsl:param name="member-role" tunnel="yes"/>
@ -214,6 +365,13 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Root tag for outputting the contact associated with an orga unit.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//orgaunit-contact"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//orgaunit-contact">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
@ -222,6 +380,13 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the person associated with orga unit contact.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//orgaunit-contact//orgaunit-contact-person"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//orgaunit-contact//orgaunit-contact-person">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
@ -232,6 +397,13 @@
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
Outputs the contact entries of the orga unit contact.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//orgaunit-contact//orgaunit-contact-entries"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//orgaunit-contact//orgaunit-contact-entries">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>

View File

@ -44,10 +44,24 @@
<foundry:doc section="user" <foundry:doc section="user"
type="template-tag"> type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
Invokes the foundry CSS loader. The CSS loader will parse the file <p>
<code>conf/css-files.xml</code> to determine for which CSS an Invokes the foundry CSS loader. The CSS loader will parse the file
<code>&lt;link&gt;</code> element should be added to the HTML output. For a full <code>conf/css-files.xml</code> to determine for which CSS an
explanation please refer to the <a href="#css-files">CSS files section</a>. <code>&lt;link&gt;</code> element should be added to the HTML output. For a full
explanation please refer to the <a href="#css-files">CSS files section</a>.
</p>
<p>
If you are using <a href="http://lesscss.org">LESS</a> for
your stylesheets you can include the LESS JavaScript compiler to
compile your LESS stylesheets on the fly to CSS. To do that
you must first set the <code>less-onthefly</code> setting
in <code>conf/global.xml</code> to <code>true</code>.
In the <code>conf/css-files.xml</code> each CSS file entry
which is created from a LESS file must have a <code>less</code>
attribute with its value set to <code>true</code>. Also for
these files the file extension (<code>.css</code>) should be
omitted.
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="load-css-files"> <xsl:template match="load-css-files">
@ -152,11 +166,11 @@
<xsl:if test="$less-onthefly and foundry:debug-enabled()"> <xsl:if test="$less-onthefly and foundry:debug-enabled()">
<script type="text/javascript"> <script type="text/javascript">
less = { less = {
env: "development", env: "development",
dumpLineNumbers: "all" dumpLineNumbers: "all"
}; };
</script> </script>
<script type="text/javascript" <script type="text/javascript"
src="{foundry:gen-path('scripts/less.min.js', 'internal')}"/> src="{foundry:gen-path('scripts/less.min.js', 'internal')}"/>
</xsl:if> </xsl:if>

View File

@ -47,7 +47,6 @@
<xsl:template match="show-greeting"> <xsl:template match="show-greeting">
<xsl:value-of select="$data-tree/ui:userBanner/@greeting"/> <xsl:value-of select="$data-tree/ui:userBanner/@greeting"/>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>