mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged CMIS063 to HEAD
15943: Addition of CMIS FileShare to cmis.html front page. 15974: Merge content type to stylesheet change from latest CMIS FileShare. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17238 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -435,6 +435,39 @@
|
||||
<servlet-class>org.alfresco.web.app.servlet.JBPMDeployProcessServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>CMISFileShareServlet</servlet-name>
|
||||
<servlet-class>de.fmui.cmis.fileshare.info.BrowseServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>webcontentroot</param-name>
|
||||
<param-value>cmisfs/</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>stylesheet:application/atomsvc+xml</param-name>
|
||||
<param-value>/cmisfs/stylesheets/service.xsl</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>stylesheet:application/atom+xml;type=feed</param-name>
|
||||
<param-value>/cmisfs/stylesheets/feed.xsl</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>stylesheet:application/cmistree+xml</param-name>
|
||||
<param-value>/cmisfs/stylesheets/feed.xsl</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>stylesheet:application/atom+xml;type=entry</param-name>
|
||||
<param-value>/cmisfs/stylesheets/entry.xsl</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>stylesheet:application/cmisallowableactions+xml</param-name>
|
||||
<param-value>/cmisfs/stylesheets/actions.xsl</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>stylesheet:application/cmisacl+xml</param-name>
|
||||
<param-value>/cmisfs/stylesheets/acl.xsl</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
@@ -600,6 +633,11 @@
|
||||
<url-pattern>/workflowdefinitionimage/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>CMISFileShareServlet</servlet-name>
|
||||
<url-pattern>/cmisbrowse</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>60</session-timeout>
|
||||
</session-config>
|
||||
|
178
source/web/cmisfs/browser/browser.css
Normal file
178
source/web/cmisfs/browser/browser.css
Normal file
@@ -0,0 +1,178 @@
|
||||
@CHARSET "UTF-8";
|
||||
|
||||
body {
|
||||
font-family: arial,sans-serif;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #204a87;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #204a87;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #204a87;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: a40000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.navigationbox {
|
||||
background-color: #eeeeec;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
padding: 5px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #888a85;
|
||||
}
|
||||
|
||||
table.servicetable {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.servicetable td {
|
||||
font-size: 10pt;
|
||||
padding: 5px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #dddddd;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.servicebox {
|
||||
background-color: #eeeeec;
|
||||
font-size: 10pt;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border-color: #888a85;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
table.feedtable {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.tdinfo {
|
||||
font-size: 10pt;
|
||||
padding-left: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 0px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.tdinfo2 {
|
||||
font-size: 10pt;
|
||||
padding: 3px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #d3d7cf;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.tdlinks {
|
||||
font-size: 8pt;
|
||||
padding: 3px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #d3d7cf;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.tdmore {
|
||||
background-color: #eeeeec;
|
||||
font-size: 10pt;
|
||||
padding-left: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 0px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.tdinfo-odd {
|
||||
background-color: #fcf9df;
|
||||
font-size: 10pt;
|
||||
padding-left: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 0px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.tdinfo2-odd {
|
||||
background-color: #fcf9df;
|
||||
font-size: 10pt;
|
||||
padding: 3px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #d3d7cf;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.tdlinks-odd {
|
||||
background-color: #fcf9df;
|
||||
font-size: 8pt;
|
||||
padding: 3px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #d3d7cf;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.tdmore-odd {
|
||||
background-color: #fce94f;
|
||||
font-size: 10pt;
|
||||
padding: 3px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #d3d7cf;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
a.actionink:link {
|
||||
color: #888a85;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.actionink:visited {
|
||||
color: #888a85;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.actionink:hover {
|
||||
color: #2e3436;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.actionink:active {
|
||||
color: red;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table.entrytable {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.entrytable td {
|
||||
font-size: 10pt;
|
||||
padding: 5px;
|
||||
border-bottom-style: solid;
|
||||
border-color: #d3d7cf;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
div.entrysummary {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
padding: 5px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #888a85;
|
||||
height: 150px;
|
||||
overflow: auto;
|
||||
}
|
BIN
source/web/cmisfs/browser/document.png
Normal file
BIN
source/web/cmisfs/browser/document.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 744 B |
BIN
source/web/cmisfs/browser/folder.png
Normal file
BIN
source/web/cmisfs/browser/folder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
source/web/cmisfs/browser/policy.png
Normal file
BIN
source/web/cmisfs/browser/policy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 903 B |
BIN
source/web/cmisfs/browser/relationship.png
Normal file
BIN
source/web/cmisfs/browser/relationship.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 955 B |
BIN
source/web/cmisfs/browser/type.png
Normal file
BIN
source/web/cmisfs/browser/type.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
source/web/cmisfs/browser/unknown.png
Normal file
BIN
source/web/cmisfs/browser/unknown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
38
source/web/cmisfs/stylesheets/acl.xsl
Normal file
38
source/web/cmisfs/stylesheets/acl.xsl
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901">
|
||||
|
||||
<xsl:output method="html" />
|
||||
|
||||
<xsl:param name="browseUrl"/>
|
||||
<xsl:param name="webContentRoot"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>ACL</title>
|
||||
<link rel="stylesheet" type="text/css" href="{$webContentRoot}browser/browser.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>ACL</h1>
|
||||
<table class="entrytable">
|
||||
<tr>
|
||||
<th>Principal Id</th>
|
||||
<th>Permission</th>
|
||||
<th>Direct</th>
|
||||
</tr>
|
||||
<xsl:for-each select="cmis:acl/cmis:permission">
|
||||
<tr>
|
||||
<td><xsl:value-of select="cmis:principal/cmis:principalId" /></td>
|
||||
<td><xsl:value-of select="cmis:permission" /></td>
|
||||
<td><xsl:value-of select="cmis:direct" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
32
source/web/cmisfs/stylesheets/actions.xsl
Normal file
32
source/web/cmisfs/stylesheets/actions.xsl
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901">
|
||||
|
||||
<xsl:output method="html" />
|
||||
|
||||
<xsl:param name="browseUrl"/>
|
||||
<xsl:param name="webContentRoot"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>Allowable Actions</title>
|
||||
<link rel="stylesheet" type="text/css" href="{$webContentRoot}browser/browser.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Allowable Actions</h1>
|
||||
<table class="entrytable">
|
||||
<xsl:for-each select="cmis:allowableActions/*[not(*)]">
|
||||
<tr>
|
||||
<td><xsl:value-of select="local-name()" /></td>
|
||||
<td><xsl:value-of select="current()" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
130
source/web/cmisfs/stylesheets/entry.xsl
Normal file
130
source/web/cmisfs/stylesheets/entry.xsl
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901">
|
||||
|
||||
<xsl:output method="html" />
|
||||
|
||||
<xsl:param name="browseUrl"/>
|
||||
<xsl:param name="webContentRoot"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title><xsl:value-of select="atom:entry/atom:title" /></title>
|
||||
<link rel="stylesheet" type="text/css" href="{$webContentRoot}browser/browser.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(atom:entry/cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:document')">
|
||||
<img src="{$webContentRoot}browser/document.png" style="vertical-align:middle; padding-right: 10px;" />
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(atom:entry/cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:folder')">
|
||||
<img src="{$webContentRoot}browser/folder.png" style="vertical-align:middle; padding-right: 10px;" />
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(atom:entry/cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:relationship')">
|
||||
<img src="{$webContentRoot}browser/relationship.png" style="vertical-align:middle; padding-right: 10px;" />
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(atom:entry/cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:policy')">
|
||||
<img src="{$webContentRoot}browser/policy.png" style="vertical-align:middle; padding-right: 10px;" />
|
||||
</xsl:when>
|
||||
<xsl:when test="atom:entry/cmisra:type">
|
||||
<img src="{$webContentRoot}browser/type.png" style="vertical-align:middle; padding-right: 10px;" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<img src="{$webContentRoot}browser/unknown.png" style="vertical-align:middle; padding-right: 10px;" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="atom:entry/atom:title" /></h1>
|
||||
|
||||
<div class="navigationbox">
|
||||
<xsl:if test="atom:entry/atom:link[@rel='service']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='service']/@href}">Service</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='up']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='up']/@href}">Up</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='down']">
|
||||
<xsl:for-each select="atom:entry/atom:link[@rel='down']">
|
||||
<a href="{@href}">Down (<xsl:value-of select="@type"></xsl:value-of>)</a> -
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/foldertree']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/foldertree']/@href}">Folder Tree</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:content">
|
||||
<a href="{atom:entry/atom:content/@src}">Download</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='version-history']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='version-history']/@href}">All Versions</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='alternate']">
|
||||
<xsl:for-each select="atom:entry/atom:link[@rel='alternate']">
|
||||
<a href="{@href}">Rendition (<xsl:value-of select="@cmisra:renditionType"></xsl:value-of>)</a> -
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/relationships']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/relationships']/@href}">Relationships</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/allowableactions']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/allowableactions']/@href}">Allowable Actions</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/acl']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/acl']/@href}">ACL</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/policies']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/policies']/@href}">Policies</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:entry/atom:link[@rel='describedby']">
|
||||
<a href="{$browseUrl}{atom:entry/atom:link[@rel='describedby']/@href}">Type</a>
|
||||
</xsl:if>
|
||||
</div>
|
||||
|
||||
<xsl:if test="atom:entry/atom:summary">
|
||||
<h2>Summary</h2>
|
||||
<div class="entrysummary">
|
||||
<xsl:value-of select="atom:entry/atom:summary" disable-output-escaping="yes"/>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<h2>Properties</h2>
|
||||
<table class="entrytable">
|
||||
<xsl:for-each select="atom:entry/cmisra:object/cmis:properties/*">
|
||||
<tr>
|
||||
<td style="font-weight: bold;"><xsl:value-of select="@pdid" /></td>
|
||||
<td>
|
||||
<xsl:for-each select="cmis:value">
|
||||
<xsl:value-of select="current()" /><br/>
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="atom:entry/cmisra:type/*[not(*)]">
|
||||
<tr>
|
||||
<td style="font-weight: bold;"><xsl:value-of select="local-name()" /></td>
|
||||
<td><xsl:value-of select="current()" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
|
||||
<xsl:if test="atom:entry/cmisra:type">
|
||||
<h2>Property Definitions</h2>
|
||||
<xsl:for-each select="atom:entry/cmisra:type/*[*]">
|
||||
<h3><xsl:value-of select="cmis:id"/></h3>
|
||||
<table class="entrytable">
|
||||
<xsl:for-each select="*">
|
||||
<tr>
|
||||
<td><xsl:value-of select="local-name()" /></td>
|
||||
<td><xsl:value-of select="current()" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
220
source/web/cmisfs/stylesheets/feed.xsl
Normal file
220
source/web/cmisfs/stylesheets/feed.xsl
Normal file
@@ -0,0 +1,220 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901">
|
||||
|
||||
<xsl:output method="html" />
|
||||
|
||||
<xsl:param name="browseUrl"/>
|
||||
<xsl:param name="webContentRoot"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title><xsl:value-of select="atom:feed/atom:title" /></title>
|
||||
<link rel="stylesheet" type="text/css" href="{$webContentRoot}browser/browser.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1><xsl:value-of select="atom:feed/atom:title" /></h1>
|
||||
<div class="navigationbox">
|
||||
<xsl:if test="atom:feed/atom:link[@rel='service']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='service']/@href}">Service</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='seld']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='self']/@href}">Entry</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='up']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='up']/@href}">Up</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='down']">
|
||||
<xsl:for-each select="atom:feed/atom:link[@rel='down']">
|
||||
<a href="{@href}">Down (<xsl:value-of select="@type"></xsl:value-of>)</a> -
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='first']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='first']/@href}">First</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='previous']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='previous']/@href}">Previous</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='next']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='next']/@href}">Next</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='last']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='last']/@href}">Last</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/foldertree']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/foldertree']/@href}">Folder Tree</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/allowableactions']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/allowableactions']/@href}">Allowable Actions</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/acl']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/acl']/@href}">ACL</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/policies']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/policies']/@href}">Policies</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:link[@rel='describedby']">
|
||||
<a href="{$browseUrl}{atom:feed/atom:link[@rel='describedby']/@href}">Type</a>
|
||||
</xsl:if>
|
||||
</div>
|
||||
<xsl:if test="atom:feed/atom:entry/cmisra:object">
|
||||
<table class="feedtable">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>MIME Type</th>
|
||||
<th>Size</th>
|
||||
<th>Created By /<br/> Last Modified By</th>
|
||||
<th>Creation Date /<br/> Last Modification Date</th>
|
||||
<th>Version Label</th>
|
||||
<th>Major /<br/> Latest</th>
|
||||
</tr>
|
||||
<xsl:for-each select="atom:feed/atom:entry">
|
||||
<xsl:sort select="cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId']" />
|
||||
<xsl:sort select="cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:Name']" />
|
||||
|
||||
<xsl:variable name="odd">
|
||||
<xsl:if test="(position() mod 2) != 1"></xsl:if>
|
||||
<xsl:if test="(position() mod 2) = 1">-odd</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<tr>
|
||||
<td class="tdlinks{$odd}" rowspan="2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:document')">
|
||||
<img src="{$webContentRoot}browser/document.png" />
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:folder')">
|
||||
<img src="{$webContentRoot}browser/folder.png" />
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:relationship')">
|
||||
<img src="{$webContentRoot}browser/relationship.png" />
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:policy')">
|
||||
<img src="{$webContentRoot}browser/policy.png" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<img src="{$webContentRoot}browser/unknown.png" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td class="tdinfo{$odd}" style="font-weight: bold;">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:document')">
|
||||
<a href="{atom:content/@src}">
|
||||
<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:Name']" />
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:BaseTypeId'],'cmis:folder')">
|
||||
<a href="{$browseUrl}{atom:link[@rel='down']/@href}">
|
||||
<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:Name']" />
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{$browseUrl}{atom:link[@rel='self']/@href}">
|
||||
<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:Name']" />
|
||||
</a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td class="tdinfo{$odd}">
|
||||
<a href="{$browseUrl}{atom:link[@rel='describedby']/@href}">
|
||||
<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyId[@pdid='cmis:ObjectTypeId']" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:ContentStreamMimeType']" /></td>
|
||||
<td class="tdinfo{$odd}" align="right"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyInteger[@pdid='cmis:ContentStreamLength']" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:CreatedBy']" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyDateTime[@pdid='cmis:CreationDate']" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:VersionLabel']" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyBoolean[@pdid='cmis:IsMajorVersion']" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tdlinks{$odd}" colspan="4">
|
||||
<a href="{$browseUrl}{atom:link[@rel='self']/@href}" class="actionink">Entry</a> -
|
||||
<a href="{$browseUrl}{atom:link[@rel='describedby']/@href}" class="actionink">Type Info</a> -
|
||||
<xsl:if test="atom:link[@rel='down']">
|
||||
<a href="{$browseUrl}{atom:link[@rel='down']/@href}" class="actionink">Down</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:content">
|
||||
<a href="{atom:content/@src}" class="actionink">Download</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:link[@rel='version-history']">
|
||||
<a href="{$browseUrl}{atom:link[@rel='version-history']/@href}" class="actionink">All Versions</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:link[@rel='alternate']">
|
||||
<xsl:for-each select="atom:link[@rel='alternate']">
|
||||
<a href="{@href}" class="actionink">Rendition (<xsl:value-of select="@cmisra:renditionType"></xsl:value-of>)</a> -
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/allowableactions']">
|
||||
<a href="{$browseUrl}{atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/allowableactions']/@href}" class="actionink">Allowable Actions</a> -
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/acl']">
|
||||
<a href="{$browseUrl}{atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200901/acl']/@href}" class="actionink">ACL</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td class="tdinfo2{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@pdid='cmis:LastModifiedBy']" /></td>
|
||||
<td class="tdinfo2{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyDateTime[@pdid='cmis:LastModificationDate']" /></td>
|
||||
<td class="tdinfo2{$odd}"> </td>
|
||||
<td class="tdinfo2{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyBoolean[@pdid='cmis:IsLatestVersion']" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
<xsl:if test="atom:feed/atom:entry/cmisra:type">
|
||||
|
||||
<table class="feedtable">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Id</th>
|
||||
<th>Local Name</th>
|
||||
<th>Local Namespace</th>
|
||||
<th>Display Name</th>
|
||||
<th>Query Name</th>
|
||||
<th>Base Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<xsl:for-each select="atom:feed/atom:entry">
|
||||
<xsl:variable name="odd">
|
||||
<xsl:if test="(position() mod 2) != 1"></xsl:if>
|
||||
<xsl:if test="(position() mod 2) = 1">-odd</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<tr>
|
||||
<td class="tdlinks{$odd}" rowspan="2">
|
||||
<img src="{$webContentRoot}browser/type.png" />
|
||||
</td>
|
||||
<td class="tdinfo{$odd}">
|
||||
<a href="{$browseUrl}{atom:link[@rel='self']/@href}" style="font-weight: bold;">
|
||||
<xsl:value-of select="cmisra:type/cmis:id" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:localName" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:localNamespace" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:displayName" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:queryName" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:baseTypeId" /></td>
|
||||
<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:description" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tdlinks{$odd}" colspan="7">
|
||||
<a href="{$browseUrl}{atom:link[@rel='self']/@href}" class="actionink">Entry</a> -
|
||||
<a href="{$browseUrl}{atom:link[@rel='describedby']/@href}" class="actionink">Type Info</a> -
|
||||
<xsl:if test="atom:link[@rel='down']">
|
||||
<a href="{$browseUrl}{atom:link[@rel='down']/@href}" class="actionink">Down</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
100
source/web/cmisfs/stylesheets/service.xsl
Normal file
100
source/web/cmisfs/stylesheets/service.xsl
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901">
|
||||
|
||||
<xsl:output method="html" />
|
||||
|
||||
<xsl:param name="browseUrl"/>
|
||||
<xsl:param name="webContentRoot"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>Service</title>
|
||||
<link rel="stylesheet" type="text/css" href="{$webContentRoot}browser/browser.css" />
|
||||
</head>
|
||||
<body>
|
||||
<xsl:for-each select="app:service/app:workspace">
|
||||
<div class="servicebox">
|
||||
<h2>Repository <xsl:value-of select="@cmis:id" /></h2>
|
||||
<h3>Collections:</h3><ul><xsl:apply-templates select="app:collection" /></ul>
|
||||
<h3>Links:</h3><ul><xsl:apply-templates select="atom:link" /></ul>
|
||||
<table style="border-spacing:5px">
|
||||
<tr>
|
||||
<td style="vertical-align:top;"><xsl:apply-templates select="cmisra:repositoryInfo" /></td>
|
||||
<td style="vertical-align:top;"><xsl:apply-templates select="cmisra:repositoryInfo/cmis:capabilities" /></td>
|
||||
<td style="vertical-align:top;"><xsl:apply-templates select="cmisra:repositoryInfo/cmis:aclCapability" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cmisra:repositoryInfo">
|
||||
<div>
|
||||
<h3>Info</h3>
|
||||
<table class="servicetable">
|
||||
<xsl:for-each select="*[not(*)]">
|
||||
<tr>
|
||||
<td><xsl:value-of select="local-name()" /></td>
|
||||
<td><xsl:value-of select="current()" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cmis:capabilities">
|
||||
<div>
|
||||
<h3>Capabilities</h3>
|
||||
<table class="servicetable">
|
||||
<xsl:for-each select="*[not(*)]">
|
||||
<tr>
|
||||
<td><xsl:value-of select="substring-after(local-name(), 'capability')" /></td>
|
||||
<td><xsl:value-of select="current()" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cmis:aclCapability">
|
||||
<div>
|
||||
<h3>ACL Capabilities</h3>
|
||||
Type: <xsl:value-of select="cmis:setType" />
|
||||
<h4>Permissions</h4>
|
||||
<table class="servicetable">
|
||||
<tr><th>Permission</th><th>Description</th></tr>
|
||||
<xsl:for-each select="cmis:permissions">
|
||||
<tr>
|
||||
<td><xsl:value-of select="cmis:permission" /></td>
|
||||
<td><xsl:value-of select="cmis:description" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<h4>Mappings</h4>
|
||||
<table class="servicetable">
|
||||
<tr><th>Key</th><th>Permission</th></tr>
|
||||
<xsl:for-each select="cmis:mapping">
|
||||
<tr>
|
||||
<td><xsl:value-of select="cmis:key" /></td>
|
||||
<td><xsl:value-of select="cmis:permission" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="app:collection">
|
||||
<li><a href="{$browseUrl}{@href}"><xsl:value-of select="atom:title" /> (<xsl:value-of select="@cmisra:collectionType" />)</a></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="atom:link">
|
||||
<li><a href="{$browseUrl}{@href}"><xsl:value-of select="@rel" /></a> (<xsl:value-of select="@type" />)</li>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
Reference in New Issue
Block a user