Changeset 28558
- Timestamp:
- 01/07/08 20:44:48 (1 year ago)
- Files:
-
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-audit-client/src/main/resources/nuxeo.war/incl/document_history_template.xhtml (modified) (2 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-comment-web/src/main/resources/nuxeo.war/incl/tabs/document_comments.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-notification-web/src/main/resources/nuxeo.war/incl/tabs/document_group_subscriptions.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/tag/fn/Functions.java (modified) (7 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.taglib.xml (modified) (12 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.tld (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_table.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_table_simple.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_tables_with_popup.xhtml (modified) (2 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/select_users_selection.xhtml (modified) (2 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/tabs/document_rights.xhtml (modified) (2 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/widgets/contributors_widget.xhtml (modified) (2 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-workflow-client/src/main/resources/nuxeo.war/incl/document_review_roadmap_parallel.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-workflow-client/src/main/resources/nuxeo.war/incl/document_review_roadmap_parallel_ro.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-workflow-client/src/main/resources/nuxeo.war/incl/document_review_roadmap_serial.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-workflow-client/src/main/resources/nuxeo.war/incl/document_review_roadmap_serial_ro.xhtml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-workflow-client/src/main/resources/nuxeo.war/incl/document_review_title.xhtml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
org.nuxeo.ecm.platform/trunk/nuxeo-platform-audit-client/src/main/resources/nuxeo.war/incl/document_history_template.xhtml
r26735 r28558 39 39 <h:outputText value="#{messages['label.username']}" /> 40 40 </f:facet> 41 <h:outputText value="#{ logEntry.principalName}" />41 <h:outputText value="#{nxu:userFullName(logEntry.principalName)}" /> 42 42 </h:column> 43 43 <h:column> … … 57 57 <nxu:graphicImage value="/icons/lock.gif" 58 58 rendered="#{(logEntriesLinkedDocs[logEntry.id]).brokenDocument}" 59 alt="#{(logEntriesLinkedDocs[logEntry.id]).documentRef}"59 alt="#{(logEntriesLinkedDocs[logEntry.id]).documentRef}" 60 60 /> 61 61 <nxd:restDocumentLink document="#{(logEntriesLinkedDocs[logEntry.id]).document}" rendered="#{!(logEntriesLinkedDocs[logEntry.id]).brokenDocument}"> 62 62 <nxu:graphicImage 63 value="#{nxd:iconPath((logEntriesLinkedDocs[logEntry.id]).document)}" alt="#{(logEntriesLinkedDocs[logEntry.id]).document.type}">64 </nxu:graphicImage>63 value="#{nxd:iconPath((logEntriesLinkedDocs[logEntry.id]).document)}" alt="#{(logEntriesLinkedDocs[logEntry.id]).document.type}"> 64 </nxu:graphicImage> 65 65 </nxd:restDocumentLink> 66 66 </f:subview> org.nuxeo.ecm.platform/trunk/nuxeo-platform-comment-web/src/main/resources/nuxeo.war/incl/tabs/document_comments.xhtml
r26734 r28558 44 44 45 45 <div class="commentAuthor"> 46 <h:outputText value="#{ threadEntry.comment.comment.author}"/>46 <h:outputText value="#{nxu:userFullName(threadEntry.comment.comment.author)}"/> 47 47 48 48 <h:outputText value=" "/> org.nuxeo.ecm.platform/trunk/nuxeo-platform-notification-web/src/main/resources/nuxeo.war/incl/tabs/document_group_subscriptions.xhtml
r21978 r28558 38 38 </h:column> 39 39 <h:column> 40 <h:outputText value="#{ user}" />40 <h:outputText value="#{nxu:userFullName(user)}" /> 41 41 </h:column> 42 42 </h:dataTable> org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/tag/fn/Functions.java
r28499 r28558 1 1 /* 2 * (C) Copyright 2007 Nuxeo SAS (http://nuxeo.com/) and contributors.2 * (C) Copyright 2007-2008 Nuxeo SAS (http://nuxeo.com/) and contributors. 3 3 * 4 4 * All rights reserved. This program and the accompanying materials … … 26 26 import java.util.Map; 27 27 28 import javax.faces.context.ExternalContext; 28 29 import javax.faces.context.FacesContext; 29 30 … … 31 32 import org.nuxeo.ecm.core.api.ClientException; 32 33 import org.nuxeo.ecm.core.api.NuxeoPrincipal; 34 import org.nuxeo.ecm.platform.usermanager.UserManager; 35 import org.nuxeo.runtime.api.Framework; 33 36 34 37 /** … … 39 42 */ 40 43 public final class Functions { 44 45 // XXX we should not use a static variable for this cache, but use a cache 46 // at a higher level in the Framework or in a facade. 47 private static UserManager userManager; 48 49 /** 50 * Key in the session holding a map caching user full names. 51 */ 52 private static final String FULLNAMES_MAP_KEY = Functions.class.getName() 53 + ".FULLNAMES_MAP"; 41 54 42 55 static Map<String, String> mapOfDateLength = new HashMap<String, String>() { … … 76 89 throws ClientException { 77 90 FacesContext context = FacesContext.getCurrentInstance(); 78 NuxeoPrincipal principal = (NuxeoPrincipal) context 79 .getExternalContext().getUserPrincipal(); 91 NuxeoPrincipal principal = (NuxeoPrincipal) context.getExternalContext().getUserPrincipal(); 80 92 return principal.isMemberOf(groupName); 93 } 94 95 private static UserManager getUserManager() throws ClientException { 96 if (userManager == null) { 97 try { 98 // XXX this should not use a static variable to do the caching 99 userManager = Framework.getService(UserManager.class); 100 } catch (Exception e) { 101 throw new ClientException(e); 102 } 103 } 104 return userManager; 105 } 106 107 /** 108 * Returns the full name of a user. 109 * 110 * @param username the user id, or null or empty for the current user. 111 * @return the full user name. 112 */ 113 public static String userFullName(String username) { 114 ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); 115 // empty user name is current user 116 if (username == null || username.length() == 0) { 117 username = externalContext.getUserPrincipal().getName(); 118 } 119 // check cache 120 Map<String, Object> session = externalContext.getSessionMap(); 121 Map<String, String> fullNames = (Map<String, String>) session.get(FULLNAMES_MAP_KEY); 122 if (fullNames != null && fullNames.containsKey(username)) { 123 return fullNames.get(username); 124 } 125 // compute full name 126 String fullName; 127 try { 128 NuxeoPrincipal principal = getUserManager().getPrincipal(username); 129 if (principal != null) { 130 fullName = principalFullName(principal); 131 } else { 132 fullName = username; 133 } 134 } catch (ClientException e) { 135 fullName = username; 136 } 137 // put in cache 138 if (fullNames == null) { 139 fullNames = new HashMap<String, String>(); 140 session.put(FULLNAMES_MAP_KEY, fullNames); 141 } 142 fullNames.put(username, fullName); 143 return fullName; 144 } 145 146 // this should be a method of the principal itself 147 protected static String principalFullName(NuxeoPrincipal principal) { 148 String first = principal.getFirstName(); 149 String last = principal.getLastName(); 150 if (first == null || first.length() == 0) { 151 if (last == null || last.length() == 0) { 152 return principal.getName(); 153 } else { 154 return last; 155 } 156 } else { 157 if (last == null || last.length() == 0) { 158 return first; 159 } else { 160 return first + ' ' + last; 161 } 162 } 81 163 } 82 164 … … 89 171 Locale locale = context.getViewRoot().getLocale(); 90 172 91 DateFormat aDateFormat = DateFormat.getDateInstance( Integer92 .parseInt(mapOfDateLength.get(formatLength.toLowerCase())),173 DateFormat aDateFormat = DateFormat.getDateInstance( 174 Integer.parseInt(mapOfDateLength.get(formatLength.toLowerCase())), 93 175 locale); 94 176 … … 114 196 Locale locale = context.getViewRoot().getLocale(); 115 197 116 DateFormat aDateFormat = DateFormat.getDateTimeInstance( Integer117 .parseInt(mapOfDateLength.get(formatLength.toLowerCase())),118 Integer.parseInt(mapOfDateLength 119 .get(formatLength.toLowerCase())),locale);198 DateFormat aDateFormat = DateFormat.getDateTimeInstance( 199 Integer.parseInt(mapOfDateLength.get(formatLength.toLowerCase())), 200 Integer.parseInt(mapOfDateLength.get(formatLength.toLowerCase())), 201 locale); 120 202 121 203 // Cast to SimpleDateFormat to make "toPattern" method available org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.taglib.xml
r26728 r28558 47 47 </function-signature> 48 48 </function> 49 50 51 <function>49 50 51 <function> 52 52 <function-name>dateFormater</function-name> 53 53 <function-class> … … 58 58 </function-signature> 59 59 </function> 60 61 <function>60 61 <function> 62 62 <function-name>basicDateFormater</function-name> 63 63 <function-class> … … 68 68 </function-signature> 69 69 </function> 70 71 <function>70 71 <function> 72 72 <function-name>dateAndTimeFormater</function-name> 73 73 <function-class> … … 78 78 </function-signature> 79 79 </function> 80 81 <function>80 81 <function> 82 82 <function-name>basicDateAndTimeFormater</function-name> 83 83 <function-class> … … 88 88 </function-signature> 89 89 </function> 90 91 90 91 92 92 <function> 93 93 <function-name>userIsMemberOf</function-name> … … 99 99 </function-signature> 100 100 </function> 101 <function> 102 <function-name>userFullName</function-name> 103 <function-class> 104 org.nuxeo.ecm.platform.ui.web.tag.fn.Functions 105 </function-class> 106 <function-signature> 107 String userFullName(java.lang.String) 108 </function-signature> 109 </function> 101 110 <!-- XXX AT: should be in nxdirectory taglib, not util --> 102 111 <function> … … 105 114 org.nuxeo.ecm.platform.ui.web.directory.DirectoryFunctions 106 115 </function-class> 107 <function-signature>List getCSLData(java.lang.String)</function-signature> 116 <function-signature> 117 List getCSLData(java.lang.String) 118 </function-signature> 108 119 </function> 109 120 <!-- XXX AT: should be in nxdirectory taglib, not util --> … … 113 124 org.nuxeo.ecm.platform.ui.web.directory.DirectoryFunctions 114 125 </function-class> 115 <function-signature>int getListSize(java.lang.String)</function-signature> 126 <function-signature> 127 int getListSize(java.lang.String) 128 </function-signature> 116 129 </function> 117 130 <tag> … … 212 225 <tag-name>inputCalendar</tag-name> 213 226 <component> 214 <component-type>org.apache.myfaces.HtmlInputCalendar</component-type> 227 <component-type> 228 org.apache.myfaces.HtmlInputCalendar 229 </component-type> 215 230 </component> 216 231 </tag> … … 224 239 <tag-name>graphicImage</tag-name> 225 240 <component> 226 <component-type>org.apache.myfaces.HtmlGraphicImage</component-type> 241 <component-type> 242 org.apache.myfaces.HtmlGraphicImage 243 </component-type> 227 244 </component> 228 245 </tag> … … 249 266 <tag-name>inputFileUpload</tag-name> 250 267 <component> 251 <component-type>org.apache.myfaces.trinidad.CoreInputFile</component-type> 268 <component-type> 269 org.apache.myfaces.trinidad.CoreInputFile 270 </component-type> 252 271 <handler-class> 253 272 org.apache.myfaces.trinidadinternal.facelets.TrinidadComponentHandler … … 258 277 <tag-name>selectOneRadio</tag-name> 259 278 <component> 260 <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type> 279 <component-type> 280 org.apache.myfaces.HtmlSelectOneRadio 281 </component-type> 261 282 <renderer-type>org.apache.myfaces.Radio</renderer-type> 262 283 </component> org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.tld
r28216 r28558 36 36 <li> join(String[], String): performs a join on given array using given separator. 37 37 </li> 38 <li> userIsMemberOf(String): tests if the user belongs to the named group 38 <li> userIsMemberOf(String): tests if the user belongs to the named group. 39 </li> 40 <li> userFullName(String): returns the full name of a user given its id. 39 41 </li> 40 42 </ul> org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_table.xhtml
r27443 r28558 129 129 </h:panelGroup> 130 130 </f:facet> 131 <h:outputText value="#{ row.data.dublincore.creator}" />131 <h:outputText value="#{nxu:userFullName(row.data.dublincore.creator)}" /> 132 132 </h:column> 133 133 org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_table_simple.xhtml
r26729 r28558 99 99 </h:panelGroup> 100 100 </f:facet> 101 <h:outputText value="#{ doc.dublincore.creator}" />101 <h:outputText value="#{nxu:userFullName(doc.dublincore.creator)}" /> 102 102 </h:column> 103 103 </nxu:dataTable> org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_tables_with_popup.xhtml
r26729 r28558 39 39 value="#{nxd:iconPath(row.data)}" alt="#{row.data.type}"> 40 40 <a4j:support 41 event="onclick"42 action="#{popupHelper.setPopupDocRef(row.data.ref)}"43 reRender="contextMenuRegion"44 limitToList="true"45 oncomplete="placePopup('#{row.data.ref}');"46 />41 event="onclick" 42 action="#{popupHelper.setPopupDocRef(row.data.ref)}" 43 reRender="contextMenuRegion" 44 limitToList="true" 45 oncomplete="placePopup('#{row.data.ref}');" 46 /> 47 47 </nxu:graphicImage></div> 48 48 <script type="text/javascript"> … … 75 75 <h:outputText value="#{messages['label.content.header.author']}" /> 76 76 </f:facet> 77 <h:outputText value="#{ row.data.dublincore.contributors[0]}" />77 <h:outputText value="#{nxu:userFullName(row.data.dublincore.creator)}" /> 78 78 </h:column> 79 79 <!-- Life cycle --> org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/select_users_selection.xhtml
r23522 r28558 30 30 <h:outputText value="#{messages['label.username']}" /> 31 31 </f:facet> 32 <h:outputText value="#{ user}" />32 <h:outputText value="#{nxu:userFullName(user)}" /> 33 33 </h:column> 34 34 <h:column> … … 39 39 value="#{messages['label.security.delUsername']}" 40 40 action="#{principalListManager.removeFromSelectedUsers(user)}" 41 reRender="selectedUsersAndGroups" 41 reRender="selectedUsersAndGroups" 42 42 rendered="#{empty searchLocation}" /> 43 43 <a4j:commandLink 44 44 value="#{messages['label.security.removeFromGroup']}" 45 45 action="#{principalListManager.removeFromSelectedUsers(user)}" 46 reRender="selectedUsersAndGroups" 46 reRender="selectedUsersAndGroups" 47 47 rendered="#{searchLocation == 'USER_MANAGEMENT'}" /> 48 48 </h:column> org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/tabs/document_rights.xhtml
r21972 r28558 38 38 </f:facet> 39 39 40 <h:commandLink value="#{ user}" immediate="true"40 <h:commandLink value="#{nxu:userFullName(user)}" immediate="true" 41 41 action="#{userManagerActions.viewUser(user)}" rendered="#{principalType=='USER_TYPE'}"> 42 42 </h:commandLink> … … 129 129 <!-- Username --> 130 130 <f:subview rendered="${columnHeader.id == 'c1'}"> 131 <h:commandLink value="#{ securityActions.dataTableModel.currentCellDisplayedValue}" immediate="true"131 <h:commandLink value="#{nxu:userFullName(securityActions.dataTableModel.currentCellDisplayedValue)}" immediate="true" 132 132 action="#{userManagerActions.viewUser(securityActions.dataTableModel.currentCellDisplayedValue)}" rendered="#{securityActions.dataTableModel.currentUserType=='USER_TYPE'}"> 133 133 </h:commandLink> org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/widgets/contributors_widget.xhtml
r28246 r28558 3 3 xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" 4 4 xmlns:t="http://myfaces.apache.org/tomahawk" 5 xmlns:nxu="http://nuxeo.org/nxweb/util" 5 6 xmlns:nxdir="http://nuxeo.org/nxdirectory" 6 7 id="#{widget.id}"> … … 9 10 layout="simple" styleClass="standardList"> 10 11 <h:graphicImage value="/icons/html.png" /> 11 <h:commandLink value="#{ listItem}" immediate="true"12 <h:commandLink value="#{nxu:userFullName(listItem)}" immediate="true" 12 13 action="#{userManagerActions.viewUser}" 13 14 id="#{widget.id}_user"> org.nuxeo.ecm.platform/trunk/nuxeo-platform-workflow-client/src/main/resources/nuxeo.war/incl/document_review_roadmap_parallel.xhtml
r27448 r28558 1 1 <div xmlns="http://www.w3.org/1999/xhtml" 2 xmlns:ui="http://java.sun.com/jsf/facelets" 3 xmlns:f="http://java.sun.com/jsf/core" 4 xmlns:h="http://java.sun.com/jsf/html" 5 xmlns:c="http://java.sun.com/jstl/core" 6 xmlns:t="http://myfaces.apache.org/tomahawk" 7 xmlns:nxu="http://nuxeo.org/nxweb/util" 8 xmlns:nxh="http://nuxeo.org/nxweb/html" 9 xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"><nxu:methodResult 10 value="#{documentWorkflowActions.isWorkflowStarted()}" 11 name="isWorkflowStarted"> 2 xmlns:ui="http://java.sun.com/jsf/facelets" 3 xmlns:f="http://java.sun.com/jsf/core" 4 xmlns:h="http://java.sun.com/jsf/html" 5 xmlns:c="http://java.sun.com/jstl/core" 6 xmlns:t="http://myfaces.apache.org/tomahawk" 7 xmlns:nxu="http://nuxeo.org/nxweb/util" 8 xmlns:nxh="http://nuxeo.org/nxweb/html" 9 xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"> 10 <nxu:methodResult 11 value="#{documentWorkflowActions.isWorkflowStarted()}" 12 name="isWorkflowStarted"> 12 13 13 <div class="closedContent"><h:form> 14 <h3><h:outputText 15 value="#{messages['label.workflow.review.task.list']}" /></h3> 14 <div class="closedContent"> 15 <h:form> 16 <h3> 17 <h:outputText 18 value="#{messages['label.workflow.review.task.list']}" /> 19 </h3> 16 20 17 <h:dataTable var="workflowTaskInstance" value="${documentTasks}"18 class="dataOutput" rowClasses="dataRowEven,dataRowOdd"19 columnClasses="iconColumn,,,,,,,,,"20 rendered="#{documentTasks.size > 0}">21 <h:dataTable var="workflowTaskInstance" value="${documentTasks}" 22 class="dataOutput" rowClasses="dataRowEven,dataRowOdd" 23 columnClasses="iconColumn,,,,,,,,," 24 rendered="#{documentTasks.size > 0}"> 21 25 22 <h:column> 23 <f:facet name="header"> 24 <h:outputText value="#{messages['label.workflow.task.validated']}" /> 25 </f:facet> 26 <h:graphicImage value="/icons/review_refused.png" 27 rendered="#{workflowTaskInstance.rejected}" /> 28 <h:graphicImage value="/icons/review_accepted.png" 29 rendered="#{workflowTaskInstance.ended}" /> 30 <h:graphicImage value="/icons/review_pending.gif" 31 rendered="#{!workflowTaskInstance.ended and !workflowTaskInstance.rejected}" /> 32 </h:column> 26 <h:column> 27 <f:facet name="header"> 28 <h:outputText 29 value="#{messages['label.workflow.task.validated']}" /> 30 </f:facet> 31 <h:graphicImage value="/icons/review_refused.png" 32 rendered="#{workflowTaskInstance.rejected}" /> 33 <h:graphicImage value="/icons/review_accepted.png" 34 rendered="#{workflowTaskInstance.ended}" /> 35 <h:graphicImage value="/icons/review_pending.gif" 36 rendered="#{!workflowTaskInstance.ended and !workflowTaskInstance.rejected}" /> 37 </h:column> 33 38 34 <h:column> 35 <f:facet name="header"> 36 <h:outputText value="#{messages['label.workflow.task.principal']}" /> 37 </f:facet> 38 <h:outputText 39 value="#{messages[workflowTaskInstance.participantName]}" /> 40 </h:column> 39 <h:column> 40 <f:facet name="header"> 41 <h:outputText 42 value="#{messages['label.workflow.task.principal']}" /> 43 </f:facet> 44 <h:outputText 45 value="#{nxu:userFullName(workflowTaskInstance.participantName)}" /> 46 </h:column> 41 47 42 <h:column> 43 <f:facet name="header"> 44 <h:outputText value="#{messages['label.workflow.task.directive']}" /> 45 </f:facet> 46 <h:outputText value="#{messages[workflowTaskInstance.directive]}" /> 47 </h:column> 48 <h:column> 49 <f:facet name="header"> 50 <h:outputText 51 value="#{messages['label.workflow.task.directive']}" /> 52 </f:facet> 53 <h:outputText 54 value="#{messages[workflowTaskInstance.directive]}" /> 55 </h:column> 48 56 49 <h:column> 50 <f:facet name="header"> 51 <h:outputText value="#{messages['label.review.user.comment']}" /> 52 </f:facet> 53 <h:outputText value="#{messages[workflowTaskInstance.comment]}" /> 54 </h:column> 57 <h:column> 58 <f:facet name="header"> 59 <h:outputText 60 value="#{messages['label.review.user.comment']}" /> 61 </f:facet> 62 <h:outputText 63 value="#{messages[workflowTaskInstance.comment]}" /> 64 </h:column> 55 65 56 <h:column> 57 <f:facet name="header"> 58 <h:outputText value="#{messages['label.workflow.task.startdate']}" /> 59 </f:facet> 60 <h:outputText value="#{workflowTaskInstance.startDate}"> 61 <f:convertDateTime pattern="#{nxu:dateAndTimeFormater('medium')}" /> 62 </h:outputText> 63 </h:column> 66 <h:column> 67 <f:facet name="header"> 68 <h:outputText 69 value="#{messages['label.workflow.task.startdate']}" /> 70 </f:facet> 71 <h:outputText value="#{workflowTaskInstance.startDate}"> 72 <f:convertDateTime 73 pattern="#{nxu:dateAndTimeFormater('medium')}" /> 74 </h:outputText> 75 </h:column> 64 76 65 <h:column> 66 <f:facet name="header"> 67 <h:outputText value="#{messages['label.workflow.task.duedate']}" /> 68 </f:facet> 69 <h:outputText value="#{workflowTaskInstance.dueDate}"> 70 <f:convertDateTime pattern="#{nxu:dateAndTimeFormater('medium')}" /> 71 </h:outputText> 72 </h:column> 77 <h:column> 78 <f:facet name="header"> 79 <h:outputText 80 value="#{messages['label.workflow.task.duedate']}" /> 81 </f:facet> 82 <h:outputText value="#{workflowTaskInstance.dueDate}"> 83 <f:convertDateTime 84 pattern="#{nxu:dateAndTimeFormater('medium')}" /> 85 </h:outputText> 86 </h:column> 73 87 74 88 75 <h:column>76 <f:facet name="header">77 <h:outputText value="" />78 </f:facet>79 <nxu:methodResult name="canRemoveWorkItem"80 value="#{documentTaskActions.canRemoveWorkItem(workflowTaskInstance)}">81 <nxh:commandLink82 actionListener="#{documentTaskActions.removeOneTask}"83 value="#{messages['label.review.remove.task']}"84 rendered="#{canRemoveWorkItem}">85 <f:param name="workflowTaskInstanceId"86 value="#{workflowTaskInstance.id}" />87 </nxh:commandLink>88 </nxu:methodResult>89 </h:column>89 <h:column> 90 <f:facet name="header"> 91 <h:outputText value="" /> 92 </f:facet> 93 <nxu:methodResult name="canRemoveWorkItem" 94 value="#{documentTaskActions.canRemoveWorkItem(workflowTaskInstance)}"> 95 <nxh:commandLink 96 actionListener="#{documentTaskActions.removeOneTask}" 97 value="#{messages['label.review.remove.task']}" 98 rendered="#{canRemoveWorkItem}"> 99 <f:param name="workflowTaskInstanceId" 100 value="#{workflowTaskInstance.id}" /> 101 </nxh:commandLink> 102 </nxu:methodResult> 103 </h:column> 90 104 91 <h:column>92 <f:facet name="header">93 <h:outputText value="" />94 </f:facet>95 <nxu:methodResult name="canEndWorkItem"96 value="#{documentTaskActions.canApproveWorkItem(workflowTaskInstance)}">97 <nxh:commandLink98 action="#{documentTaskActions.endTask(workflowTaskInstance.id)}"99 value="#{messages['label.review.end.task']}"100 rendered="#{isWorkflowStarted and canEndWorkItem}">101 </nxh:commandLink>102 </nxu:methodResult>105 <h:column> 106 <f:facet name="header"> 107 <h:outputText value="" /> 108 </f:facet> 109 <nxu:methodResult name="canEndWorkItem" 110 value="#{documentTaskActions.canApproveWorkItem(workflowTaskInstance)}"> 111 <nxh:commandLink 112 action="#{documentTaskActions.endTask(workflowTaskInstance.id)}" 113 value="#{messages['label.review.end.task']}" 114 rendered="#{isWorkflowStarted and canEndWorkItem}"> 115 </nxh:commandLink> 116 </nxu:methodResult> 103 117 104 </h:column>118 </h:column> 105 119 106 <h:column>107 <f:facet name="header">108 <h:outputText value="" />109 </f:facet>110 <nxu:methodResult111 value="#{documentTaskActions.canRejectWorkItem(workflowTaskInstance)}"112 name="canRejectWorkItem">113 <nxh:commandLink114 actionListener="#{documentTaskActions.rejectOneTask}"115 rendered="#{isWorkflowStarted and canRejectWorkItem}"116 value="#{messages['label.review.reject.task']}">117 <f:param name="workflowTaskInstanceId"118 value="#{workflowTaskInstance.id}" />119 </nxh:commandLink>120 </nxu:methodResult>121 </h:column>120 <h:column> 121 <f:facet name="header"> 122 <h:outputText value="" /> 123 </f:facet> 124 <nxu:methodResult 125 value="#{documentTaskActions.canRejectWorkItem(workflowTaskInstance)}" 126 name="canRejectWorkItem"> 127 <nxh:commandLink 128 actionListener="#{documentTaskActions.rejectOneTask}" 129 rendered="#{isWorkflowStarted and canRejectWorkItem}" 130 value="#{messages['label.review.reject.task']}"> 131 <f:param name="workflowTaskInstanceId" 132 value="#{workflowTaskInstance.id}" /> 133 </nxh:commandLink> 134 </nxu:methodResult> 135 </h:column> 122 136 123 </h:dataTable>137 </h:dataTable> 124 138 125 <br />139 <br /> 126 140 127 <h:panelGroup class="dataInputGroup" 128 rendered="#{documentTasks.size > 0 and canManageWorkflow}"> 129 <div><i> <h:outputText 130 value="#{messages['label.review.my.tasks.help']}" /></i> 141 <h:panelGroup class="dataInputGroup" 142 rendered="#{documentTasks.size > 0 and canManageWorkflow}"> 143 <div> 144 <i> 145 <h:outputText 146 value="#{messages['label.review.my.tasks.help']}" /> 147 </i> 131 148 132 <table class="dataInput"> 133 <tr> 134 <td class="labelColumn"><h:outputText class="required" 135 value="#{messages['label.review.user.comment']}" /></td> 136 <td><h:inputTextarea id="taskActionCommentParallel" rows="5" cols="50" 137 value="#{documentTaskActions.taskActionComment}" /> 138 </td> 139 </tr> 140 <tr> 141 <td colspan="2"> 142 <h:message styleClass="errorMessage" for="taskActionCommentParallel" /> 143 </td> 144 </tr> 145 <tr> 146 <td cellpadding="2"><h:commandButton type="submit" 147 value="#{messages['label.workflow.start']}" styleClass="button" 148 rendered="#{!isWorkflowStarted and reviewModel.processInstanceCreatorName == currentUser.name}" 149 action="#{documentWorkflowActions.startWorkflowCallback}" /></td> 150 </tr> 151 </table> 152 </div> 153 </h:panelGroup> 149 <table class="dataInput"> 150 <tr> 151 <td class="labelColumn"> 152 <h:outputText class="required" 153 value="#{messages['label.review.user.comment']}" /> 154 </td> 155 <td> 156 <h:inputTextarea id="taskActionCommentParallel" 157 rows="5" cols="50" 158 value="#{documentTaskActions.taskActionComment}" /> 159 </td> 160 </tr> 161 <tr> 162 <td colspan="2"> 163 <h:message styleClass="errorMessage" 164 for="taskActionCommentParallel" /> 165 </td> 166
