]> git.mxchange.org Git - addressbook-war.git/blob - web/user/show_addressbook.xhtml
Continued:
[addressbook-war.git] / web / user / show_addressbook.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://xmlns.jcp.org/jsf/html"
6           xmlns:f="http://xmlns.jcp.org/jsf/core"
7           xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
8
9         <f:metadata>
10                 <f:viewParam id="addressbookId" name="addressbookId" value="#{addressbookController.addressbookId}" required="true" requiredMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_MISSING}" converterMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_INVALID}" validatorMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_NOT_FOUND}">
11                         <f:convertNumber for="addressbookId" type="number" minIntegerDigits="1" maxIntegerDigits="20" />
12                         <f:validator for="addressbookId" validatorId="AddressbookIdValidator" />
13                 </f:viewParam>
14         </f:metadata>
15
16         <ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
17                 <ui:define name="login_title">#{msg.PAGE_TITLE_USER_SHOW_ADDRESSBOOK}</ui:define>
18                 <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK}</ui:define>
19
20                 <ui:define name="content_header">
21                         #{msg.CONTENT_TITLE_USER_SHOW_ADDRESSBOOK}
22                 </ui:define>
23
24                 <ui:define name="content">
25                         <h:panelGrid headerClass="table_header" styleClass="table" columns="2" rendered="#{addressbookController.isAddressbookLoaded()}">
26                                 <c:set value="#{addressbookController.addressbookUser}" target="#{profileController}" property="user" />
27
28                                 <f:facet name="header">#{msg.TABLE_HEADER_SHOW_ADDRESSBOOK}</f:facet>
29
30                                 <h:outputLabel for="addressbookId" class="table_label">#{msg.ADDRESSBOOK_ID}</h:outputLabel>
31                                 <h:outputText id="addressbookId" value="#{addressbookController.addressbookId}" />
32
33                                 <h:outputLabel for="addressbookName" class="table_label">#{msg.ADDRESSBOOK_NAME}</h:outputLabel>
34                                 <h:outputText id="addressbookName" value="#{addressbookController.addressbookName}" />
35
36                                 <h:outputLabel for="userProfileLink" class="table_label">#{msg.ADDRESSBOOK_OWNER}</h:outputLabel>
37                                 <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl" />
38
39                                 <h:outputLabel for="addressbookCreated" class="table_label">#{msg.ADDRESSBOOK_CREATED}</h:outputLabel>
40                                 <h:outputFormat id="addressbookCreated" value="#{addressbookController.addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
41                                         <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
42                                 </h:outputFormat>
43
44                                 <h:outputLabel for="addressbookStatus" class="table_label">#{msg.ADDRESSBOOK_STATUS}</h:outputLabel>
45                                 <h:outputText id="addressbookStatus" value="#{msg[addressbookController.addressbook.addressbookStatus.messageKey]}" title="#{msg.ADDRESSBOOK_STATUS_TITLE}" />
46
47                                 <f:facet name="footer">
48                                         <h:outputText id="ownProfileInvible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
49                                         <h:outputText id="ownProfileInvible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and loginController.isInvisible()}" />
50
51                                         <ui:fragment rendered="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}">
52                                                 <h:link id="startSharing" outcome="login_start_sharing_addressbook" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.isOwnAddressbook()}" />
53
54                                                 <h:outputText value="Bla bla" rendered="#{addressbookController.isOtherAddressbook()}" />
55                                         </ui:fragment>
56                                 </f:facet>
57                         </h:panelGrid>
58                 </ui:define>
59         </ui:composition>
60 </html>