- File Details and Folder Details page

- Added missing JSP file from Update File checkin (oops!)
 - Minor UI bug fixes
 - Incorrect permissions set for ContentPublisher role

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3972 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-09-29 11:21:27 +00:00
parent d23d1eb588
commit 9c1f0c4c96
12 changed files with 1150 additions and 1 deletions

View File

@@ -847,6 +847,9 @@ create_folder=Create Folder
create_avm_folder_info=Create a new folder in the website.
add_avm_content_dialog_desc=This dialog helps you to add content to a folder.
update_avm_file_desc=Update a file in the website with content from your computer.
file_details_desc=View details about the file.
title_folder_details=Folder Details
folder_details_desc=View details about the folder.
# New User Wizard messages
new_user_title=New User Wizard

View File

@@ -94,6 +94,28 @@
</params>
</action>
<!-- View File details -->
<action id="file_details">
<label-id>view_details</label-id>
<image>/images/icons/View_details.gif</image>
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
<action>dialog:showFileDetails</action>
<params>
<param name="id">#{actionContext.path}</param>
</params>
</action>
<!-- View Folder details -->
<action id="folder_details">
<label-id>view_details</label-id>
<image>/images/icons/View_details.gif</image>
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
<action>dialog:showFolderDetails</action>
<params>
<param name="id">#{actionContext.path}</param>
</params>
</action>
<!-- Actions for a file in the AVM Browse screen -->
<action-group id="avm_file_browse">
@@ -101,6 +123,7 @@
<action idref="edit_file" />
<action idref="update_file" />
<action idref="preview_file" />
<action idref="file_details" />
<action idref="delete_file" />
</action-group>
@@ -108,6 +131,7 @@
<action-group id="avm_folder_browse">
<show-link>false</show-link>
<action idref="preview_folder" />
<action idref="folder_details" />
<action idref="delete_folder" />
</action-group>
@@ -118,6 +142,7 @@
<action idref="update_file" />
<action idref="submit" />
<action idref="preview_file" />
<action idref="file_details" />
<action idref="delete_file" />
</action-group>
@@ -126,6 +151,7 @@
<show-link>false</show-link>
<action idref="submit" />
<action idref="preview_folder" />
<action idref="folder_details" />
<action idref="delete_folder" />
</action-group>
@@ -148,6 +174,16 @@
<show-link>false</show-link>
</action-group>
<!-- Actions for the File Details action menu -->
<action-group id="avm_file_details">
<show-link>false</show-link>
</action-group>
<!-- Actions for the Folder Details action menu -->
<action-group id="avm_folder_details">
<show-link>false</show-link>
</action-group>
</actions>
</config>

View File

@@ -256,6 +256,9 @@ public class AVMBrowseBean implements IContextListener
summary.append(MessageFormat.format(msg.getString(MSG_WORKING_USERS), users));
}
// reset the current path so the context for the Modified File list actions is cleared
this.currentPath = null;
return summary.toString();
}
@@ -622,6 +625,11 @@ public class AVMBrowseBean implements IContextListener
UIActionLink link = (UIActionLink)event.getComponent();
Map<String, String> params = link.getParameterMap();
String path = params.get("id");
setupContentAction(path, true);
}
/*package*/ void setupContentAction(String path, boolean refresh)
{
if (path != null && path.length() != 0)
{
AVMNodeDescriptor node = avmService.lookup(-1, path, true);
@@ -633,8 +641,11 @@ public class AVMBrowseBean implements IContextListener
}
// update UI state ready for return after dialog close
if (refresh)
{
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
}
}
/**
* Submit a node from a user sandbox into the staging area sandbox
@@ -716,6 +727,11 @@ public class AVMBrowseBean implements IContextListener
// ------------------------------------------------------------------------------
// Private helpers
/*package*/ boolean isCurrentPathNull()
{
return (this.currentPath == null);
}
/**
* Update the breadcrumb with the clicked Group location
*/

View File

