Changeset 28558

Show
Ignore:
Timestamp:
01/07/08 20:44:48 (1 year ago)
Author:
fguillaume
Message:

NXP-1844: Show full name instead of user login in UI. Adding a nxu:userFullName EL function.

Files:

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  
    3939          <h:outputText value="#{messages['label.username']}" /> 
    4040        </f:facet> 
    41         <h:outputText value="#{logEntry.principalName}" /> 
     41        <h:outputText value="#{nxu:userFullName(logEntry.principalName)}" /> 
    4242      </h:column> 
    4343      <h:column> 
     
    5757         <nxu:graphicImage value="/icons/lock.gif" 
    5858           rendered="#{(logEntriesLinkedDocs[logEntry.id]).brokenDocument}" 
    59                   alt="#{(logEntriesLinkedDocs[logEntry.id]).documentRef}" 
     59                alt="#{(logEntriesLinkedDocs[logEntry.id]).documentRef}" 
    6060           /> 
    6161          <nxd:restDocumentLink document="#{(logEntriesLinkedDocs[logEntry.id]).document}" rendered="#{!(logEntriesLinkedDocs[logEntry.id]).brokenDocument}"> 
    6262              <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> 
    6565          </nxd:restDocumentLink> 
    6666        </f:subview> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-comment-web/src/main/resources/nuxeo.war/incl/tabs/document_comments.xhtml

    r26734 r28558  
    4444 
    4545        <div class="commentAuthor"> 
    46           <h:outputText value="#{threadEntry.comment.comment.author}"/> 
     46          <h:outputText value="#{nxu:userFullName(threadEntry.comment.comment.author)}"/> 
    4747 
    4848          <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  
    3838    </h:column> 
    3939  <h:column> 
    40     <h:outputText value="#{user}" /> 
     40    <h:outputText value="#{nxu:userFullName(user)}" /> 
    4141  </h:column> 
    4242  </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  
    11/* 
    2  * (C) Copyright 2007 Nuxeo SAS (http://nuxeo.com/) and contributors. 
     2 * (C) Copyright 2007-2008 Nuxeo SAS (http://nuxeo.com/) and contributors. 
    33 * 
    44 * All rights reserved. This program and the accompanying materials 
     
    2626import java.util.Map; 
    2727 
     28import javax.faces.context.ExternalContext; 
    2829import javax.faces.context.FacesContext; 
    2930 
     
    3132import org.nuxeo.ecm.core.api.ClientException; 
    3233import org.nuxeo.ecm.core.api.NuxeoPrincipal; 
     34import org.nuxeo.ecm.platform.usermanager.UserManager; 
     35import org.nuxeo.runtime.api.Framework; 
    3336 
    3437/** 
     
    3942 */ 
    4043public 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"; 
    4154 
    4255    static Map<String, String> mapOfDateLength = new HashMap<String, String>() { 
     
    7689            throws ClientException { 
    7790        FacesContext context = FacesContext.getCurrentInstance(); 
    78         NuxeoPrincipal principal = (NuxeoPrincipal) context 
    79                 .getExternalContext().getUserPrincipal(); 
     91        NuxeoPrincipal principal = (NuxeoPrincipal) context.getExternalContext().getUserPrincipal(); 
    8092        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        } 
    81163    } 
    82164 
     
    89171        Locale locale = context.getViewRoot().getLocale(); 
    90172 
    91         DateFormat aDateFormat = DateFormat.getDateInstance(Integer 
    92                 .parseInt(mapOfDateLength.get(formatLength.toLowerCase())), 
     173        DateFormat aDateFormat = DateFormat.getDateInstance( 
     174                Integer.parseInt(mapOfDateLength.get(formatLength.toLowerCase())), 
    93175                locale); 
    94176 
     
    114196        Locale locale = context.getViewRoot().getLocale(); 
    115197 
    116         DateFormat aDateFormat = DateFormat.getDateTimeInstance(Integer 
    117                 .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); 
    120202 
    121203        // 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  
    4747    </function-signature> 
    4848  </function> 
    49    
    50    
    51   <function> 
     49 
     50 
     51  <function> 
    5252    <function-name>dateFormater</function-name> 
    5353    <function-class> 
     
    5858    </function-signature> 
    5959  </function> 
    60    
    61     <function> 
     60 
     61  <function> 
    6262    <function-name>basicDateFormater</function-name> 
    6363    <function-class> 
     
    6868    </function-signature> 
    6969  </function> 
    70    
    71   <function> 
     70 
     71  <function> 
    7272    <function-name>dateAndTimeFormater</function-name> 
    7373    <function-class> 
     
    7878    </function-signature> 
    7979  </function> 
    80    
    81   <function> 
     80 
     81  <function> 
    8282    <function-name>basicDateAndTimeFormater</function-name> 
    8383    <function-class> 
     
    8888    </function-signature> 
    8989  </function> 
    90    
    91    
     90 
     91 
    9292  <function> 
    9393    <function-name>userIsMemberOf</function-name> 
     
    9999    </function-signature> 
    100100  </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> 
    101110  <!-- XXX AT: should be in nxdirectory taglib, not util --> 
    102111  <function> 
     
    105114      org.nuxeo.ecm.platform.ui.web.directory.DirectoryFunctions 
    106115    </function-class> 
    107     <function-signature>List getCSLData(java.lang.String)</function-signature> 
     116    <function-signature> 
     117      List getCSLData(java.lang.String) 
     118    </function-signature> 
    108119  </function> 
    109120  <!-- XXX AT: should be in nxdirectory taglib, not util --> 
     
    113124      org.nuxeo.ecm.platform.ui.web.directory.DirectoryFunctions 
    114125    </function-class> 
    115     <function-signature>int getListSize(java.lang.String)</function-signature> 
     126    <function-signature> 
     127      int getListSize(java.lang.String) 
     128    </function-signature> 
    116129  </function> 
    117130  <tag> 
     
    212225    <tag-name>inputCalendar</tag-name> 
    213226    <component> 
    214       <component-type>org.apache.myfaces.HtmlInputCalendar</component-type> 
     227      <component-type> 
     228        org.apache.myfaces.HtmlInputCalendar 
     229      </component-type> 
    215230    </component> 
    216231  </tag> 
     
    224239    <tag-name>graphicImage</tag-name> 
    225240    <component> 
    226       <component-type>org.apache.myfaces.HtmlGraphicImage</component-type> 
     241      <component-type> 
     242        org.apache.myfaces.HtmlGraphicImage 
     243      </component-type> 
    227244    </component> 
    228245  </tag> 
     
    249266    <tag-name>inputFileUpload</tag-name> 
    250267    <component> 
    251       <component-type>org.apache.myfaces.trinidad.CoreInputFile</component-type> 
     268      <component-type> 
     269        org.apache.myfaces.trinidad.CoreInputFile 
     270      </component-type> 
    252271      <handler-class> 
    253272        org.apache.myfaces.trinidadinternal.facelets.TrinidadComponentHandler 
     
    258277    <tag-name>selectOneRadio</tag-name> 
    259278    <component> 
    260       <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type> 
     279      <component-type> 
     280        org.apache.myfaces.HtmlSelectOneRadio 
     281      </component-type> 
    261282      <renderer-type>org.apache.myfaces.Radio</renderer-type> 
    262283    </component> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.tld

    r28216 r28558  
    3636      <li> join(String[], String): performs a join on given array using given separator. 
    3737      </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. 
    3941      </li> 
    4042    </ul> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_table.xhtml

    r27443 r28558  
    129129          </h:panelGroup> 
    130130        </f:facet> 
    131         <h:outputText value="#{row.data.dublincore.creator}" /> 
     131        <h:outputText value="#{nxu:userFullName(row.data.dublincore.creator)}" /> 
    132132      </h:column> 
    133133 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_table_simple.xhtml

    r26729 r28558  
    9999        </h:panelGroup> 
    100100        </f:facet> 
    101         <h:outputText value="#{doc.dublincore.creator}" /> 
     101        <h:outputText value="#{nxu:userFullName(doc.dublincore.creator)}" /> 
    102102      </h:column> 
    103103    </nxu:dataTable> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/documents_tables_with_popup.xhtml

    r26729 r28558  
    3939          value="#{nxd:iconPath(row.data)}" alt="#{row.data.type}"> 
    4040            <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                /> 
    4747       </nxu:graphicImage></div> 
    4848        <script type="text/javascript"> 
     
    7575          <h:outputText value="#{messages['label.content.header.author']}" /> 
    7676        </f:facet> 
    77         <h:outputText value="#{row.data.dublincore.contributors[0]}" /> 
     77        <h:outputText value="#{nxu:userFullName(row.data.dublincore.creator)}" /> 
    7878      </h:column> 
    7979      <!--  Life cycle --> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/select_users_selection.xhtml

    r23522 r28558  
    3030          <h:outputText value="#{messages['label.username']}" /> 
    3131        </f:facet> 
    32         <h:outputText value="#{user}" /> 
     32        <h:outputText value="#{nxu:userFullName(user)}" /> 
    3333      </h:column> 
    3434      <h:column> 
     
    3939          value="#{messages['label.security.delUsername']}" 
    4040          action="#{principalListManager.removeFromSelectedUsers(user)}" 
    41           reRender="selectedUsersAndGroups"  
     41          reRender="selectedUsersAndGroups" 
    4242          rendered="#{empty searchLocation}" /> 
    4343        <a4j:commandLink 
    4444          value="#{messages['label.security.removeFromGroup']}" 
    4545          action="#{principalListManager.removeFromSelectedUsers(user)}" 
    46           reRender="selectedUsersAndGroups"  
     46          reRender="selectedUsersAndGroups" 
    4747          rendered="#{searchLocation == 'USER_MANAGEMENT'}" /> 
    4848      </h:column> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/tabs/document_rights.xhtml

    r21972 r28558  
    3838      </f:facet> 
    3939 
    40       <h:commandLink value="#{user}" immediate="true" 
     40      <h:commandLink value="#{nxu:userFullName(user)}" immediate="true" 
    4141                action="#{userManagerActions.viewUser(user)}"  rendered="#{principalType=='USER_TYPE'}"> 
    4242      </h:commandLink> 
     
    129129        <!--  Username --> 
    130130        <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" 
    132132                action="#{userManagerActions.viewUser(securityActions.dataTableModel.currentCellDisplayedValue)}"  rendered="#{securityActions.dataTableModel.currentUserType=='USER_TYPE'}"> 
    133133          </h:commandLink> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp/src/main/resources/nuxeo.war/widgets/contributors_widget.xhtml

    r28246 r28558  
    33  xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" 
    44  xmlns:t="http://myfaces.apache.org/tomahawk" 
     5  xmlns:nxu="http://nuxeo.org/nxweb/util" 
    56  xmlns:nxdir="http://nuxeo.org/nxdirectory" 
    67  id="#{widget.id}"> 
     
    910    layout="simple" styleClass="standardList"> 
    1011    <h:graphicImage value="/icons/html.png" /> 
    11     <h:commandLink value="#{listItem}" immediate="true" 
     12    <h:commandLink value="#{nxu:userFullName(listItem)}" immediate="true" 
    1213      action="#{userManagerActions.viewUser}" 
    1314      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  
    11<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"> 
    1213 
    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> 
    1620 
    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}"> 
    2125 
    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> 
    3338 
    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> 
    4147 
    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> 
    4856 
    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> 
    5565 
    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> 
    6476 
    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> 
    7387 
    7488 
    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:commandLink 
    82                                                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> 
    90104 
    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:commandLink 
    98                                                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> 
    103117 
    104                        </h:column> 
     118          </h:column> 
    105119 
    106                        <h:column> 
    107                                <f:facet name="header"> 
    108                                        <h:outputText value="" /> 
    109                                </f:facet> 
    110                                <nxu:methodResult 
    111                                        value="#{documentTaskActions.canRejectWorkItem(workflowTaskInstance)}" 
    112                                        name="canRejectWorkItem"> 
    113                                        <nxh:commandLink 
    114                                                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> 
    122136 
    123                </h:dataTable> 
     137        </h:dataTable> 
    124138 
    125                <br /> 
     139        <br /> 
    126140 
    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> 
    131148 
    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