. Added RSS Feed panel to Space Details page

- Selectable template for RSS feed for a folder
  - RSS feed link for drag/drop into RSS reader
. Added new folder "RSS Templates" in Data Dictionary in bootstrap
. Example RSS Template for new folder (docs in last 7 days)
. Created patch to add above folder+example to current schema
. Added 'app:feedsource' aspect to application data model
. Cleaned up some obsolete code in Apply/Remove Template actions
. Simplified Apply/Remove Template dialog navigation to use dialog framework

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3527 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-08-16 15:41:49 +00:00
parent edc31cf75c
commit ebd29c8548
14 changed files with 377 additions and 39 deletions

View File

@@ -158,6 +158,7 @@ system_error=System Error
login=Login login=Login
templates=Templates templates=Templates
template=Template template=Template
rss_template=RSS Template
select_button=Select... select_button=Select...
select_items=Select items select_items=Select items
select_an_item=Select an item select_an_item=Select an item
@@ -545,6 +546,12 @@ success_not_inherit_permissions=Successfully changed Inherit Parent Permissions
apply_dashboard=Apply Dashboard apply_dashboard=Apply Dashboard
apply_dashboard_info=Select a template to be applied to the Space as a Dashboard view. apply_dashboard_info=Select a template to be applied to the Space as a Dashboard view.
apply_dashboard_doc_info=Select a template to be applied to the Document as a Dashboard view. apply_dashboard_doc_info=Select a template to be applied to the Document as a Dashboard view.
apply_rss_feed=Apply RSS Feed Template
apply_rss_feed_info=Select a template to be applied to the Space as an RSS feed.
apply_rss_feed_warning1=This Space must be visible to the Guest user for the RSS feed to be publically viewable, you can Invite the Guest user using the
apply_rss_feed_warning2=view.
rss_feed=RSS Feed
rss_feed_link=RSS Feed Link
# Export messages # Export messages
export_info=Exports metadata and content from this or all Spaces. export_info=Exports metadata and content from this or all Spaces.

View File

@@ -71,6 +71,7 @@ public class Application
private static String spaceTemplatesFolderName; private static String spaceTemplatesFolderName;
private static String contentTemplatesFolderName; private static String contentTemplatesFolderName;
private static String emailTemplatesFolderName; private static String emailTemplatesFolderName;
private static String rssTemplatesFolderName;
private static String savedSearchesFolderName; private static String savedSearchesFolderName;
private static String scriptsFolderName; private static String scriptsFolderName;
private static String guestHomeFolderName; private static String guestHomeFolderName;
@@ -376,6 +377,22 @@ public class Application
return getEmailTemplatesFolderName(FacesContextUtils.getRequiredWebApplicationContext(context)); return getEmailTemplatesFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
} }
/**
* @return Returns the RSS templates folder name
*/
public static String getRSSTemplatesFolderName(ServletContext context)
{
return getRSSTemplatesFolderName(WebApplicationContextUtils.getRequiredWebApplicationContext(context));
}
/**
* @return Returns the RSS templates folder name
*/
public static String getRSSTemplatesFolderName(FacesContext context)
{
return getRSSTemplatesFolderName(FacesContextUtils.getRequiredWebApplicationContext(context));
}
/** /**
* @return Return the Saved Searches folder name * @return Return the Saved Searches folder name
*/ */
@@ -750,6 +767,24 @@ public class Application
return emailTemplatesFolderName; return emailTemplatesFolderName;
} }
/**
* Returns the RSS Templates folder name
*
* @param context The spring context
* @return The RSS folder name
*/
private static String getRSSTemplatesFolderName(WebApplicationContext context)
{
if (rssTemplatesFolderName == null)
{
ImporterBootstrap bootstrap = (ImporterBootstrap)context.getBean(BEAN_IMPORTER_BOOTSTRAP);
Properties configuration = bootstrap.getConfiguration();
rssTemplatesFolderName = configuration.getProperty("spaces.templates.rss.childname");
}
return rssTemplatesFolderName;
}
/** /**
* Returns the Saved Searches folder name * Returns the Saved Searches folder name
* *

View File

@@ -256,7 +256,7 @@ public abstract class BaseDetailsBean
/** /**
* Action handler to apply the selected Template and Templatable aspect to the current Space * Action handler to apply the selected Template and Templatable aspect to the current Space
*/ */
public String applyTemplate() public void applyTemplate(ActionEvent event)
{ {
if (this.template != null && this.template.equals(TemplateSupportBean.NO_SELECTION) == false) if (this.template != null && this.template.equals(TemplateSupportBean.NO_SELECTION) == false)
{ {
@@ -283,13 +283,12 @@ public abstract class BaseDetailsBean
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e); FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
} }
} }
return getReturnOutcome();
} }
/** /**
* Action handler to remove a dashboard template from the current Space * Action handler to remove a dashboard template from the current Space
*/ */
public String removeTemplate() public void removeTemplate(ActionEvent event)
{ {
try try
{ {
@@ -305,14 +304,8 @@ public abstract class BaseDetailsBean
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e); FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
} }
return getReturnOutcome();
} }
/**
* @return return to details page JSF navigation outcome
*/
protected abstract String getReturnOutcome();
/** /**
* Action Handler to take Ownership of the current Space * Action Handler to take Ownership of the current Space
*/ */