@@ -0,0 +1,250 @@
/*
* 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.
*/
package org.alfresco.web.bean.wcm;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.TemplateImageResolver;
import org.alfresco.service.cmr.security.OwnableService;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.Utils.URLMode;
import org.alfresco.web.ui.common.component.UIActionLink;
import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent;
/**
* Base backing bean provided access to the details of an AVM item
*
* @author Kevin Roast
*/
public abstract class AVMDetailsBean
{
/** NodeService bean reference */
protected NodeService nodeService;
/** AVM service bean reference */
protected AVMService avmService;
/** AVMBrowseBean bean reference */
protected AVMBrowseBean avmBrowseBean;
protected Map<String, Boolean> panels = new HashMap<String, Boolean>(4, 1.0f);
// ------------------------------------------------------------------------------
// Bean property getters and setters
/**
* @param nodeService The NodeService to set
*/
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
/**
* @param avmService The AVMService to set.
*/
public void setAvmService(AVMService avmService)
{
this.avmService = avmService;
}
/**
* @param avmBrowseBean The AVMBrowseBean to set.
*/
public void setAvmBrowseBean(AVMBrowseBean avmBrowseBean)
{
this.avmBrowseBean = avmBrowseBean;
}
/**
* @return Returns the panels expanded state map.
*/
public Map<String, Boolean> getPanels()
{
return this.panels;
}
/**
* @param panels The panels expanded state map.
*/
public void setPanels(Map<String, Boolean> panels)
{
this.panels = panels;
}
/**
* @return the AVM node to display the details for
*/
public abstract AVMNode getAvmNode();
/**
* Returns the Path of the current node
*
* @return The path
*/
public String getPath()
{
return getAvmNode().getPath();
}
/**
* Returns the name of the current node
*
* @return Name of the current node
*/
public String getName()
{
return getAvmNode().getName();
}
/**
* Return the Alfresco NodeRef URL for the current node
*
* @return the Alfresco NodeRef URL
*/
public String getNodeRefUrl()
{
return getAvmNode().getNodeRef().toString();
}
/**
* @return if we are currently within the context of a Browse list (otherwise we are
* probably looking at an item in the Modified File list)
*/
public boolean getIsBrowseList()
{
return !this.avmBrowseBean.isCurrentPathNull();
}
/**
* @return the sibling nodes for this item
*/
protected abstract List<AVMNode> getNodes();
// ------------------------------------------------------------------------------
// Action event handlers
/**
* Save the state of the panel that was expanded/collapsed
*/
public void expandPanel(ActionEvent event)
{
if (event instanceof ExpandedEvent)
{
String id = event.getComponent().getId();
this.panels.put(id, ((ExpandedEvent)event).State);
}
}
/**
* Navigates to next item in the list of items for the current folder
*/
public void nextItem(ActionEvent event)
{
UIActionLink link = (UIActionLink)event.getComponent();
Map<String, String> params = link.getParameterMap();
String path = params.get("id");
if (path != null && path.length() != 0)
{
List<AVMNode> nodes = getNodes();
if (nodes.size() > 1)
{
// perform a linear search - this is slow but stateless
// otherwise we would have to manage state of last selected node
// this gets very tricky as this bean is instantiated once and never
// reset - it does not know when the item has changed etc.
for (int i=0; i<nodes.size(); i++)
{
if (path.equals(nodes.get(i).get("path")) == true)
{
AVMNode next;
// found our item - navigate to next
if (i != nodes.size() - 1)
{
next = nodes.get(i + 1);
}
else
{
// handle wrapping case
next = nodes.get(0);
}
// prepare for showing details for this node
this.avmBrowseBean.setupContentAction(next.getPath(), false);
break;
}
}
}
}
}
/**
* Navigates to the previous item in the list of items for the current folder
*/
public void previousItem(ActionEvent event)
{
UIActionLink link = (UIActionLink)event.getComponent();
Map<String, String> params = link.getParameterMap();
String path = params.get("id");
if (path != null && path.length() != 0)
{
List<AVMNode> nodes = getNodes();
if (nodes.size() > 1)
{
// see above
for (int i=0; i<nodes.size(); i++)
{
if (path.equals(nodes.get(i).get("path")) == true)
{
AVMNode previous;
// found our item - navigate to previous
if (i != 0)
{
previous = nodes.get(i - 1);
}
else
{
// handle wrapping case
previous = nodes.get(nodes.size() - 1);
}
// prepare for showing details for this node
this.avmBrowseBean.setupContentAction(previous.getPath(), false);
break;
}
}
}
}
}
}

View File

@@ -16,6 +16,8 @@
*/
package org.alfresco.web.bean.wcm;
import java.util.Map;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
@@ -44,6 +46,17 @@ public class CreateFolderDialog extends BaseDialogBean
private String description;
/**
* @see org.alfresco.web.bean.dialog.BaseDialogBean#init(java.util.Map)
*/
@Override
public void init(Map<String, String> parameters)
{
super.init(parameters);
this.name = null;
this.description = null;
}
/**
* @param avmBrowseBean The avmBrowseBean to set.
*/

