diff --git a/config/alfresco/web-client-config.xml b/config/alfresco/web-client-config.xml index 698fa3361c..5c5b6cb4da 100644 --- a/config/alfresco/web-client-config.xml +++ b/config/alfresco/web-client-config.xml @@ -249,6 +249,10 @@ + + + + @@ -256,6 +260,9 @@ + + + diff --git a/source/java/org/alfresco/web/action/evaluator/ApproveDocEvaluator.java b/source/java/org/alfresco/web/action/evaluator/ApproveDocEvaluator.java index d33009d6e9..714c35f4f5 100644 --- a/source/java/org/alfresco/web/action/evaluator/ApproveDocEvaluator.java +++ b/source/java/org/alfresco/web/action/evaluator/ApproveDocEvaluator.java @@ -17,6 +17,7 @@ package org.alfresco.web.action.evaluator; import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.bean.repository.Node; @@ -33,8 +34,7 @@ public final class ApproveDocEvaluator implements ActionEvaluator public boolean evaluate(Node node) { return (node.getProperties().get("app:approveStep") != null && - node.isLocked() == false && - node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false); + node.isLocked() == false); } } /* diff --git a/source/java/org/alfresco/web/action/evaluator/ApproveNonDraftDocEvaluator.java b/source/java/org/alfresco/web/action/evaluator/ApproveNonDraftDocEvaluator.java new file mode 100644 index 0000000000..01ba1aed31 --- /dev/null +++ b/source/java/org/alfresco/web/action/evaluator/ApproveNonDraftDocEvaluator.java @@ -0,0 +1,42 @@ +/* + * 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.action.evaluator; + +import org.alfresco.model.ContentModel; +import org.alfresco.web.action.ActionEvaluator; +import org.alfresco.web.bean.repository.Node; + +/** + * UI Action Evaluator - 'Approve' workflow step for document. + * + * @author Kevin Roast + */ +public final class ApproveNonDraftDocEvaluator implements ActionEvaluator +{ + /** + * @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node) + */ + public boolean evaluate(Node node) + { + return (node.getProperties().get("app:approveStep") != null && + node.isLocked() == false && + node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false); + } +} +/* + +*/ \ No newline at end of file diff --git a/source/java/org/alfresco/web/action/evaluator/RejectDocEvaluator.java b/source/java/org/alfresco/web/action/evaluator/RejectDocEvaluator.java index d05aaf227e..68a7e3df14 100644 --- a/source/java/org/alfresco/web/action/evaluator/RejectDocEvaluator.java +++ b/source/java/org/alfresco/web/action/evaluator/RejectDocEvaluator.java @@ -17,6 +17,7 @@ package org.alfresco.web.action.evaluator; import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.bean.repository.Node; @@ -33,8 +34,7 @@ public final class RejectDocEvaluator implements ActionEvaluator public boolean evaluate(Node node) { return (node.getProperties().get("app:rejectStep") != null && - node.isLocked() == false && - node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false); + node.isLocked() == false); } } /* diff --git a/source/java/org/alfresco/web/action/evaluator/RejectNonDraftDocEvaluator.java b/source/java/org/alfresco/web/action/evaluator/RejectNonDraftDocEvaluator.java new file mode 100644 index 0000000000..29eb1a64a1 --- /dev/null +++ b/source/java/org/alfresco/web/action/evaluator/RejectNonDraftDocEvaluator.java @@ -0,0 +1,42 @@ +/* + * 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.action.evaluator; + +import org.alfresco.model.ContentModel; +import org.alfresco.web.action.ActionEvaluator; +import org.alfresco.web.bean.repository.Node; + +/** + * UI Action Evaluator - 'Reject' workflow step for document. + * + * @author Kevin Roast + */ +public final class RejectNonDraftDocEvaluator implements ActionEvaluator +{ + /** + * @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node) + */ + public boolean evaluate(Node node) + { + return (node.getProperties().get("app:rejectStep") != null && + node.isLocked() == false && + node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false); + } +} +/* + +*/ \ No newline at end of file diff --git a/source/java/org/alfresco/web/bean/LicenseBean.java b/source/java/org/alfresco/web/bean/LicenseBean.java deleted file mode 100644 index 8f599c804c..0000000000 --- a/source/java/org/alfresco/web/bean/LicenseBean.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2005 Alfresco, Inc. - * - * Licensed under the Alfresco Network License. You may obtain a - * copy of the License at - * - * http://www.alfrescosoftware.com/legal/ - * - * Please view the license relevant to your network subscription. - * - * BY CLICKING THE "I UNDERSTAND AND ACCEPT" BOX, OR INSTALLING, - * READING OR USING ALFRESCO'S Network SOFTWARE (THE "SOFTWARE"), - * YOU ARE AGREEING ON BEHALF OF THE ENTITY LICENSING THE SOFTWARE - * ("COMPANY") THAT COMPANY WILL BE BOUND BY AND IS BECOMING A PARTY TO - * THIS ALFRESCO NETWORK AGREEMENT ("AGREEMENT") AND THAT YOU HAVE THE - * AUTHORITY TO BIND COMPANY. IF COMPANY DOES NOT AGREE TO ALL OF THE - * TERMS OF THIS AGREEMENT, DO NOT SELECT THE "I UNDERSTAND AND AGREE" - * BOX AND DO NOT INSTALL THE SOFTWARE OR VIEW THE SOURCE CODE. COMPANY - * HAS NOT BECOME A LICENSEE OF, AND IS NOT AUTHORIZED TO USE THE - * SOFTWARE UNLESS AND UNTIL IT HAS AGREED TO BE BOUND BY THESE LICENSE - * TERMS. THE "EFFECTIVE DATE" FOR THIS AGREEMENT SHALL BE THE DAY YOU - * CHECK THE "I UNDERSTAND AND ACCEPT" BOX. - */ -package org.alfresco.web.bean; - -import java.security.Principal; -import java.text.MessageFormat; -import java.util.Date; - -import javax.faces.context.FacesContext; - -import org.alfresco.service.descriptor.DescriptorService; -import org.alfresco.service.license.LicenseDescriptor; -import org.alfresco.web.app.Application; - -/** - * Backing Bean for the License Management pages. - * - * @author David Caruana - */ -public class LicenseBean -{ - - /** The DescriptorService to be used by the bean */ - private DescriptorService descriptorService; - - - - // ------------------------------------------------------------------------------ - // Bean property getters and setters - - /** - * @param descriptorService The DescriptorService to set. - */ - public void setDescriptorService(DescriptorService descriptorService) - { - this.descriptorService = descriptorService; - } - - - /** - * Gets the License Description - * - * @return license description - */ - public String getLicenseDescription() - { - String description = ""; - - LicenseDescriptor descriptor = descriptorService.getLicenseDescriptor(); - if (descriptor != null) - { - String subject = descriptor.getSubject(); - String holder = getHolderOrganisation(descriptor.getHolder()); - Date issued = descriptor.getIssued(); - Date validUntil = descriptor.getValidUntil(); - - if (validUntil == null) - { - description = Application.getMessage(FacesContext.getCurrentInstance(), "admin_unlimited_license"); - description = MessageFormat.format(description, new Object[] { subject, holder, issued }); - } - else - { - int days = descriptor.getDays(); - int remainingDays = descriptor.getRemainingDays(); - description = Application.getMessage(FacesContext.getCurrentInstance(), "admin_limited_license"); - description = MessageFormat.format(description, new Object[] { subject, holder, issued, days, validUntil, remainingDays }); - } - } - else - { - description = Application.getMessage(FacesContext.getCurrentInstance(), "admin_invalid_license"); - } - - return description; - } - - /** - * Get Organisation from Principal - * - * @param holderPrincipal - * @return organisation - */ - private String getHolderOrganisation(Principal holderPrincipal) - { - String holder = null; - if (holderPrincipal != null) - { - holder = holderPrincipal.getName(); - if (holder != null) - { - String[] properties = holder.split(","); - for (String property : properties) - { - String[] parts = property.split("="); - if (parts[0].equals("O")) - { - holder = parts[1]; - } - } - } - } - - return holder; - } - -} diff --git a/source/web/images/filetypes/odf.gif b/source/web/images/filetypes/odf.gif new file mode 100644 index 0000000000..d5bc5e0083 Binary files /dev/null and b/source/web/images/filetypes/odf.gif differ diff --git a/source/web/images/filetypes/odg.gif b/source/web/images/filetypes/odg.gif new file mode 100644 index 0000000000..a63083ed2c Binary files /dev/null and b/source/web/images/filetypes/odg.gif differ diff --git a/source/web/images/filetypes/odp.gif b/source/web/images/filetypes/odp.gif new file mode 100644 index 0000000000..a8bceca5ae Binary files /dev/null and b/source/web/images/filetypes/odp.gif differ diff --git a/source/web/images/filetypes/ods.gif b/source/web/images/filetypes/ods.gif new file mode 100644 index 0000000000..0758aa2aaf Binary files /dev/null and b/source/web/images/filetypes/ods.gif differ diff --git a/source/web/images/filetypes/odt.gif b/source/web/images/filetypes/odt.gif index 0371d01493..e89833a22d 100644 Binary files a/source/web/images/filetypes/odt.gif and b/source/web/images/filetypes/odt.gif differ diff --git a/source/web/images/filetypes32/odf.gif b/source/web/images/filetypes32/odf.gif new file mode 100644 index 0000000000..8f052c52f8 Binary files /dev/null and b/source/web/images/filetypes32/odf.gif differ diff --git a/source/web/images/filetypes32/odg.gif b/source/web/images/filetypes32/odg.gif new file mode 100644 index 0000000000..f4dbaf33ec Binary files /dev/null and b/source/web/images/filetypes32/odg.gif differ diff --git a/source/web/images/filetypes32/odp.gif b/source/web/images/filetypes32/odp.gif new file mode 100644 index 0000000000..9ceb1260d9 Binary files /dev/null and b/source/web/images/filetypes32/odp.gif differ diff --git a/source/web/images/filetypes32/ods.gif b/source/web/images/filetypes32/ods.gif new file mode 100644 index 0000000000..0e3c81775c Binary files /dev/null and b/source/web/images/filetypes32/ods.gif differ diff --git a/source/web/images/filetypes32/odt.gif b/source/web/images/filetypes32/odt.gif index 34e0bea33d..b920c40f0b 100644 Binary files a/source/web/images/filetypes32/odt.gif and b/source/web/images/filetypes32/odt.gif differ diff --git a/source/web/jsp/admin/admin-console.jsp b/source/web/jsp/admin/admin-console.jsp index 4b48d8c131..1afb36f029 100644 --- a/source/web/jsp/admin/admin-console.jsp +++ b/source/web/jsp/admin/admin-console.jsp @@ -126,9 +126,6 @@ - - - <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>