]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/headquarter/admin_headquarter_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / headquarter / admin_headquarter_list.xhtml
index 089a71f1b1127cfb934c8cbd3df4e78db83bae3f..c19e0f27cc5a37fff97d2aa67cb63effce9f5b40 100644 (file)
@@ -2,7 +2,6 @@
 <ui:composition
        template="/WEB-INF/templates/admin/admin_base.tpl"
        xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:links="http://mxchange.org/jsf/core/links"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('headquarterList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('departmentList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>
@@ -75,7 +83,7 @@
 
                                <p:ajax
                                        event="rowSelect"
-                                       update=":master:form-list-headquarters:headquarter-details"
+                                       update="form-list-headquarters:headquarter-details"
                                        oncomplete="PF('headquarterDialog').show()"
                                        />
 
                                                        <f:converter converterId="UserConverter" />
 
                                                        <f:selectItems
-                                                               value="#{userController.allUsers()}"
+                                                               value="#{userListController.allUsers}"
                                                                var="user"
                                                                itemValue="#{user}"
                                                                itemLabel="#{beanHelper.renderUser(user)}"
                                                        updateLabel="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
-                                                       <f:converter converterId="EmployeeConverter" />
+                                                       <f:converter converterId="ContactConverter" />
 
                                                        <f:selectItems
-                                                               value="#{employeeController.allEmployees()}"
-                                                               var="employee"
-                                                               itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               value="#{contactListController.allContacts}"
+                                                               var="contact"
+                                                               itemValue="#{contact}"
+                                                               itemLabel="#{beanHelper.renderContact(contact)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
-                                               outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(headquarter.headquarterContactEmployee)}"
+                                               outcome="admin_show_contact"
+                                               value="#{beanHelper.renderContact(headquarter.headquarterContactEmployee)}"
                                                title="#{msg.ADMIN_LINK_SHOW_HEADQUARTER_CONTACT_PERSON_TITLE}"
                                                rendered="#{not empty headquarter.headquarterContactEmployee}"
                                                >
-                                               <f:param name="employeeId" value="#{headquarter.headquarterContactEmployee.employeeId}" />
+                                               <f:param name="contactId" value="#{headquarter.headquarterContactEmployee.contactId}" />
                                        </p:link>
 
                                        <p:link
-                                               outcome="admin_assign_headquarter_employee"
+                                               outcome="admin_assign_headquarter_contact"
                                                value="#{msg.ADMIN_LINK_ASSIGN}"
                                                title="#{msg.ADMIN_LINK_ASSIGN_HEADQUARTER_CONTACT_PERSON_TITLE}"
                                                rendered="#{empty headquarter.headquarterContactEmployee}"
 
                                <p:column
                                        headerText="#{msg.ENTRY_CREATED_HEADER}"
-                                       sortBy="#{headquarter.headquarterCreated}"
+                                       sortBy="#{headquarter.headquarterEntryCreated}"
+                                       filterable="false"
+                                       >
+                                       <h:outputText value="#{headquarter.headquarterEntryCreated}">
+                                               <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+                                       </h:outputText>
+                               </p:column>
+
+                               <p:column
+                                       headerText="#{msg.ENTRY_UPDATED_HEADER}"
+                                       sortBy="#{headquarter.headquarterEntryUpdated}"
                                        filterable="false"
                                        >
-                                       <h:outputText id="headquarterCreated" value="#{headquarter.headquarterCreated}">
+                                       <h:outputText value="#{headquarter.headquarterEntryUpdated}">
                                                <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
                                        sortable="false"
                                        filterable="false"
                                        >
-                                       <links:outputHeadquarterAdminDropdownMenu headquarter="#{headquarter}" />
+                                       <p:menuButton value="#{msg.OPTIONS}">
+                                               <p:menuitem
+                                                       outcome="admin_show_headquarter"
+                                                       value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+                                                       title="#{msg.ADMIN_LINK_SHOW_HEADQUARTER_TITLE}"
+                                                       >
+                                                       <f:param name="headquarterId" value="#{headquarter.headquarterId}" />
+                                               </p:menuitem>
+
+                                               <p:menuitem
+                                                       outcome="admin_edit_headquarter"
+                                                       value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+                                                       title="#{msg.ADMIN_LINK_EDIT_HEADQUARTER_TITLE}"
+                                                       >
+                                                       <f:param name="headquarterId" value="#{headquarter.headquarterId}" />
+                                               </p:menuitem>
+
+                                               <p:menuitem outcome="admin_delete_headquarter">
+                                                       <h:outputText
+                                                               styleClass="link-danger"
+                                                               value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+                                                               title="#{msg.ADMIN_LINK_DELETE_HEADQUARTER_TITLE}"
+                                                               />
+                                                       <f:param name="headquarterId" value="#{headquarter.headquarterId}" />
+                                               </p:menuitem>
+                                       </p:menuButton>
                                </p:column>
                        </p:dataTable>
 
                                                <p:commandButton
                                                        type="submit"
                                                        value="#{msg.BUTTON_ADMIN_ADD_HEADQUARTER}"
-                                                       action="#{adminHeadquarterController.addHeadquarter()}"
-                                                       update=":master:form-list-headquarters:headquarterList"
+                                                       action="#{adminHeadquarterActionController.addHeadquarter()}"
+                                                       update="form-list-headquarters:headquarterList"
                                                        />
                                        </p:panelGrid>
                                </f:facet>
                                <p:dataTable
                                        id="headquarterOpeningTimeList"
                                        var="openingTime"
-                                       value="#{adminHeadquarterController.headquarterOpeningTimes}"
+                                       value="#{adminHeadquarterActionController.headquarterOpeningTimes}"
                                        rows="10"
                                        reflow="true"
                                        summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_HEADQUARTER_OPENING_TIMES}"
                                                <p:commandButton
                                                        type="submit"
                                                        value="#{msg.BUTTON_ADMIN_ADD_HEADQUARTER_OPENING_TIME}"
-                                                       action="#{adminHeadquarterController.addOpeningTime()}"
-                                                       update=":master:form-list-headquarter-opening-time:headquarterOpeningTimeList"
+                                                       action="#{adminHeadquarterActionController.addOpeningTime()}"
+                                                       update="form-list-headquarter-opening-time:headquarterOpeningTimeList"
                                                        />
                                        </p:panelGrid>
                                </f:facet>