View File

@@ -0,0 +1,95 @@
/*
* 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.
*/
package org.alfresco.web.bean.wcm;
import java.util.List;
import org.alfresco.web.app.servlet.DownloadContentServlet;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.ui.common.Utils;
/**
* Backing bean for File Details page.
*
* @author Kevin Roast
*/
public class FileDetailsBean extends AVMDetailsBean
{
/**
* @see org.alfresco.web.bean.wcm.AVMDetailsBean#getAvmNode()
*/
@Override
public AVMNode getAvmNode()
{
return this.avmBrowseBean.getAvmNode();
}
/**
* @return a Node wrapper of the AVM File Node - for property sheet support
*/
public Node getDocument()
{
return new Node(getAvmNode().getNodeRef());
}
/**
* Returns the URL to the content for the current document
*
* @return Content url to the current document
*/
public String getBrowserUrl()
{
return DownloadContentServlet.generateBrowserURL(getAvmNode().getNodeRef(), getAvmNode().getName());
}
/**
* Returns the download URL to the content for the current document
*
* @return Download url to the current document
*/
public String getDownloadUrl()
{
return DownloadContentServlet.generateDownloadURL(getAvmNode().getNodeRef(), getAvmNode().getName());
}
/**
* Returns the virtualisation server URL to the content for the current document
*
* @return Preview url for the current document
*/
public String getPreviewUrl()
{
return AVMConstants.buildAVMAssetUrl(getAvmNode().getPath());
}
/**
* @return The 32x32 filetype icon for the file
*/
public String getFileType32()
{
return Utils.getFileTypeImage(getAvmNode().getName(), false);
}
/**
* @see org.alfresco.web.bean.wcm.AVMDetailsBean#getNodes()
*/
@Override
protected List<AVMNode> getNodes()
{
return (List)this.avmBrowseBean.getFiles();
}
}

View File

@@ -0,0 +1,67 @@
/*
* 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.
*/
package org.alfresco.web.bean.wcm;
import java.util.List;
import org.alfresco.web.app.servlet.DownloadContentServlet;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.ui.common.Utils;
/**
* Backing bean for Folder Details page.
*
* @author Kevin Roast
*/
public class FolderDetailsBean extends AVMDetailsBean
{
/**
* @see org.alfresco.web.bean.wcm.AVMDetailsBean#getAvmNode()
*/
@Override
public AVMNode getAvmNode()
{
return this.avmBrowseBean.getAvmNode();
}
/**
* @return a Node wrapper of the AVM Folder Node - for property sheet support
*/
public Node getFolder()
{
return new Node(getAvmNode().getNodeRef());
}
/**
* Returns the virtualisation server URL to the content for the current document
*
* @return Preview url for the current document
*/
public String getPreviewUrl()
{
return AVMConstants.buildAVMAssetUrl(getAvmNode().getPath());
}
/**
* @see org.alfresco.web.bean.wcm.AVMDetailsBean#getNodes()
*/
@Override
protected List<AVMNode> getNodes()
{
return (List)this.avmBrowseBean.getFolders();
}
}

View File

@@ -812,6 +812,48 @@
</managed-property>
</managed-bean>
<managed-bean>
<description>
Backing bean used by the AVM File details dialog
</description>
<managed-bean-name>FileDetailsBean</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.wcm.FileDetailsBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<property-name>avmService</property-name>
<value>#{AVMService}</value>
</managed-property>
<managed-property>
<property-name>avmBrowseBean</property-name>
<value>#{AVMBrowseBean}</value>
</managed-property>
</managed-bean>
<managed-bean>
<description>
Backing bean used by the AVM Folder details dialog
</description>
<managed-bean-name>FolderDetailsBean</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.wcm.FolderDetailsBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<property-name>avmService</property-name>
<value>#{AVMService}</value>
</managed-property>
<managed-property>
<property-name>avmBrowseBean</property-name>
<value>#{AVMBrowseBean}</value>
</managed-property>
</managed-bean>
<managed-bean>
<description>
The bean that backs up the Set Content Properties Dialog

View File

@@ -908,6 +908,14 @@
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/wcm/browse-sandbox.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showFileDetails</from-outcome>
<to-view-id>/jsp/wcm/file-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showFolderDetails</from-outcome>
<to-view-id>/jsp/wcm/folder-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

View File

