]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/country/admin_country_list.xhtml
Updated copyright year
[jjobs-war.git] / web / admin / country / admin_country_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:ui="http://xmlns.jcp.org/jsf/facelets"
6         xmlns:h="http://xmlns.jcp.org/jsf/html"
7         xmlns:f="http://xmlns.jcp.org/jsf/core"
8         xmlns:p="http://primefaces.org/ui"
9         >
10
11         <ui:define name="document_admin_title">
12                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_COUNTRY}" />
13         </ui:define>
14
15         <ui:define name="content_header">
16                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_COUNTRY}" />
17         </ui:define>
18
19         <ui:define name="content">
20                 <h:form id="form-list-countries">
21                         <p:dataTable
22                                 id="countryList"
23                                 var="country"
24                                 value="#{countryListController.allCountries}"
25                                 paginator="true"
26                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
27                                 filteredValue="#{countryListController.filteredCountries}"
28                                 rows="10"
29                                 rowKey="#{country.countryId}"
30                                 reflow="true"
31                                 resizableColumns="true"
32                                 rowsPerPageTemplate="5,10,20,50,100"
33                                 sortMode="multiple"
34                                 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_COUNTRY}"
35                                 emptyMessage="#{msg.ADMIN_EMPTY_LIST_COUNTRY}"
36                                 widgetVar="countryList"
37                                 selectionMode="single"
38                                 selection="#{countryListController.selectedCountry}"
39                                 skipChildren="true"
40                                 >
41
42                                 <f:facet name="header">
43                                         <p:panelGrid
44                                                 columns="3"
45                                                 layout="grid"
46                                                 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
47                                                 >
48                                                 <p:spacer />
49
50                                                 <p:panelGrid
51                                                         columns="2"
52                                                         columnClasses="ui-grid-4,ui-grid-8"
53                                                         layout="grid"
54                                                         styleClass="ui-noborder"
55                                                         >
56                                                         <p:outputLabel
57                                                                 for="globalFilter"
58                                                                 value="#{msg.SEARCH_ALL_FIELDS}"
59                                                                 style="float: right"
60                                                                 />
61
62                                                         <p:inputText
63                                                                 id="globalFilter"
64                                                                 onkeyup="PF('countryList').filter()"
65                                                                 placeholder="#{msg.ENTER_KEYWORD}"
66                                                                 />
67                                                 </p:panelGrid>
68
69                                                 <p:outputPanel>
70                                                         <p:spacer height="4" />
71
72                                                         <p:commandButton
73                                                                 id="toggler"
74                                                                 type="button"
75                                                                 value="#{msg.SELECT_SHOWN_COLUMNS}"
76                                                                 styleClass="column-selector"
77                                                                 />
78
79                                                         <p:columnToggler datasource="countryList" trigger="toggler" />
80                                                 </p:outputPanel>
81                                         </p:panelGrid>
82                                 </f:facet>
83
84                                 <p:ajax
85                                         event="rowSelect"
86                                         update="form-list-countries:country-details"
87                                         oncomplete="PF('countryDialog').show()"
88                                         />
89
90                                 <p:column
91                                         headerText="#{msg.ID_HEADER}"
92                                         sortBy="#{country.countryId}"
93                                         filterable="false"
94                                         >
95                                         <p:link
96                                                 outcome="admin_show_country"
97                                                 value="#{country.countryId}"
98                                                 title="#{msg.ADMIN_LINK_SHOW_COUNTRY_TITLE}"
99                                                 >
100                                                 <f:param name="countryId" value="#{country.countryId}" />
101                                         </p:link>
102                                 </p:column>
103
104                                 <p:column
105                                         headerText="#{msg.DATA_COUNTRY_CODE}"
106                                         sortBy="#{country.countryCode}"
107                                         filterBy="#{country.countryCode}"
108                                         filterMatchMode="contains"
109                                         >
110
111                                         <h:outputText value="#{country.countryCode}" />
112                                 </p:column>
113
114                                 <p:column
115                                         headerText="#{msg.DATA_COUNTRY_NAME}"
116                                         sortBy="#{msg[country.countryI18nKey]}"
117                                         filterBy="#{msg[country.countryI18nKey]}"
118                                         filterMatchMode="contains"
119                                         >
120
121                                         <h:outputText value="#{msg[country.countryI18nKey]}" />
122                                 </p:column>
123
124                                 <p:column
125                                         headerText="#{msg.DATA_COUNTRY_EXTERNAL_DIAL_PREFIX}"
126                                         sortBy="#{country.countryExternalDialPrefix}"
127                                         filterBy="#{country.countryExternalDialPrefix}"
128                                         filterMatchMode="contains"
129                                         >
130
131                                         <h:outputText value="#{country.countryExternalDialPrefix}" />
132                                 </p:column>
133
134                                 <p:column
135                                         headerText="#{msg.DATA_COUNTRY_ABROAD_DIAL_PREFIX}"
136                                         sortBy="#{country.countryAbroadDialPrefix}"
137                                         filterBy="#{country.countryAbroadDialPrefix}"
138                                         filterMatchMode="contains"
139                                         >
140
141                                         <h:outputText value="#{country.countryAbroadDialPrefix}" />
142                                 </p:column>
143
144                                 <p:column
145                                         headerText="#{msg.DATA_IS_REQUIRED}"
146                                         sortBy="#{country.countryIsLocalPrefixRequired}"
147                                         filterBy="#{country.countryIsLocalPrefixRequired}"
148                                         filterMatchMode="contains"
149                                         >
150
151                                         <h:outputText value="#{country.countryIsLocalPrefixRequired ? msg.CHOICE_YES : msg.CHOICE_NO}" />
152                                 </p:column>
153
154                                 <p:column
155                                         headerText="#{msg.DATA_COUNTRY_PHONE_CODE}"
156                                         sortBy="#{country.countryPhoneCode}"
157                                         filterBy="#{country.countryPhoneCode}"
158                                         filterMatchMode="contains"
159                                         >
160
161                                         <h:outputText value="#{country.countryPhoneCode}" />
162                                 </p:column>
163
164                                 <p:column
165                                         headerText="#{msg.ENTRY_CREATED_HEADER}"
166                                         sortBy="#{country.countryEntryCreated}"
167                                         filterBy="#{country.countryEntryCreated}"
168                                         filterMatchMode="contains"
169                                         >
170
171                                         <h:outputText value="#{country.countryEntryCreated}">
172                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
173                                         </h:outputText>
174                                 </p:column>
175
176                                 <p:column
177                                         headerText="#{msg.ENTRY_UPDATED_HEADER}"
178                                         sortBy="#{country.countryEntryUpdated}"
179                                         filterBy="#{country.countryEntryUpdated}"
180                                         filterMatchMode="contains"
181                                         >
182
183                                         <h:outputText value="#{country.countryEntryUpdated}">
184                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
185                                         </h:outputText>
186                                 </p:column>
187
188                                 <p:column
189                                         headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
190                                         filterable="false"
191                                         sortable="false"
192                                         >
193                                         <p:menuButton value="#{msg.OPTIONS}">
194                                                 <p:menuitem
195                                                         outcome="admin_show_country"
196                                                         value="#{msg.ADMIN_LINK_SHOW_SHORT}"
197                                                         title="#{msg.ADMIN_LINK_SHOW_COUNTRY_TITLE}"
198                                                         >
199                                                         <f:param name="countryId" value="#{country.countryId}" />
200                                                 </p:menuitem>
201
202                                                 <p:menuitem
203                                                         outcome="admin_edit_country"
204                                                         value="#{msg.ADMIN_LINK_EDIT_SHORT}"
205                                                         title="#{msg.ADMIN_LINK_EDIT_COUNTRY_TITLE}"
206                                                         >
207                                                         <f:param name="countryId" value="#{country.countryId}" />
208                                                 </p:menuitem>
209
210                                                 <p:menuitem outcome="admin_delete_country">
211                                                         <h:outputText
212                                                                 styleClass="link-danger"
213                                                                 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
214                                                                 title="#{msg.ADMIN_LINK_DELETE_COUNTRY_TITLE}"
215                                                                 />
216                                                         <f:param name="countryId" value="#{country.countryId}" />
217                                                 </p:menuitem>
218                                         </p:menuButton>
219                                 </p:column>
220                         </p:dataTable>
221
222                         <p:dialog
223                                 dynamic="true"
224                                 modal="true"
225                                 resizable="false"
226                                 header="#{msg.ADMIN_SINGLE_COUNTRY_DETAILS_HEADER}"
227                                 hideEffect="fade"
228                                 showEffect="fade"
229                                 widgetVar="countryDialog"
230                                 position="top"
231                                 responsive="true"
232                                 closeOnEscape="true"
233                                 >
234                                 <p:outputPanel id="country-details">
235                                         <p:panelGrid columns="2" rendered="#{not empty countryListController.selectedCountry}">
236                                                 <f:facet name="header">
237                                                         <h:outputFormat value="#{msg.ADMIN_COUNTRY_DETAILS_HEADER}">
238                                                                 <f:param value="#{msg[countryListController.selectedCountry.countryI18nKey]}" />
239                                                                 <f:param value="#{countryListController.selectedCountry.countryId}" />
240                                                         </h:outputFormat>
241                                                 </f:facet>
242
243                                                 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.COUNTRY_ID_NUMBER_TITLE}" />
244                                                 <h:outputText value="#{countryListController.selectedCountry.countryId}" />
245                                         </p:panelGrid>
246                                 </p:outputPanel>
247                         </p:dialog>
248                 </h:form>
249
250                 <h:form>
251                         <h:panelGroup layout="block">
252                                 <div class="table-header">
253                                         <h:outputText value="#{msg.ADMIN_ADD_COUNTRY_TITLE}" />
254                                 </div>
255
256                                 <ui:include src="/WEB-INF/templates/admin/country/admin_form_country_data.tpl" />
257
258                                 <p:panelGrid columns="2" layout="grid">
259                                         <p:commandButton
260                                                 type="reset"
261                                                 value="#{msg.BUTTON_RESET_FORM}"
262                                                 />
263
264                                         <p:commandButton
265                                                 type="submit"
266                                                 value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}"
267                                                 action="#{adminCountryController.addCountry()}"
268                                                 update="form-list-countries:countryList"
269                                                 />
270                                 </p:panelGrid>
271                         </h:panelGroup>
272
273                         <div class="para notice">
274                                 <h:outputText value="#{msg.ADMIN_ADD_COUNTRY_NOTICES}" />
275                                 <ul>
276                                         <li><h:outputText value="#{msg.ADMIN_ADD_COUNTRY_I18N_KEY_NOTICE}" /></li>
277                                 </ul>
278                         </div>
279                 </h:form>
280         </ui:define>
281 </ui:composition>