- Missing support for cms:tasksPanel in Foundry

- Some images for Foundry


git-svn-id: https://svn.libreccm.org/ccm/trunk@3259 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-02-20 16:28:27 +00:00
parent 5a8b18e619
commit 8317d67cba
7 changed files with 181 additions and 36 deletions

View File

@ -132,4 +132,26 @@
<translation lang="en">View Revision</translation> <translation lang="en">View Revision</translation>
<translation lang="de">Revision ansehen</translation> <translation lang="de">Revision ansehen</translation>
</text> </text>
<text id="taskPanel/noTasks">
<translation lang="en">No tasks assigned</translation>
<translation lang="de">Keine zugewiesenen Aufgaben vorhanden</translation>
</text>
<text id="taskPanel/notLocked">
<translation lang="en">Not locked</translation>
<translation lang="de">Nicht gesperrt</translation>
</text>
<text id="taskPanel/lockedByYou">
<translation lang="en">Locked by you</translation>
<translation lang="de">Durch Sie gesperrt</translation>
</text>
<text id="taskPanel/lockedBySomeoneElse">
<translation lang="en">Locked by someone else</translation>
<translation lang="de">Durch einen anderen Benutzer gesperrt</translation>
</text>
<text id="taskPanel/notAssigned">
<translation lang="en">Not assigned</translation>
<translation lang="de">Niemandem zugewiesen</translation>
</text>
</foundry:static-texts> </foundry:static-texts>

View File

@ -24,5 +24,6 @@
version="2.0"> version="2.0">
<xsl:import href="cms/item-summary.xsl"/> <xsl:import href="cms/item-summary.xsl"/>
<xsl:import href="cms/tasks-panel.xsl"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet [<!ENTITY nbsp '&#160;'>]>
<!--
Copyright: 2006, 2007, 2008 Sören Bernstein
This file is part of Mandalay.
Mandalay 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.
Mandalay 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 Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- DE
Hier werden die cmsTaskPanel verarbeitet
-->
<!-- EN
Processing cmsTaskPanel
-->
<!-- Autor: Sören Bernstein -->
<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">
<!-- EN Create a list of tasks -->
<xsl:template match="cms:tasksPanel">
<xsl:choose>
<xsl:when test="count(cms:tasksPanelTask) = 0">
<xsl:value-of select="foundry:get-static-text('cms', 'taskPanel/noTasks')"/>
</xsl:when>
<xsl:otherwise>
<table>
<thead>
<tr>
<xsl:apply-templates select="bebop:link | bebop:label" mode="tableHeadCell"/>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="cms:tasksPanelTask"/>
</tbody>
</table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- EN Creates an entry to the list -->
<xsl:template match="cms:tasksPanelTask">
<tr>
<td>
<a>
<xsl:attribute name="href"
select="foundry:parse-link(concat(./@sectionPath,
'/admin/item.jsp?item_id=',
./@itemID))"/>
<xsl:value-of select="./@pageTitle"/>
</a>
</td>
<td>
<a title="{./@taskDescription}">
<xsl:attribute name="href"
select="foundry:parse-link(./@actionURL)"/>
<xsl:value-of select="./@taskLabel"/>
</a>
</td>
<td>
<xsl:value-of select="./@dueDate"/>
</td>
<td>
<xsl:choose>
<xsl:when test="./@status = '1'">
<xsl:value-of select="foundry:get-static-text('cms',
'taskPanel/lockedByYou')"/>
</xsl:when>
<xsl:when test="./@status = '2'">
<xsl:value-of select="foundry:get-static-text('cms',
'taskPanel/notLocked')"/>
</xsl:when>
<xsl:when test="./@status = '3'">
<xsl:value-of select="foundry:get-static-text('cms',
'taskPanel/lockedBySomeoneElse')"/>
</xsl:when>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="./@assignee">
<xsl:value-of select="./@assignee"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="foundry:get-static-text('cms',
'taskPanel/notAssigned')"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="./@processLabel"/>
</td>
</tr>
</xsl:template>
<!-- EN Special mode for a link or label in a table head -->
<xsl:template match="bebop:link | bebop:label" mode="tableHeadCell">
<th>
<xsl:apply-templates select="."/>
</th>
</xsl:template>
</xsl:stylesheet>

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

View File