@@ -0,0 +1,216 @@
<%--
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_file_details">
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="file-details">
<%-- 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">
<img src="<%=request.getContextPath()%>/images/icons/details_large.gif" width=32 height=32>
</td>
<td>
<div class="mainTitle">
<h:outputText value="#{msg.details_of}" /> '<h:outputText value="#{FileDetailsBean.name}" />'
</div>
<div class="mainSubText"><h:outputText value="#{msg.file_details_desc}" /></div>
</td>
<%-- Navigation --%>
<a:panel id="nav-panel" rendered="#{FileDetailsBean.isBrowseList}">
<td align=right>
<a:actionLink id="actPrev" value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{FileDetailsBean.previousItem}" action="showFileDetails">
<f:param name="id" value="#{FileDetailsBean.path}" />
</a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle>
<a:actionLink id="actNext" value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{FileDetailsBean.nextItem}" action="showFileDetails">
<f:param name="id" value="#{FileDetailsBean.path}" />
</a:actionLink>
</td>
</a:panel>
</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>
<td width="100%" valign="top">
<a:panel label="#{msg.view_links}" id="links-panel" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
expanded='#{FileDetailsBean.panels["links-panel"]}' expandedActionListener="#{FileDetailsBean.expandPanel}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td>
<a:actionLink value="#{msg.view_in_browser}" href="#{FileDetailsBean.browserUrl}" target="new" id="link1" />
</td>
<td>
<a:actionLink value="#{msg.download_content}" href="#{FileDetailsBean.downloadUrl}" target="new" id="link2" />
</td>
<td>
<a:actionLink value="#{msg.file_preview}" href="#{FileDetailsBean.previewUrl}" target="new" id="link3" />
</td>
<td>
<a href='<a:outputText value="#{FileDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
</td>
</tr>
</table>
</a:panel>
<div style="padding:4px"></div>
<h:panelGroup id="props-panel-facets">
<f:facet name="title">
<%--<r:permissionEvaluator value="#{FileDetailsBean.document}" allow="Write">--%>
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif" action="dialog:editAvmFile" />
<%--</r:permissionEvaluator>--%>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
expanded='#{FileDetailsBean.panels["properties-panel"]}' expandedActionListener="#{FileDetailsBean.expandPanel}">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width=80 align=center>
<%-- icon image for the doc --%>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #CCCCCC; padding:4px">
<a:actionLink id="doc-logo1" value="#{FileDetailsBean.name}" href="#{FileDetailsBean.browserUrl}" target="new"
image="#{FileDetailsBean.fileType32}" showLink="false" />
</div>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="<%=request.getContextPath()%>/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</td>
<td>
<%-- properties for the doc --%>
<r:propertySheetGrid id="document-props" value="#{FileDetailsBean.document}" var="documentProps"
columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" />
<h:messages globalOnly="true" id="props-msgs" styleClass="errorMessage" layout="table" />
</td>
</tr>
</table>
</a:panel>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr>
<td align="center">
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
<div style="padding:4px"></div>
<%-- Document Actions --%>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center"
progressive="true" expanded='#{FileDetailsBean.panels["actions-panel"]}' expandedActionListener="#{FileDetailsBean.expandPanel}">
<r:actions id="actions_doc" value="avm_file_details" context="#{FileDetailsBean.avmNode}" verticalSpacing="3" style="white-space:nowrap" />
</a:panel>
</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

