e4e827c6bf10d519a5f2e05a219ec10b9852cdf2
[simdecs.git] / web / bn / question / List.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"
4       xmlns:ui="http://java.sun.com/jsf/facelets"
5       xmlns:h="http://java.sun.com/jsf/html"
6       xmlns:f="http://java.sun.com/jsf/core">
7
8     <ui:composition template="/template.xhtml">
9         <ui:define name="title">
10             <h:outputText value="#{bundle.ListQuestionTitle}"></h:outputText>
11         </ui:define>
12         <ui:define name="body">
13             <h:form styleClass="jsfcrud_list_form">
14                 <h:panelGroup id="messagePanel" layout="block">
15                     <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
16                 </h:panelGroup>
17                 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
18                 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
19                     <h:outputText value="#{questionController.pagination.pageFirstItem + 1}..#{questionController.pagination.pageLastItem + 1}/#{questionController.pagination.itemsCount}"/>&nbsp;
20                     <h:commandLink action="#{questionController.previous}" value="#{bundle.Previous} #{questionController.pagination.pageSize}" rendered="#{questionController.pagination.hasPreviousPage}"/>&nbsp;
21                     <h:commandLink action="#{questionController.next}" value="#{bundle.Next} #{questionController.pagination.pageSize}" rendered="#{questionController.pagination.hasNextPage}"/>&nbsp;
22                     <h:dataTable value="#{questionController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
23                         <h:column>
24                             <f:facet name="header">
25                                 <h:outputText value="#{bundle.ListQuestionTitle_id}"/>
26                             </f:facet>
27                             <h:outputText value="#{item.id}"/>
28                         </h:column>
29                         <h:column>
30                             <f:facet name="header">
31                                 <h:outputText value="#{bundle.ListQuestionTitle_text}"/>
32                             </f:facet>
33                             <h:outputText value="#{item.text}"/>
34                         </h:column>
35                         <h:column>
36                             <f:facet name="header">
37                                 <h:outputText value="#{bundle.ListQuestionTitle_node}"/>
38                             </f:facet>
39                             <h:outputText value="#{item.node}"/>
40                         </h:column>
41                         <h:column>
42                             <f:facet name="header">
43                                 <h:outputText value="&nbsp;"/>
44                             </f:facet>
45                             <h:commandLink action="#{questionController.prepareView}" value="#{bundle.ListQuestionViewLink}"/>
46                             <h:outputText value=" "/>
47                             <h:commandLink action="#{questionController.prepareEdit}" value="#{bundle.ListQuestionEditLink}"/>
48                             <h:outputText value=" "/>
49                             <h:commandLink action="#{questionController.destroy}" value="#{bundle.ListQuestionDestroyLink}"/>
50                         </h:column>
51                     </h:dataTable>
52                 </h:panelGroup>
53                 <br />
54                 <h:commandLink action="#{questionController.prepareCreate}" value="#{bundle.ListQuestionCreateLink}"/>
55                 <br />
56                 <br />
57                 <h:commandLink value="#{bundle.ListQuestionIndexLink}" action="/index" immediate="true" />
58             </h:form>
59         </ui:define>
60     </ui:composition>
61
62 </html>