Editing a PortalWorkspace is now possible with Foundry.

git-svn-id: https://svn.libreccm.org/ccm/trunk@3004 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-12-04 09:32:41 +00:00
parent 6fc3eff318
commit ea9119bb15
7 changed files with 170 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<css-file origin="internal">admin.css</css-file>
</application>
<application name="portal">
<css-file media="screen">portal.css</css-file>
<css-file origin="internal">portal.css</css-file>
<css-file>public.css</css-file>
<css-file media="screen">public.css</css-file>
</application>

View File

@ -56,6 +56,9 @@
<portlet class="com.arsdigita.portalworkspace.ui.portlet.FreeformHTMLPortletRenderer">
portlets/freeform-html.xml
</portlet>
<portlet class="com.arsdigita.portalworkspace.ui.SimplePortlet">
portlets/simple-portlet.xml
</portlet>
<!--<default>
</default>-->

View File

@ -38,4 +38,7 @@
<!-- Import the Foundry main templates all other things are defined there -->
<xsl:import href="../../foundry/start.xsl"/>
<!-- Import custom extensions -->
<xsl:import href="user/user.xsl"/>
</xsl:stylesheet>

View File

@ -50,3 +50,5 @@ div.portal-grid-row div.portal-col-100 {
width: 100%;
}

View File

@ -168,6 +168,7 @@
<xsl:variable name="col-number" select="position()"/>
<xsl:variable name="col-id" select="concat('[', $col-number, ']')"/>
<xsl:variable name="is-last" select="position() = last()"/>
<xsl:choose>
<xsl:when test="$column-layout-tree[@format=$layout-format]/column-layout[contains(@for, $col-id)]">
@ -175,6 +176,9 @@
<xsl:with-param name="workspace-portlets"
tunnel="yes"
select="$data-tree/portal:workspace/portal:portal/bebop:portlet[@cellNumber = $col-number]"/>
<xsl:with-param name="is-last"
tunnel="yes"
select="$is-last"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
@ -182,6 +186,9 @@
<xsl:with-param name="workspace-portlets"
tunnel="yes"
select="$data-tree/portal:workspace/portal:portal/bebop:portlet[@cellNumber = $col-number]"/>
<xsl:with-param name="is-last"
tunnel="yes"
select="$is-last"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
@ -190,6 +197,7 @@
<xsl:template match="portal-workspace//portal-workspace-columns//portal-workspace-column//portal-workspace-portlets">
<xsl:param name="workspace-portlets" tunnel="yes"/>
<xsl:param name="is-last" tunnel="yes" as="xs:boolean"/>
<xsl:variable name="workspace"
select="$data-tree/portal:workspace/portal:workspaceDetails/primaryURL"/>
@ -203,6 +211,74 @@
<xsl:value-of select="./@bebop:classname"/>
</xsl:variable>
<xsl:if test="./portlet:action">
<ul class="portlet-edit-links">
<xsl:choose>
<xsl:when test="./portlet:action[@name = 'moveLeft'] and ./@cellNumber != 1">
<li>
<a href="{./portlet:action[@name = 'moveLeft']/@url}">&#9664;</a>
</li>
</xsl:when>
<xsl:otherwise>
<li>
<span>&#9664;</span>
</li>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<!--
Last portlet is the form for adding a new portlet to column, therefore
subtract 1 from last position.
-->
<xsl:when test="./portlet:action[@name = 'moveDown'] and position() &lt; last() -1">
<li>
<a href="{./portlet:action[@name = 'moveDown']/@url}">&#9660;</a>
</li>
</xsl:when>
<xsl:otherwise>
<li>
<span>&#9660;</span>
</li>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="./portlet:action[@name = 'customize']">
<li>
<a href="{./portlet:action[@name = 'customize']/@url}">&#9998;</a>
</li>
</xsl:if>
<xsl:if test="./portlet:action[@name = 'delete']">
<li>
<a href="{./portlet:action[@name = 'delete']/@url}">&#10006;</a>
</li>
</xsl:if>
<xsl:choose>
<xsl:when test="./portlet:action[@name = 'moveUp'] and position() != 1">
<li>
<a href="{./portlet:action[@name = 'moveUp']/@url}">&#9650;</a>
</li>
</xsl:when>
<xsl:otherwise>
<li>
<span>&#9650;</span>
</li>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="./portlet:action[@name = 'moveRight'] and not($is-last)">
<li>
<a href="{./portlet:action[@name = 'moveRight']/@url}">&#9658;</a>
</li>
</xsl:when>
<xsl:otherwise>
<li>
<span>&#9658;</span>
</li>
</xsl:otherwise>
</xsl:choose>
</ul>
</xsl:if>
<xsl:choose>
<xsl:when test="$template-map/portlet[@class=$classname and @workspace = $workspace]">
<xsl:apply-templates select="document(foundry:gen-path(concat('templates/', normalize-space($template-map/portlet[@class=$classname and @workspace=$workspace]))))/*">

View File

@ -32,6 +32,7 @@
<xsl:import href="portlets/contentitem.xsl"/>
<xsl:import href="portlets/freeform-html.xsl"/>
<xsl:import href="portlets/item-list.xsl"/>
<xsl:import href="portlets/simple-portlet.xsl"/>
</xsl:stylesheet>

View File

@ -0,0 +1,84 @@
div.portal-workspace-columns {
position: relative;
}
div.portal-workspace-columns div.portal-col,
div.portal-grid-row div.portal-col {
float: left;
overflow: scroll;
}
div.portal-workspace-columns div.portal-col-16,
div.portal-grid-row div.portal-col-16 {
width: 16.66%;
}
div.portal-workspace-columns div.portal-col-20,
div.portal-grid-row div.portal-col-20 {
width: 20%;
}
div.portal-workspace-columns div.portal-col-25,
div.portal-grid-row div.portal-col-25 {
width: 25%;
}
div.portal-workspace-columns div.portal-col-30,
div.portal-grid-row div.portal-col-30 {
width: 30%;
}
div.portal-workspace-columns div.portal-col-33,
div.portal-grid-row div.portal-col-33 {
width: 33.33%;
}
div.portal-workspace-columns div.portal-col-40,
div.portal-grid-row div.portal-col-40 {
width: 40%;
}
div.portal-workspace-columns div.portal-col-50,
div.portal-grid-row div.portal-col-50 {
width: 50%;
}
div.portal-workspace-columns div.portal-col-100,
div.portal-grid-row div.portal-col-100 {
width: 100%;
}
ul.portlet-edit-links {
list-style: none;
}
ul.portlet-edit-links:after {
content: ".";
display: block;
visibility: hidden;
clear: both;
}
ul.portlet-edit-links li {
float: left;
width: 16.66%;
}
ul.portlet-edit-links li a,
ul.portlet-edit-links li a:link,
ul.portlet-edit-links li a:visited{
text-decoration: none;
color: #00e;
}
ul.portlet-edit-links li a:hover,
ul.portlet-edit-links li a:active {
text-decoration: none;
color: #aae;
}
ul.portlet-edit-links li span {
color: #ccc;
}