@@ -0,0 +1,208 @@
<%--
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="/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_folder_details">
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="folder-details">
<%-- 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">
<img src="<%=request.getContextPath()%>/images/icons/details_large.gif" width=32 height=32>
</td>
<td>
<div class="mainTitle">
<h:outputText value="#{msg.details_of}" /> '<h:outputText value="#{FolderDetailsBean.name}" />'
</div>
<div class="mainSubText"><h:outputText value="#{msg.folder_details_desc}" /></div>
</td>
<%-- Navigation --%>
<a:panel id="nav-panel" rendered="#{FolderDetailsBean.isBrowseList}">
<td align=right>
<a:actionLink id="actPrev" value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{FolderDetailsBean.previousItem}" action="showFolderDetails">
<f:param name="id" value="#{FolderDetailsBean.path}" />
</a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle>
<a:actionLink id="actNext" value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{FolderDetailsBean.nextItem}" action="showFolderDetails">
<f:param name="id" value="#{FolderDetailsBean.path}" />
</a:actionLink>
</td>
</a:panel>
</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>
<td width="100%" valign="top">
<a:panel label="#{msg.view_links}" id="links-panel" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
expanded='#{FolderDetailsBean.panels["links-panel"]}' expandedActionListener="#{FolderDetailsBean.expandPanel}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td>
<a:actionLink value="#{msg.folder_preview}" href="#{FolderDetailsBean.previewUrl}" target="new" id="link3" />
</td>
<td>
<a href='<a:outputText value="#{FolderDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
</td>
</tr>
</table>
</a:panel>
<div style="padding:4px"></div>
<h:panelGroup id="props-panel-facets">
<f:facet name="title">
<%--<r:permissionEvaluator value="#{FolderDetailsBean.folder}" allow="Write">--%>
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif" action="dialog:editAvmFolder" />
<%--</r:permissionEvaluator>--%>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
expanded='#{FolderDetailsBean.panels["properties-panel"]}' expandedActionListener="#{FolderDetailsBean.expandPanel}">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width=80 align=center>
<%-- icon image for the folder --%>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #CCCCCC; padding:4px">
<h:graphicImage id="space-logo" url="/images/icons/space-icon-default.gif" width="32" height="32" />
</div>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="<%=request.getContextPath()%>/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</td>
<td>
<%-- properties for the folder --%>
<r:propertySheetGrid id="folder-props" value="#{FolderDetailsBean.folder}" var="folderProps"
columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" />
<h:messages globalOnly="true" id="props-msgs" styleClass="errorMessage" layout="table" />
</td>
</tr>
</table>
</a:panel>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr>
<td align="center">
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
<div style="padding:4px"></div>
<%-- Document Actions --%>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center"
progressive="true" expanded='#{FolderDetailsBean.panels["actions-panel"]}' expandedActionListener="#{FolderDetailsBean.expandPanel}">
<r:actions id="actions_doc" value="avm_folder_details" context="#{FolderDetailsBean.avmNode}" verticalSpacing="3" style="white-space:nowrap" />
</a:panel>
</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

@@ -0,0 +1,195 @@
<%--
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="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %>
<%@ page import="org.alfresco.web.bean.wcm.AVMEditBean" %>
<%@ page import="org.alfresco.web.app.Application" %>
<%@ page import="javax.faces.context.FacesContext" %>
<r:page titleId="title_update_file">
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<%-- set the form name here --%>
<h:form acceptCharset="UTF-8" id="update-file1">
<%-- 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 id="wizard-logo" url="/images/icons/update_large.gif" />
</td>
<td>
<div class="mainTitle"><h:outputText value="#{msg.update}" /> '<h:outputText value="#{AVMEditBean.avmNode.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.update_avm_file_desc}" /></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>
<td width="100%" valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td class="wizardSectionHeading"><h:outputText value="#{msg.local_copy_location}" /></td>
</tr>
<tr>
<td>
1. <h:outputText value="#{msg.locate_content_upload}" />
</td>
</tr>
</h:form>
<r:uploadForm>
<tr><td class="paddingRow"></td></tr>
<tr>
<td>
<h:outputText value="#{msg.location}" />:<input style="margin-left:12px;" type="file" size="50" name="alfFileInput"/>
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td class="mainSubText">2. <h:outputText value="#{msg.click_upload}" /></td>
</tr>
<tr>
<td>
<input style="margin-left:12px;" type="submit" value="<%=Application.getMessage(FacesContext.getCurrentInstance(), "upload")%>" />
</td>
</tr>
<%
AVMEditBean bean = (AVMEditBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AVMEditBean");
if (bean != null && bean.getFileName() != null) {
%>
<tr>
<td>
<img alt="" align="absmiddle" src="<%=request.getContextPath()%>/images/icons/info_icon.gif" />
<%=bean.getFileUploadSuccessMsg()%>
</td>
</tr>
<% } %>
</r:uploadForm>
<h:form acceptCharset="UTF-8" id="update-file2">
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td width="100%" valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton value="#{msg.update}" action="#{AVMEditBean.updateFileOK}" disabled="#{AVMEditBean.fileName == null}" styleClass="dialogControls" />
</td>
</tr>
<tr><td class="dialogButtonSpacing"></td></tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="#{AVMEditBean.cancel}" styleClass="dialogControls" />
</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>
<%-- Error Messages --%>
<tr valign="top">
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<%-- messages tag to show messages not handled by other specific message tags --%>
<h:messages globalOnly="true" styleClass="errorMessage" layout="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>