]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/mobile_provider/admin_mobile_provider_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / mobile_provider / admin_mobile_provider_list.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition
3         template="/WEB-INF/templates/admin/admin_base.tpl"
4         xmlns="http://www.w3.org/1999/xhtml"
5         xmlns:links="http://mxchange.org/jsf/core/links"
6         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
7         xmlns:h="http://xmlns.jcp.org/jsf/html"
8         xmlns:f="http://xmlns.jcp.org/jsf/core"
9         xmlns:p="http://primefaces.org/ui"
10         >
11
12         <ui:define name="document_admin_title">
13                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST}" />
14         </ui:define>
15
16         <ui:define name="content_header">
17                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_LIST}" />
18         </ui:define>
19
20         <ui:define name="content">
21                 <h:form id="form-list-mobile-providers">
22                         <p:dataTable
23                                 id="mobileProviderList"
24                                 var="mobileProvider"
25                                 value="#{mobileProviderListController.allMobileProviders}"
26                                 paginator="true"
27                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28                                 filteredValue="#{mobileProviderListController.filteredMobileProviders}"
29                                 rows="10"
30                                 rowKey="#{mobileProvider.providerId}"
31                                 reflow="true"
32                                 resizableColumns="true"
33                                 rowsPerPageTemplate="5,10,20,50,100"
34                                 sortMode="multiple"
35                                 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}"
36                                 emptyMessage="#{msg.ADMIN_EMPTY_LIST_MOBILE_PROVIDERS}"
37                                 widgetVar="mobileProviderList"
38                                 selectionMode="single"
39                                 selection="#{mobileProviderListController.selectedMobileProvider}"
40                                 skipChildren="true"
41                                 >
42
43                                 <f:facet name="header">
44                                         <p:panelGrid
45                                                 columns="3"
46                                                 layout="grid"
47                                                 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
48                                                 >
49                                                 <p:spacer />
50
51                                                 <p:panelGrid
52                                                         columns="2"
53                                                         columnClasses="ui-grid-4,ui-grid-8"
54                                                         layout="grid"
55                                                         styleClass="ui-noborder"
56                                                         >
57                                                         <p:outputLabel
58                                                                 for="globalFilter"
59                                                                 value="#{msg.SEARCH_ALL_FIELDS}"
60                                                                 style="float: right"
61                                                                 />
62
63                                                         <p:inputText
64                                                                 id="globalFilter"
65                                                                 onkeyup="PF('mobileProviderList').filter()"
66                                                                 placeholder="#{msg.ENTER_KEYWORD}"
67                                                                 />
68                                                 </p:panelGrid>
69
70                                                 <p:outputPanel>
71                                                         <p:spacer height="4" />
72
73                                                         <p:commandButton
74                                                                 id="toggler"
75                                                                 type="button"
76                                                                 value="#{msg.SELECT_SHOWN_COLUMNS}"
77                                                                 styleClass="column-selector"
78                                                                 />
79
80                                                         <p:columnToggler datasource="mobileProviderList" trigger="toggler" />
81                                                 </p:outputPanel>
82                                         </p:panelGrid>
83                                 </f:facet>
84
85                                 <p:ajax
86                                         event="rowSelect"
87                                         update="form-list-mobile-providers:mobile-provider-details"
88                                         oncomplete="PF('mobileProviderDialog').show()"
89                                         />
90
91                                 <p:column
92                                         headerText="#{msg.ID_HEADER}"
93                                         sortBy="#{mobileProvider.providerId}"
94                                         filterBy="#{mobileProvider.providerId}"
95                                         >
96                                         <p:link
97                                                 outcome="admin_show_mobile_provider"
98                                                 value="#{mobileProvider.providerId}"
99                                                 title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}"
100                                                 >
101                                                 <f:param name="providerId" value="#{mobileProvider.providerId}" />
102                                         </p:link>
103                                 </p:column>
104
105                                 <p:column
106                                         headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}"
107                                         sortBy="#{mobileProvider.providerName}"
108                                         filterBy="#{mobileProvider.providerName}"
109                                         filterMatchMode="contains"
110                                         >
111                                         <h:outputText value="#{mobileProvider.providerName}" />
112                                 </p:column>
113
114                                 <p:column
115                                         headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}"
116                                         sortBy="#{mobileProvider.providerDialPrefix}"
117                                         filterBy="#{mobileProvider.providerDialPrefix}"
118                                         filterMatchMode="contains"
119                                         >
120                                         <h:outputText value="#{mobileProvider.providerDialPrefix}" />
121                                 </p:column>
122
123                                 <p:column
124                                         headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}"
125                                         sortBy="#{mobileProvider.providerCountry.countryPhoneCode}"
126                                         filterBy="#{mobileProvider.providerCountry}"
127                                         filterMatchMode="in"
128                                         >
129                                         <f:facet name="filter">
130                                                 <p:selectCheckboxMenu
131                                                         filter="true"
132                                                         filterMatchMode="contains"
133                                                         label="#{msg.LABEL_COUNTRIES}"
134                                                         onchange="PF('mobileProviderList').filter()"
135                                                         updateLabel="true"
136                                                         title="#{msg.FILTER_BY_MULTIPLE_COUNTRY_TITLE}"
137                                                         >
138                                                         <f:converter converterId="CountryConverter" />
139                                                         <f:selectItems
140                                                                 value="#{countryListController.allCountries}"
141                                                                 var="country"
142                                                                 itemValue="#{country}"
143                                                                 itemLabel="#{msg[country.countryI18nKey]}"
144                                                                 />
145                                                 </p:selectCheckboxMenu>
146                                         </f:facet>
147
148                                         <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" />
149                                 </p:column>
150
151                                 <p:column
152                                         headerText="#{msg.ENTRY_CREATED_HEADER}"
153                                         sortBy="#{mobileProvider.providerEntryCreated}"
154                                         >
155                                         <h:outputText value="#{mobileProvider.providerEntryCreated}">
156                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
157                                         </h:outputText>
158                                 </p:column>
159
160                                 <p:column
161                                         headerText="#{msg.ENTRY_UPDATED_HEADER}"
162                                         sortBy="#{mobileProvider.providerEntryUpdated}"
163                                         >
164                                         <h:outputText value="#{mobileProvider.providerEntryUpdated}">
165                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
166                                         </h:outputText>
167                                 </p:column>
168
169                                 <p:column
170                                         headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
171                                         sortable="false"
172                                         >
173                                         <p:menuButton value="#{msg.OPTIONS}">
174                                                 <p:menuitem
175                                                         outcome="admin_show_mobile_provider"
176                                                         value="#{msg.ADMIN_LINK_SHOW_SHORT}"
177                                                         title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}"
178                                                         >
179                                                         <f:param name="providerId" value="#{mobileProvider.providerId}" />
180                                                 </p:menuitem>
181
182                                                 <p:menuitem
183                                                         outcome="admin_edit_mobile_provider"
184                                                         value="#{msg.ADMIN_LINK_EDIT_SHORT}"
185                                                         title="#{msg.ADMIN_LINK_EDIT_MOBILE_PROVIDER_TITLE}"
186                                                         >
187                                                         <f:param name="providerId" value="#{mobileProvider.providerId}" />
188                                                 </p:menuitem>
189
190                                                 <p:menuitem outcome="admin_delete_mobile_provider">
191                                                         <h:outputText
192                                                                 styleClass="link-danger"
193                                                                 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
194                                                                 title="#{msg.ADMIN_LINK_DELETE_MOBILE_PROVIDER_TITLE}"
195                                                                 />
196                                                         <f:param name="providerId" value="#{mobileProvider.providerId}" />
197                                                 </p:menuitem>
198                                         </p:menuButton>
199                                 </p:column>
200                         </p:dataTable>
201
202                         <p:dialog
203                                 dynamic="true"
204                                 modal="true"
205                                 resizable="false"
206                                 header="#{msg.ADMIN_SINGLE_MOBILE_PROVIDER_DETAILS_HEADER}"
207                                 hideEffect="fade"
208                                 showEffect="fade"
209                                 widgetVar="mobileProviderDialog"
210                                 position="top"
211                                 responsive="true"
212                                 closeOnEscape="true"
213                                 >
214                                 <p:outputPanel id="mobile-provider-details">
215                                         <p:panelGrid columns="2" rendered="#{not empty mobileProviderListController.selectedMobileProvider}">
216                                                 <f:facet name="header">
217                                                         <h:outputFormat value="#{msg.ADMIN_MOBILE_PROVIDER_DETAILS_HEADER}">
218                                                                 <f:param value="#{mobileProviderListController.selectedMobileProvider.providerName}" />
219                                                                 <f:param value="#{mobileProviderListController.selectedMobileProvider.providerId}" />
220                                                         </h:outputFormat>
221                                                 </f:facet>
222
223                                                 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.MOBILE_PROVIDER_ID_NUMBER_TITLE}" />
224                                                 <h:outputText value="#{mobileProviderListController.selectedMobileProvider.providerId}" />
225                                         </p:panelGrid>
226                                 </p:outputPanel>
227                         </p:dialog>
228                 </h:form>
229
230                 <h:form>
231                         <h:panelGroup layout="block">
232                                 <div class="table-header">
233                                         <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}" />
234                                 </div>
235
236                                 <ui:include src="/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl" />
237
238                                 <p:panelGrid columns="2" layout="grid">
239                                         <p:commandButton
240                                                 type="reset"
241                                                 value="#{msg.BUTTON_RESET_FORM}"
242                                                 />
243
244                                         <p:commandButton
245                                                 type="submit"
246                                                 value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}"
247                                                 action="#{adminMobileProviderController.addMobileProvider()}"
248                                                 update="form-list-mobile-providers:mobileProviderList"
249                                                 />
250                                 </p:panelGrid>
251                         </h:panelGroup>
252
253                         <h:panelGroup styleClass="para notice" layout="block">
254                                 <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_NOTICES}" />
255                                 <ul>
256                                         <li><h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_PATTERN}" /></li>
257                                 </ul>
258                         </h:panelGroup>
259                 </h:form>
260         </ui:define>
261 </ui:composition>