View File

@@ -989,14 +989,6 @@ public class DocumentDetailsBean extends BaseDetailsBean
{ {
return "document-props"; return "document-props";
} }
/**
* @see org.alfresco.web.bean.BaseDetailsBean#getReturnOutcome()
*/
protected String getReturnOutcome()
{
return OUTCOME_RETURN;
}
/** /**
* Returns a model for use by a template on the Document Details page. * Returns a model for use by a template on the Document Details page.

View File

@@ -34,6 +34,7 @@ import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.TemplateContentServlet;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils;
@@ -46,8 +47,6 @@ import org.alfresco.web.ui.common.component.UIActionLink;
*/ */
public class SpaceDetailsBean extends BaseDetailsBean public class SpaceDetailsBean extends BaseDetailsBean
{ {
private static final String OUTCOME_RETURN = "showSpaceDetails";
private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories_space"; private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories_space";
private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied_space"; private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied_space";
private static final String MSG_ERROR_UPDATE_CATEGORY = "error_update_category"; private static final String MSG_ERROR_UPDATE_CATEGORY = "error_update_category";
@@ -60,6 +59,9 @@ public class SpaceDetailsBean extends BaseDetailsBean
private NodeRef addedCategory; private NodeRef addedCategory;
private List categories; private List categories;
/** RSS Template ID */
private String rssTemplate;
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Construction // Construction
@@ -149,14 +151,6 @@ public class SpaceDetailsBean extends BaseDetailsBean
{ {
return "space-props"; return "space-props";
} }
/**
* @see org.alfresco.web.bean.BaseDetailsBean#getReturnOutcome()
*/
protected String getReturnOutcome()
{
return OUTCOME_RETURN;
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
@@ -471,4 +465,94 @@ public class SpaceDetailsBean extends BaseDetailsBean
{ {
return getSpace().isLocked(); return getSpace().isLocked();
} }
/**
* @return true if the current space has an RSS feed applied
*/
public boolean isRSSFeed()
{
return (getSpace().hasAspect(ContentModel.ASPECT_FEEDSOURCE) &&
getSpace().getProperties().get(ContentModel.PROP_FEEDTEMPLATE) != null);
}
public String getRSSFeedURL()
{
// build RSS feed template URL from selected template and current space NodeRef and
// add the guest=true URL parameter - this is required for no login access and
// add the mimetype=text/xml URL parameter - required to return correct stream type
return TemplateContentServlet.generateURL(getSpace().getNodeRef(),
(NodeRef)getSpace().getProperties().get(ContentModel.PROP_FEEDTEMPLATE))
+ "?guest=true" + "&mimetype=text%2Fxml";
}
/**
* @return Returns the current RSS Template ID.
*/
public String getRSSTemplate()
{
// return current template if it exists
NodeRef ref = (NodeRef)getNode().getProperties().get(ContentModel.PROP_FEEDTEMPLATE);
return ref != null ? ref.getId() : this.rssTemplate;
}
/**
* @param rssTemplate The RSS Template Id to set.
*/
public void setRSSTemplate(String rssTemplate)
{
this.rssTemplate = rssTemplate;
}
/**
* Action handler to apply the selected RSS Template and FeedSource aspect to the current Space
*/
public void applyRSSTemplate(ActionEvent event)
{
if (this.rssTemplate != null && this.rssTemplate.equals(TemplateSupportBean.NO_SELECTION) == false)
{
try
{
// apply the feedsource aspect if required
if (getNode().hasAspect(ContentModel.ASPECT_FEEDSOURCE) == false)
{
this.nodeService.addAspect(getNode().getNodeRef(), ContentModel.ASPECT_FEEDSOURCE, null);
}
// get the selected template Id from the Template Picker
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.rssTemplate);
// set the template NodeRef into the templatable aspect property
this.nodeService.setProperty(getNode().getNodeRef(), ContentModel.PROP_FEEDTEMPLATE, templateRef);
// reset node details for next refresh of details page
getNode().reset();
}
catch (Exception e)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
}
}
}
/**
* Action handler to remove a RSS template from the current Space
*/
public void removeRSSTemplate(ActionEvent event)
{
try
{
// clear template property
this.nodeService.setProperty(getNode().getNodeRef(), ContentModel.PROP_FEEDTEMPLATE, null);
this.nodeService.removeAspect(getNode().getNodeRef(), ContentModel.ASPECT_FEEDSOURCE);
// reset node details for next refresh of details page
getNode().reset();
}
catch (Exception e)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
}
}
} }