@ -15,8 +15,6 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.london.util.ui; package com.arsdigita.london.util.ui;
import java.io.IOException; import java.io.IOException;
@ -42,11 +40,10 @@ import com.arsdigita.web.RedirectSignal;
public abstract class AbstractDomainObjectComponent extends SimpleContainer { public abstract class AbstractDomainObjectComponent extends SimpleContainer {
private static final Logger s_log = private static final Logger s_log = Logger.getLogger(AbstractDomainObjectComponent.class);
Logger.getLogger( AbstractDomainObjectComponent.class );
private Map m_actions = new HashMap(); private Map m_actions = new HashMap();
private Map m_actionPrivileges = new HashMap(); private Map m_actionPrivileges = new HashMap();
private boolean m_redirecting; private boolean m_redirecting;
public AbstractDomainObjectComponent(String cname, public AbstractDomainObjectComponent(String cname,
@ -80,13 +77,13 @@ public abstract class AbstractDomainObjectComponent extends SimpleContainer {
try { try {
fireDomainObjectActionEvent( fireDomainObjectActionEvent(
new DomainObjectActionEvent(this, state, dobj, name)); new DomainObjectActionEvent(this, state, dobj, name));
} catch( DomainObjectActionAbortedException ex ) { } catch (DomainObjectActionAbortedException ex) {
aborted = true; aborted = true;
if( s_log.isInfoEnabled() ) { if (s_log.isInfoEnabled()) {
if( s_log.isDebugEnabled() ) { if (s_log.isDebugEnabled()) {
s_log.debug( "Action aborted", ex ); s_log.debug("Action aborted", ex);
} else { } else {
s_log.info( "Action aborted" ); s_log.info("Action aborted");
} }
} }
} }
@ -101,13 +98,12 @@ public abstract class AbstractDomainObjectComponent extends SimpleContainer {
protected void fireDomainObjectActionEvent(DomainObjectActionEvent ev) { protected void fireDomainObjectActionEvent(DomainObjectActionEvent ev) {
Assert.isLocked(this); Assert.isLocked(this);
EventListenerList listeners = EventListenerList listeners = (EventListenerList) m_actions.get(ev.getAction());
(EventListenerList)m_actions.get(ev.getAction());
Iterator i = listeners Iterator i = listeners
.getListenerIterator(DomainObjectActionListener.class); .getListenerIterator(DomainObjectActionListener.class);
while (i.hasNext()) { while (i.hasNext()) {
((DomainObjectActionListener)i.next()).actionPerformed(ev); ((DomainObjectActionListener) i.next()).actionPerformed(ev);
} }
} }
@ -121,25 +117,27 @@ public abstract class AbstractDomainObjectComponent extends SimpleContainer {
new EventListenerList()); new EventListenerList());
} }
protected void registerDomainObjectAction(String action, PrivilegeDescriptor privilege) { protected void registerDomainObjectAction(String action, PrivilegeDescriptor privilege) {
registerDomainObjectAction(action); registerDomainObjectAction(action);
m_actionPrivileges.put(action, privilege); m_actionPrivileges.put(action, privilege);
} }
protected Iterator getDomainObjectActions() { protected Iterator getDomainObjectActions() {
return m_actions.keySet().iterator(); return m_actions.keySet().iterator();
} }
/** /**
* return privilegeDescripter registered against this action, or null if action was registered without * return privilegeDescripter registered against this action, or null if action was registered
* a privilege being specified * without a privilege being specified
* @param action *
* @return * @param action
*/ *
protected PrivilegeDescriptor getDomainObjectActionPrivilege (String action) { * @return
return (PrivilegeDescriptor)m_actionPrivileges.get(action); */
} protected PrivilegeDescriptor getDomainObjectActionPrivilege(String action) {
return (PrivilegeDescriptor) m_actionPrivileges.get(action);
}
public void addDomainObjectActionListener(String action, public void addDomainObjectActionListener(String action,
DomainObjectActionListener listener) { DomainObjectActionListener listener) {
Assert.isUnlocked(this); Assert.isUnlocked(this);
@ -148,7 +146,7 @@ public abstract class AbstractDomainObjectComponent extends SimpleContainer {
throw new RuntimeException("Action " + action + " not registered"); throw new RuntimeException("Action " + action + " not registered");
} }
EventListenerList listeners = (EventListenerList)m_actions.get(action); EventListenerList listeners = (EventListenerList) m_actions.get(action);
listeners.add(DomainObjectActionListener.class, listener); listeners.add(DomainObjectActionListener.class, listener);
} }
@ -167,4 +165,5 @@ public abstract class AbstractDomainObjectComponent extends SimpleContainer {
state.clearControlEvent(); state.clearControlEvent();
return url; return url;
} }
} }