]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/jobs/skill/admin_skill_list.xhtml
Continued:
[jjobs-war.git] / web / admin / jobs / skill / admin_skill_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         xmlns:core="http://mxchange.org/jsf/core/widgets"
10         xmlns:validator="http://mxchange.org/jsf/core/validators"
11         >
12
13         <ui:define name="document_admin_title">
14                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_SKILLS}" />
15         </ui:define>
16
17         <ui:define name="content_header">
18                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_SKILLS}" />
19         </ui:define>
20
21         <ui:define name="content">
22                 <h:form id="form-list-skill">
23                         <p:dataTable
24                                 id="skillList"
25                                 var="skill"
26                                 value="#{skillListController.allSkills}"
27                                 paginator="true"
28                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
29                                 filteredValue="#{skillListController.filteredSkills}"
30                                 rows="10"
31                                 rowKey="#{skill.skillId}"
32                                 reflow="true"
33                                 resizableColumns="true"
34                                 rowsPerPageTemplate="5,10,20,50,100"
35                                 sortMode="multiple"
36                                 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_SKILLS}"
37                                 emptyMessage="#{msg.ADMIN_EMPTY_LIST_SKILLS}"
38                                 widgetVar="skillList"
39                                 selectionMode="single"
40                                 selection="#{skillListController.selectedSkill}"
41                                 skipChildren="true"
42                                 >
43
44                                 <f:facet name="header">
45                                         <p:panelGrid
46                                                 columns="3"
47                                                 layout="grid"
48                                                 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
49                                                 >
50                                                 <p:spacer />
51
52                                                 <p:panelGrid
53                                                         columns="2"
54                                                         columnClasses="ui-grid-4,ui-grid-8"
55                                                         layout="grid"
56                                                         styleClass="ui-noborder"
57                                                         >
58                                                         <p:outputLabel
59                                                                 for="globalFilter"
60                                                                 value="#{msg.SEARCH_ALL_FIELDS}"
61                                                                 style="float: right"
62                                                                 />
63
64                                                         <p:inputText
65                                                                 id="globalFilter"
66                                                                 onkeyup="PF('skillList').filter()"
67                                                                 placeholder="#{msg.ENTER_KEYWORD}"
68                                                                 />
69                                                 </p:panelGrid>
70
71                                                 <p:outputPanel>
72                                                         <p:spacer height="4" />
73
74                                                         <p:commandButton
75                                                                 id="toggler"
76                                                                 type="button"
77                                                                 value="#{msg.SELECT_SHOWN_COLUMNS}"
78                                                                 styleClass="column-selector"
79                                                                 />
80
81                                                         <p:columnToggler datasource="skillList" trigger="toggler" />
82                                                 </p:outputPanel>
83                                         </p:panelGrid>
84                                 </f:facet>
85
86                                 <p:ajax
87                                         event="rowSelect"
88                                         update="form-list-skill:skill-details"
89                                         oncomplete="PF('skillDialog').show()"
90                                         />
91
92                                 <p:column
93                                         headerText="#{msg.ID_HEADER}"
94                                         sortBy="#{skill.skillId}"
95                                         filterable="false"
96                                         >
97                                         <p:link
98                                                 outcome="admin_show_basic_data"
99                                                 value="#{skill.skillId}"
100                                                 title="#{msg.ADMIN_LINK_SHOW_SKILL_TITLE}"
101                                                 >
102                                                 <f:param name="skillId" value="#{skill.skillId}" />
103                                         </p:link>
104                                 </p:column>
105
106                                 <p:column
107                                         headerText="#{msg.ADMIN_SKILL_NAME_HEADER}"
108                                         sortBy="#{skill.skillName}"
109                                         filterBy="#{skill.skillName}"
110                                         filterMatchMode="contains"
111                                         >
112                                         <h:outputText value="#{skill.skillName}"/>
113                                 </p:column>
114
115                                 <p:column
116                                         headerText="#{msg.ADMIN_SKILL_STATUS_HEADER}"
117                                         sortBy="#{skill.skillStatus}"
118                                         filterBy="#{skill.skillStatus}"
119                                         filterMatchMode="in"
120                                         >
121                                         <h:outputText value="#{project[skill.skillStatus.messageKey]}"/>
122                                 </p:column>
123
124                                 <p:column
125                                         headerText="#{msg.ADMIN_SKILL_LAST_LOCKED_HEADER}"
126                                         sortBy="#{skill.skillLastLocked}"
127                                         filterBy="#{skill.skillLastLocked}"
128                                         filterMatchMode="contains"
129                                         >
130                                         <h:outputText value="#{skill.skillLastLocked}">
131                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
132                                         </h:outputText>
133                                 </p:column>
134
135                                 <p:column
136                                         headerText="#{msg.ENTRY_CREATED_HEADER}"
137                                         sortBy="#{skill.skillEntryCreated}"
138                                         filterBy="#{skill.skillEntryCreated}"
139                                         filterMatchMode="contains"
140                                         >
141                                         <h:outputText value="#{skill.skillEntryCreated}">
142                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
143                                         </h:outputText>
144                                 </p:column>
145
146                                 <p:column
147                                         headerText="#{msg.ENTRY_UPDATED_HEADER}"
148                                         sortBy="#{skill.skillEntryUpdated}"
149                                         filterBy="#{skill.skillEntryUpdated}"
150                                         filterMatchMode="contains"
151                                         >
152                                         <h:outputText value="#{skill.skillEntryUpdated}">
153                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
154                                         </h:outputText>
155                                 </p:column>
156
157                                 <p:column
158                                         headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
159                                         sortable="false"
160                                         filterable="false"
161                                         >
162                                         <p:menuButton value="#{msg.OPTIONS}">
163                                                 <p:menuitem
164                                                         outcome="admin_show_basic_data"
165                                                         value="#{msg.ADMIN_LINK_SHOW_SHORT}"
166                                                         title="#{msg.ADMIN_LINK_SHOW_SKILL_TITLE}"
167                                                         >
168                                                         <f:param name="skillId" value="#{skill.skillId}" />
169                                                 </p:menuitem>
170
171                                                 <p:menuitem
172                                                         outcome="admin_edit_basic_data"
173                                                         value="#{msg.ADMIN_LINK_EDIT_SHORT}"
174                                                         title="#{msg.ADMIN_LINK_EDIT_SKILL_TITLE}"
175                                                         >
176                                                         <f:param name="skillId" value="#{skill.skillId}" />
177                                                 </p:menuitem>
178
179                                                 <p:menuitem outcome="admin_delete_basic_data">
180                                                         <h:outputText
181                                                                 styleClass="link-danger"
182                                                                 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
183                                                                 title="#{msg.ADMIN_LINK_DELETE_SKILL_TITLE}"
184                                                                 />
185                                                         <f:param name="skillId" value="#{skill.skillId}" />
186                                                 </p:menuitem>
187                                         </p:menuButton>
188                                 </p:column>
189                         </p:dataTable>
190
191                         <p:dialog
192                                 dynamic="true"
193                                 modal="true"
194                                 resizable="false"
195                                 header="#{msg.ADMIN_SINGLE_SKILL_DETAILS_HEADER}"
196                                 hideEffect="fade"
197                                 showEffect="fade"
198                                 widgetVar="skillDialog"
199                                 position="top"
200                                 responsive="true"
201                                 closeOnEscape="true"
202                                 >
203                                 <p:outputPanel id="skill-details">
204                                         <p:panelGrid columns="2" rendered="#{not empty skillListController.selectedSkill}">
205                                                 <f:facet name="header">
206                                                         <h:outputFormat value="#{msg.ADMIN_SKILL_DETAILS_HEADER}">
207                                                                 <f:param value="#{skillListController.selectedSkill.skillName}" />
208                                                                 <f:param value="#{skillListController.selectedSkill.skillId}" />
209                                                         </h:outputFormat>
210                                                 </f:facet>
211
212                                                 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.SKILL_ID_NUMBER_TITLE}" />
213                                                 <h:outputText value="#{skillListController.selectedSkill.skillId}" />
214                                         </p:panelGrid>
215                                 </p:outputPanel>
216                         </p:dialog>
217                 </h:form>
218
219                 <h:form>
220                         <p:panelGrid
221                                 columns="1"
222                                 layout="grid"
223                                 >
224                                 <f:facet name="header">
225                                         <h:outputText value="#{msg.ADMIN_ADD_SKILL_TITLE}" />
226                                 </f:facet>
227
228                                 <h:panelGroup styleClass="para" layout="block">
229                                         <h:outputText value="#{msg.ADMIN_ADD_SKILL_MINIMUM_DATA}" />
230                                 </h:panelGroup>
231
232                                 <h:panelGroup styleClass="para" layout="block">
233                                         <p:fieldset legend="#{msg.ADMIN_SKILL_LEGEND}">
234                                                 <p:panelGrid
235                                                         columns="2"
236                                                         columnClasses="ui-grid-col-4,ui-grid-col-8"
237                                                         styleClass="ui-noborder"
238                                                         >
239                                                         <p:outputLabel for="skillName" value="#{msg.ADMIN_SKILL_NAME}" />
240                                                         <p:inputText
241                                                                 id="skillName"
242                                                                 value="#{adminSkillController.skillName}"
243                                                                 size="20"
244                                                                 maxlength="100"
245                                                                 required="true"
246                                                                 requiredMessage="#{msg.ADMIN_SKILL_NAME_REQUIRED}"
247                                                                 >
248                                                         </p:inputText>
249                                                 </p:panelGrid>
250                                         </p:fieldset>
251                                 </h:panelGroup>
252
253                                 <f:facet name="footer">
254                                         <p:panelGrid columns="2" layout="grid">
255                                                 <p:commandButton
256                                                         type="reset"
257                                                         value="#{msg.BUTTON_RESET_FORM}"
258                                                         />
259
260                                                 <p:commandButton
261                                                         type="submit"
262                                                         value="#{msg.BUTTON_ADMIN_ADD_SKILL}"
263                                                         action="#{adminSkillController.addSkill()}"
264                                                         update="form-list-skill:skillList"
265                                                         />
266                                         </p:panelGrid>
267                                 </f:facet>
268                         </p:panelGrid>
269                 </h:form>
270         </ui:define>
271 </ui:composition>