View File

@@ -64,6 +64,9 @@ public class TemplateSupportBean
/** cache of email templates that lasts 30 seconds - enough for a few page refreshes */ /** cache of email templates that lasts 30 seconds - enough for a few page refreshes */
private ExpiringValueCache<List<SelectItem>> emailTemplates = new ExpiringValueCache<List<SelectItem>>(1000*30); private ExpiringValueCache<List<SelectItem>> emailTemplates = new ExpiringValueCache<List<SelectItem>>(1000*30);
/** cache of RSS templates that lasts 30 seconds - enough for a few page refreshes */
private ExpiringValueCache<List<SelectItem>> rssTemplates = new ExpiringValueCache<List<SelectItem>>(1000*30);
/** cache of JavaScript files that lasts 30 seconds - enough for a few page refreshes */ /** cache of JavaScript files that lasts 30 seconds - enough for a few page refreshes */
private ExpiringValueCache<List<SelectItem>> scriptFiles = new ExpiringValueCache<List<SelectItem>>(1000*30); private ExpiringValueCache<List<SelectItem>> scriptFiles = new ExpiringValueCache<List<SelectItem>>(1000*30);
@@ -128,6 +131,28 @@ public class TemplateSupportBean
return templates; return templates;
} }
/**
* @return the list of available RSS Templates.
*/
public List<SelectItem> getRSSTemplates()
{
List<SelectItem> templates = rssTemplates.get();
if (templates == null)
{
// get the template from the special Email Templates folder
FacesContext fc = FacesContext.getCurrentInstance();
String xpath = Application.getRootPath(fc) + "/" +
Application.getGlossaryFolderName(fc) + "/" +
Application.getRSSTemplatesFolderName(fc) + "//*";
templates = selectDictionaryNodes(fc, xpath, MSG_SELECT_TEMPLATE);
rssTemplates.put(templates);
}
return templates;
}
/** /**
* @return the list of available JavaScript files that can be applied to the current document. * @return the list of available JavaScript files that can be applied to the current document.
*/ */

View File

@@ -271,6 +271,10 @@
<from-outcome>applyTemplate</from-outcome> <from-outcome>applyTemplate</from-outcome>
<to-view-id>/jsp/dialog/apply-space-template.jsp</to-view-id> <to-view-id>/jsp/dialog/apply-space-template.jsp</to-view-id>
</navigation-case> </navigation-case>
<navigation-case>
<from-outcome>applyRSSTemplate</from-outcome>
<to-view-id>/jsp/dialog/apply-rss-template.jsp</to-view-id>
</navigation-case>
<navigation-case> <navigation-case>
<from-outcome>previewSpace</from-outcome> <from-outcome>previewSpace</from-outcome>
<to-view-id>/jsp/dialog/preview-space.jsp</to-view-id> <to-view-id>/jsp/dialog/preview-space.jsp</to-view-id>
@@ -285,6 +289,14 @@
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<navigation-rule>
<from-view-id>/jsp/dialog/apply-rss-template.jsp</from-view-id>
<navigation-case>
<from-outcome>manageInvitedUsers</from-outcome>
<to-view-id>/jsp/roles/manage-invited-users.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule> <navigation-rule>
<from-view-id>/jsp/dialog/document-details.jsp</from-view-id> <from-view-id>/jsp/dialog/document-details.jsp</from-view-id>
<navigation-case> <navigation-case>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -113,12 +113,12 @@
<table cellpadding="1" cellspacing="1" border="0"> <table cellpadding="1" cellspacing="1" border="0">
<tr> <tr>
<td align="center"> <td align="center">
<h:commandButton value="#{msg.ok}" action="#{DocumentDetailsBean.applyTemplate}" styleClass="wizardButton" /> <h:commandButton value="#{msg.ok}" actionListener="#{DocumentDetailsBean.applyTemplate}" action="dialog:close" styleClass="wizardButton" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
<h:commandButton value="#{msg.cancel}" action="showDocDetails" styleClass="wizardButton" /> <h:commandButton value="#{msg.cancel}" action="dialog:close" styleClass="wizardButton" />
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -0,0 +1,167 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_apply_template">
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="apply-rss">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr>
<td width="32">
<h:graphicImage url="/images/icons/rss_large.gif"/>
</td>
<td>
<div class="mainTitle"><h:outputText value="#{msg.apply_rss_feed}" /> '<h:outputText value="#{SpaceDetailsBean.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.apply_rss_feed_info}" /></div>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<%-- TODO: check for Guest user access and hide panel? --%>
<td width="100%" valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td valign=top style="padding-top:2px" width=20><h:graphicImage url="/images/icons/info_icon.gif" width="16" height="16"/></td>
<td class="mainSubText">
<h:outputText value="#{msg.apply_rss_feed_warning1}" />
<a:actionLink value="#{msg.manage_invited_users}" actionListener="#{BrowseBean.setupSpaceAction}" action="dialog:manageInvitedUsers">
<f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink>
<h:outputText value="#{msg.apply_rss_feed_warning2}" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
<div style="padding:4px"></div>
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td><nobr><h:outputText value="#{msg.rss_template}"/>:</nobr></td>
<td width=100%>
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{SpaceDetailsBean.RSSTemplate}">
<f:selectItems value="#{TemplateSupportBean.RSSTemplates}" />
</h:selectOneMenu>
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton value="#{msg.ok}" actionListener="#{SpaceDetailsBean.applyRSSTemplate}" action="dialog:close" styleClass="wizardButton" />
</td>
</tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="dialog:close" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -113,12 +113,12 @@
<table cellpadding="1" cellspacing="1" border="0"> <table cellpadding="1" cellspacing="1" border="0">
<tr> <tr>
<td align="center"> <td align="center">
<h:commandButton value="#{msg.ok}" action="#{SpaceDetailsBean.applyTemplate}" styleClass="wizardButton" /> <h:commandButton value="#{msg.ok}" actionListener="#{SpaceDetailsBean.applyTemplate}" action="dialog:close" styleClass="wizardButton" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
<h:commandButton value="#{msg.cancel}" action="showSpaceDetails" styleClass="wizardButton" /> <h:commandButton value="#{msg.cancel}" action="dialog:close" styleClass="wizardButton" />
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -120,8 +120,8 @@
<h:panelGroup id="dashboard-panel-facets"> <h:panelGroup id="dashboard-panel-facets">
<f:facet name="title"> <f:facet name="title">
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalChange"> <r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalChange">
<a:actionLink id="actModify" value="#{msg.modify}" action="applyTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" /> <a:actionLink id="actModify" value="#{msg.modify}" action="dialog:applyTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" />
<a:actionLink id="actRemove" value="#{msg.remove}" action="#{DocumentDetailsBean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" /> <a:actionLink id="actRemove" value="#{msg.remove}" actionListener="#{DocumentDetailsBean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" />
</r:permissionEvaluator> </r:permissionEvaluator>
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
@@ -132,8 +132,7 @@
<tr> <tr>
<td align=left> <td align=left>
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalApply"> <r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalApply">
<a:actionLink id="actDashboard" value="#{msg.apply_dashboard}" rendered="#{DocumentDetailsBean.templatable == false}" <a:actionLink id="actDashboard" value="#{msg.apply_dashboard}" rendered="#{DocumentDetailsBean.templatable == false}" action="dialog:applyTemplate" />
action="applyTemplate" />
</r:permissionEvaluator> </r:permissionEvaluator>
<a:panel id="template-panel" rendered="#{DocumentDetailsBean.templatable == true}"> <a:panel id="template-panel" rendered="#{DocumentDetailsBean.templatable == true}">
<div style="padding:4px;border: 1px dashed #cccccc"> <div style="padding:4px;border: 1px dashed #cccccc">

View File

@@ -108,8 +108,8 @@
<h:panelGroup id="dashboard-panel-facets"> <h:panelGroup id="dashboard-panel-facets">
<f:facet name="title"> <f:facet name="title">
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write" id="evalChange"> <r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write" id="evalChange">
<a:actionLink id="actModify" value="#{msg.modify}" action="applyTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" /> <a:actionLink id="actModify" value="#{msg.modify}" action="dialog:applyTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" />
<a:actionLink id="actRemove" value="#{msg.remove}" action="#{SpaceDetailsBean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" /> <a:actionLink id="actRemove" value="#{msg.remove}" actionListener="#{SpaceDetailsBean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" />
</r:permissionEvaluator> </r:permissionEvaluator>
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
@@ -120,8 +120,7 @@
<tr> <tr>
<td align=left> <td align=left>
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write" id="evalApply"> <r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write" id="evalApply">
<a:actionLink id="actDashboard" value="#{msg.apply_dashboard}" rendered="#{SpaceDetailsBean.templatable == false}" <a:actionLink id="actDashboard" value="#{msg.apply_dashboard}" rendered="#{SpaceDetailsBean.templatable == false}" action="dialog:applyTemplate" />
action="applyTemplate" />
</r:permissionEvaluator> </r:permissionEvaluator>
<a:panel id="template-panel" rendered="#{SpaceDetailsBean.templatable == true}"> <a:panel id="template-panel" rendered="#{SpaceDetailsBean.templatable == true}">
<div style="padding:4px;border: 1px dashed #cccccc"> <div style="padding:4px;border: 1px dashed #cccccc">
@@ -296,6 +295,31 @@
</a:richList> </a:richList>
</a:panel> </a:panel>
<div style="padding:4px"></div>
<h:panelGroup id="rss-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write" id="evalChange2">
<a:actionLink id="actModify2" value="#{msg.modify}" action="dialog:applyRSSTemplate" showLink="false" image="/images/icons/rss.gif" style="padding-right:8px" />
<a:actionLink id="actRemove2" value="#{msg.remove}" actionListener="#{SpaceDetailsBean.removeRSSTemplate}" showLink="false" image="/images/icons/delete.gif" />
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.rss_feed}" id="rss-panel" progressive="true" facetsId="rss-panel-facets"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
expanded='#{SpaceDetailsBean.panels["rss-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr>
<td align=left>
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write" id="evalApply2">
<a:actionLink id="actApplyRSS" value="#{msg.apply_rss_feed}" rendered="#{SpaceDetailsBean.RSSFeed == false}" action="dialog:applyRSSTemplate" />
</r:permissionEvaluator>
<a:actionLink id="actRSS" value="#{msg.rss_feed_link}" href="#{SpaceDetailsBean.RSSFeedURL}" image="/images/icons/rss.gif" rendered="#{SpaceDetailsBean.RSSFeed == true}" padding="2" />
</td>
</tr>
</table>
</a:panel>
<%-- TODO: implement this - but READONLY details only! Manage Space Users for edits... <%-- TODO: implement this - but READONLY details only! Manage Space Users for edits...
need support for panel with facets - so can hide edit link unless edit permissions need support for panel with facets - so can hide edit link unless edit permissions
also need to wrap this panel with an permissions check: ReadPermissions also need to wrap this panel with an permissions check: ReadPermissions