]> git.mxchange.org Git - addressbook-war.git/commitdiff
Splitted edit_user_data into 3 new sub actions + added logged-in check:
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 19:48:40 +0000 (20:48 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 19:48:40 +0000 (20:48 +0100)
- new template user_not_logged_in.tpl added which shows a message if the user is not logged-in and tries to access a login-only page
- added login_change_email_address.xhtml for changing email address
- added login_change_password.xhtml for changing password
- added login_change_personal_data.xhtml for changing personal data
- login_edit_address.xhtml is now no longer needed

20 files changed:
nbproject/faces-config.NavData
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates.dist/login_page.xhtml
web/WEB-INF/templates/generic/user_not_logged_in.tpl [new file with mode: 0644]
web/WEB-INF/templates/login/login_base.tpl
web/WEB-INF/templates/login/login_menu.tpl
web/login/login_add_addressbook.xhtml
web/login/login_change_email_address.xhtml [new file with mode: 0644]
web/login/login_change_password.xhtml [new file with mode: 0644]
web/login/login_change_personal_data.xhtml [new file with mode: 0644]
web/login/login_edit_address.xhtml [deleted file]
web/login/login_edit_user_data.xhtml
web/login/login_index.xhtml
web/login/login_list_sharing_addressbooks.xhtml
web/login/login_other_addressbooks.xhtml
web/login/login_own_addressbooks.xhtml
web/login/login_shared_addressbooks.xhtml
web/login/login_start_sharing_addressbook.xhtml

index 18dc9cdd4263dd4ba3fe9668a7e5465d7be492a3..077c7ff682c471190ee5091679017fab9fb7c01e 100644 (file)
         <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
     </Scope>
     <Scope Scope="Project">
-        <Node id="login/login_shared_addressbooks.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="privacy.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="login/login_edit_address.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="login/login_start_sharing_addressbook.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="user/register.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="login/login_add_addressbook.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="user/resend_link.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="login/login_own_addressbooks.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="terms.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="user/user_list.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="bye.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="index.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="user/register_done.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="imprint.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="*" x="900" y="150" zoom="true"/>
-        <Node id="user/login_error.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="login/login_other_addressbooks.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="admin/admin_index.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="user/lost_passwd.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="login/login_list_sharing_addressbooks.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="user/login.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="login/login_shared_addressbooks.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="login/login_edit_address.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="login/login_change_password.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="privacy.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="login/login_start_sharing_addressbook.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="user/register.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="login/login_add_addressbook.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="user/resend_link.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="login/login_own_addressbooks.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="terms.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="user/user_list.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="bye.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="index.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="user/register_done.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="login/login_change_personal_data.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="*" x="650" y="150" zoom="true"/>
+        <Node id="user/show_addressbook.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="imprint.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/login_error.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="login/login_other_addressbooks.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="user/show_addressbook_entries.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="admin/admin_index.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="login/login_change_email_address.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="user/lost_passwd.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="user/login.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="login/login_list_sharing_addressbooks.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="150" y="750" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations">
         <Node id="bye.xhtml" x="150" y="450" zoom="true"/>
index eff00ba690de5720bd3190b129ec552418abbf49..afcc3ae39792b391947f16cb2f57afef9581e353 100644 (file)
@@ -140,13 +140,9 @@ PAGE_TITLE_USER_LIST=Benutzerliste
 CONTENT_TITLE_USER_LIST=Alle angemeldeten Benutzer:
 PAGE_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Von anderen Benutzern mir freigegeben Adressb\u00fccher
 CONTENT_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Von anderen Benutzern freigegebene Adressb\u00fccher auflisten:
-LINK_LOGIN_EDIT_ADDRESS=Kontaktdaten \u00e4ndern
-LINK_LOGIN_EDIT_ADDRESS_TITLE=\u00c4ndern Sie hier Ihre eigenen Kontaktdaten.
 LINK_LOGIN_EDIT_USER_DATA=Benutzerdaten \u00e4ndern
 LINK_LOGIN_EDIT_USER_DATA_TITLE=\u00c4ndern Sie hier Ihre eigenen Benutzerdaten.
 MENU_EDIT_PROFILE_TITLE=Daten \u00e4ndern
-PAGE_TITLE_LOGIN_EDIT_ADDRESS=Meine Kontaktdaten \u00e4ndern
-CONTENT_TITLE_LOGIN_EDIT_ADDRESS=\u00c4ndern Sie Ihre Adressdaten:
 PAGE_TITLE_LOGIN_EDIT_USER_DATA=Benutzerdaten \u00e4ndern
 CONTENT_TITLE_LOGIN_EDIT_USER_DATA=\u00c4ndern Sie Ihre Benutzerdaten:
 PRIVACY_STATEMENTS=Datenschutzbestimmungen
@@ -248,8 +244,7 @@ ADDRESSBOOK_STATUS=Status:
 PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK=\u00d6ffentlicher Teil des Adressbuchs anzeigen
 USER_PROFILE_NOT_PUBLICLY_VISIBLE=Das Benutzerprofil ist privat.
 PAGE_TITLE_LOGIN_USER_PROFILE=Benutzerprofil ansehen
-#TODO: Fix German umlaut!
-PUBLIC_USER_PROFILE=Oeffentliches Benutzerprofil
+PUBLIC_USER_PROFILE=\u00d6ffentliches Benutzerprofil
 USER_PROFILE_MODE_INVISIBLE=Nicht sichtbar
 USER_PROFILE_MODE_MEMBERS=Nur von Mitgliedern einsehbar
 #TODO: Please fix German umlaut!
@@ -267,3 +262,17 @@ ERROR_USER_INSTANCE_NOT_SET=Fehler: Benutzer-Instanz nicht gesetzt.
 LOGIN_ADDRESSBOOK_NOT_SET=Adressbuch-Instanz nicht gesetzt.
 LINK_GUEST_LOGIN_LOST_PASSWORD=Passwort vergessen?
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Passwort wiederherstellen
+#TODO: Please fix German umlaut!
+TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=Sie muessen angemeldet sein
+#TODO: Please fix German umlaut!
+USER_IS_NOT_LOGGED_IN_FULL=Damit diese Funktion nutzen koennen, muessen Sie sich anmelden und in Ihren Account eingeloggt sein.
+#TODO: Please fix German umlaut!
+LOGIN_EDIT_USER_DATA_TITLE=Was moechten Sie aendern?
+#TODO: Please fix German umlaut!
+LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE=Sie koennen hier Ihre persoenlichen Daten, Ihre Email-Adresse und Ihr Passwort zum Einloggen aendern.
+#TODO: Please fix German umlaut!
+LINK_LOGIN_CHANGE_PERSONAL_DATA=Persoenliche Daten, wie Anschrift usw. aendern
+#TODO: Please fix German umlaut!
+LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Ihre Email-Adresse aendern
+#TODO: Please fix German umlaut!
+LINK_LOGIN_CHANGE_PASSWORD=Ihr Passwort aendern
index 914d933cd2b02b84fb9c044dbd01bfef9b99c8e1..cd9453145683fb1328e8f04b14838b9f28289786 100644 (file)
@@ -140,13 +140,9 @@ PAGE_TITLE_USER_LIST=User list
 CONTENT_TITLE_USER_LIST=All registered users:
 PAGE_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Other user's addressbooks shared with me
 CONTENT_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Manage other's shared address books
-LINK_LOGIN_EDIT_ADDRESS=Personal data
-LINK_LOGIN_EDIT_ADDRESS_TITLE=Change your own address data here.
 LINK_LOGIN_EDIT_USER_DATA=Profile data
 LINK_LOGIN_EDIT_USER_DATA_TITLE=Change your own user account data here.
 MENU_EDIT_PROFILE_TITLE=Edit data
-PAGE_TITLE_LOGIN_EDIT_ADDRESS=Change my address data
-CONTENT_TITLE_LOGIN_EDIT_ADDRESS=Change your address data:
 PAGE_TITLE_LOGIN_EDIT_USER_DATA=Change user data
 CONTENT_TITLE_LOGIN_EDIT_USER_DATA=Change your user data:
 PRIVACY_STATEMENTS=privacy statements
@@ -262,3 +258,10 @@ ERROR_USER_INSTANCE_NOT_SET=Error: User instance not set.
 LOGIN_ADDRESSBOOK_NOT_SET=Address book instance not set.
 LINK_GUEST_LOGIN_LOST_PASSWORD=Forgot your password?
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password
+TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=You need to be logged-in
+USER_IS_NOT_LOGGED_IN_FULL=To use this feature you need to register and be logged-in into your account.
+LOGIN_EDIT_USER_DATA_TITLE=What do you want to change?
+LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE=You can change your personal data, your email address and your password for login here.
+LINK_LOGIN_CHANGE_PERSONAL_DATA=Change personal data such as your address.
+LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address
+LINK_LOGIN_CHANGE_PASSWORD=Change your password
index 969fbf47a8b617f494d8f680ab9ae43473a049cc..9bb8d1f8d53117552b59ac6a35902ac0d4b2ae9e 100644 (file)
                        <from-outcome>admin_logout</from-outcome>
                        <to-view-id>/admin/admin_logout.xhtml</to-view-id>
                </navigation-case>
-               <navigation-case>
-                       <from-outcome>login_edit_address</from-outcome>
-                       <to-view-id>/login/login_edit_address.xhtml</to-view-id>
-               </navigation-case>
                <navigation-case>
                        <from-outcome>login_edit_user_data</from-outcome>
                        <to-view-id>/login/login_edit_user_data.xhtml</to-view-id>
                        <to-view-id>/user/show_addressbook.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+    <navigation-rule>
+        <from-view-id>/login/login_edit_user_data.xhtml</from-view-id>
+        <navigation-case>
+            <from-outcome>login_change_email_address</from-outcome>
+            <to-view-id>/login/login_change_email_address.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>login_change_password</from-outcome>
+            <to-view-id>/login/login_change_password.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>login_change_personal_data</from-outcome>
+            <to-view-id>/login/login_change_personal_data.xhtml</to-view-id>
+        </navigation-case>
+    </navigation-rule>
 </faces-config>
index b93f606edd421fddab1ef456c316a0125818acd2..b021f0a5f6eaf4e6af81f7ecc7aaa98e11e6b0b5 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
diff --git a/web/WEB-INF/templates/generic/user_not_logged_in.tpl b/web/WEB-INF/templates/generic/user_not_logged_in.tpl
new file mode 100644 (file)
index 0000000..300eb24
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <div class="table">
+               <div class="table_header">
+                       #{msg.TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN}
+               </div>
+
+               <div class="para errors">
+                       <h:outputText value="#{msg.USER_IS_NOT_LOGGED_IN_FULL}" />
+               </div>
+       </div>
+</ui:composition>
index abd205b7778faaf725475f1a6fe4b3c29c1d6fd0..d3e0f5fc89b58718fe873d8a32411f7f8a35112f 100644 (file)
@@ -1,14 +1,19 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
-       rendered="#{loginController.isUserLoggedIn()}"
        template="/WEB-INF/templates/base.tpl"
        xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://java.sun.com/jsf/facelets">
+       xmlns:ui="http://java.sun.com/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html">
 
        <ui:define name="title">#{msg.PAGE_TITLE_LOGIN_AREA} - <ui:insert name="login_title" class="login_title" /></ui:define>
 
        <ui:define name="menu">
-               <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" />
+               <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                       <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" />
+               </ui:fragment>
+               <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                       <h:outputText class="errors" value="#{msg.USER_NOT_LOGGED_IN}" />
+               </ui:fragment>
        </ui:define>
 
        <ui:define name="footer">
index c655637a5b5a9ba344c72352a81ce506619052ac..f224a8e57db72290832fc157bac7a300731a549a 100644 (file)
@@ -28,9 +28,6 @@
                                <li>
                                        <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="login_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
                                </li>
-                               <li>
-                                       <h:link title="#{msg.LINK_LOGIN_EDIT_ADDRESS_TITLE}" outcome="login_edit_address" value="#{msg.LINK_LOGIN_EDIT_ADDRESS}" />
-                               </li>
                        </ul>
 
                        <div class="menu_header">
index 30f86dafb6bc92e7cd68bc314563499698561365..d186b4adcad5a8583c146311d74ccd16e934ad69 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <h:form id="add_addressbook" acceptcharset="utf-8">
-                               <div class="table">
-                                       <div class="table_header">
-                                               #{msg.FORM_LOGIN_ADD_ADDRESSBOOK_TITLE}
-                                       </div>
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <h:form id="add_addressbook" acceptcharset="utf-8">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       #{msg.FORM_LOGIN_ADD_ADDRESSBOOK_TITLE}
+                                               </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="addressbookName" value="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME}"/>
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="addressbookName" value="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME}"/>
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText class="input" id="addressbookName" value="#{addressbookController.addressbookName}" maxlength="50" size="20" title="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE}" required="true" requiredMessage="#{msg.LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE}">
+                                                                       <f:validator for="addressbookName" validatorId="AddressbookNameValidator" />
+                                                               </h:inputText>
+                                                       </div>
                                                </div>
 
-                                               <div class="table_right">
-                                                       <h:inputText class="input" id="addressbookName" value="#{addressbookController.addressbookName}" maxlength="50" size="20" title="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE}" required="true" requiredMessage="#{msg.LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE}">
-                                                               <f:validator for="addressbookName" validatorId="AddressbookNameValidator" />
-                                                       </h:inputText>
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_LOGIN_ADD_ADDRESSBOOK}" action="#{addressbookController.addAddressbook()}" />
                                                </div>
                                        </div>
+                               </h:form>
+                       </ui:fragment>
 
-                                       <div class="table_footer">
-                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_LOGIN_ADD_ADDRESSBOOK}" action="#{addressbookController.addAddressbook()}" />
-                                       </div>
-                               </div>
-                       </h:form>
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
diff --git a/web/login/login_change_email_address.xhtml b/web/login/login_change_email_address.xhtml
new file mode 100644 (file)
index 0000000..a5db8b0
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_EDIT_USER_DATA}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_EDIT_USER_DATA}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_form">
+                                               <div class="table_header2">
+                                                       #{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}
+                                               </div>
+
+                                               <div class="para">
+                                                       <fieldset id="login_data">
+                                                               <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_EMAIL_LEGEND}</legend>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="emailAddress1" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL1}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{userController.emailAddress}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="emailAddress2" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL2}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{userController.emailAddressRepeat}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="para"></div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password" value="#{msg.LOGIN_ENTER_PASSWORD_CONFIRM}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+                                                       </fieldset>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{loginController.changeEmailAddress()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_password.xhtml b/web/login/login_change_password.xhtml
new file mode 100644 (file)
index 0000000..6b422d9
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CHANGE_PASSWORD}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_CHANGE_PASSWORD}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_PERSONAL_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_form">
+                                               <div class="table_header2">
+                                                       #{msg.LOGIN_CHANGE_PASSWORD_TITLE}
+                                               </div>
+
+                                               <div class="para">
+                                                       <fieldset id="login_data">
+                                                               <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}</legend>
+
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password" value="#{msg.LOGIN_ENTER_PASSWORD_CONFIRM}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password1" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD1}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password1" size="10" maxlength="255" value="#{loginController.userPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password2" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD2}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password2" size="10" maxlength="255" value="#{loginController.userPasswordRepeat}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+                                                       </fieldset>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{loginController.changePassword()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_personal_data.xhtml b/web/login/login_change_personal_data.xhtml
new file mode 100644 (file)
index 0000000..7c4db3d
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_EDIT_USER_DATA}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_EDIT_USER_DATA}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_change_personal_form">
+                                               <div class="table_header2">
+                                                       #{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}
+                                               </div>
+
+                                               <ui:include src="/WEB-INF/templates/generic/form_personal_data.tpl" />
+
+                                               <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                                               <div class="para"></div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="password" value="#{msg.LOGIN_ENTER_PASSWORD_CONFIRM}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputSecret class="input" id="password" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{loginController.changePersonalData()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_edit_address.xhtml b/web/login/login_edit_address.xhtml
deleted file mode 100644 (file)
index 933c603..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-         xmlns:ui="http://java.sun.com/jsf/facelets"
-         xmlns:h="http://xmlns.jcp.org/jsf/html"
-         xmlns:f="http://xmlns.jcp.org/jsf/core"
-         >
-
-       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
-               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_EDIT_ADDRESS}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_LOGIN_EDIT_ADDRESS}
-               </ui:define>
-
-               <ui:define name="content">
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
index 638011b8e63122e547474f61da305be43dc29fc4..5208fa7e7623c0e1dfe65269a04351a971254262 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <div class="para notice">
+                                               <h:outputText value="#{msg.LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ul>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
+                                                       </li>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
+                                                       </li>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="login_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
+                                                       </li>
+                                               </ul>
+                                       </div>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 774ab6268ef1b7f6058b73a3a4bb17f9a8aaf5e9..baa04c5a4b08f98e4480c32a8d3446528409ddcb 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 471a1f18374c6b081bd5bc5fe8c07a9666359966..12ffad6740709f9d6f79f78924aa2d99b98c69cf 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{shareController.isShareeUserIdSet()}">
-                               Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <ui:fragment rendered="#{shareController.isShareeUserIdSet()}">
+                                       Here goes your content.
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{shareController.isShareeUserIdEmpty()}">
+                                       <ui:include src="/WEB-INF/templates/generic/userid_error.tpl" />
+                               </ui:fragment>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{shareController.isShareeUserIdEmpty()}">
-                               <ui:include src="/WEB-INF/templates/generic/userid_error.tpl" />
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
                        </ui:fragment>
                </ui:define>
        </ui:composition>
index 562c55aec2dc297ab26eb4ffa91b415d561fa747..07e0538fa2d4ba3a9c4f2b5b8458990657cb41c6 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 1ce2531566afc295c623b8b491818dd1c7b9f954..2990b538e7993df0651e3a0030702a084bffa760 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="table">
-                               <div class="table_header">
-                                       #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS}
-                               </div>
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS}
+                                       </div>
 
-                               <div class="para">
-                                       <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks()}" styleClass="table" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.ADDRESSBOOK_NAME}</f:facet>
-
-                                                       <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
-                                                               <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
-                                                               <h:outputText id="addressbookName" value="#{addressbook.addressbookName}" title="#{msg.ADDRESSBOOK_NAME_TITLE}" />
-                                                       </h:link>
-                                               </h:column>
-
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.ADDRESSBOOK_TOTAL_ENTRIES}</f:facet>
-
-                                                       <h:link outcome="show_addressbook_entries" title="#{msg.LINK_SHOW_ADDRESSBOOK_ENTRIES_TITLE}">
-                                                               <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
-                                                               <h:outputText id="addressbookEntries" value="#{addressbookController.allEntriesSize(addressbook)}" title="#{msg.ADDRESSBOOK_TOTAL_ENTRIES_TITLE}" />
-                                                       </h:link>
-                                               </h:column>
-
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>
-
-                                                       <h:outputFormat id="addressbookCreated" value="#{addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
-                                                               <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
-                                                       </h:outputFormat>
-                                               </h:column>
-                                       </h:dataTable>
-                               </div>
+                                       <div class="para">
+                                               <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks()}" styleClass="table" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_NAME}</f:facet>
+
+                                                               <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookName" value="#{addressbook.addressbookName}" title="#{msg.ADDRESSBOOK_NAME_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_TOTAL_ENTRIES}</f:facet>
 
-                               <div class="table_footer">
-                                       <h:link id="add_first_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks() == false}" />
-                                       <h:link id="add_additional_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks()}" />
+                                                               <h:link outcome="show_addressbook_entries" title="#{msg.LINK_SHOW_ADDRESSBOOK_ENTRIES_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookEntries" value="#{addressbookController.allEntriesSize(addressbook)}" title="#{msg.ADDRESSBOOK_TOTAL_ENTRIES_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>
+
+                                                               <h:outputFormat id="addressbookCreated" value="#{addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
+                                                                       <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
+                                                               </h:outputFormat>
+                                                       </h:column>
+                                               </h:dataTable>
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:link id="add_first_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks() == false}" />
+                                               <h:link id="add_additional_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks()}" />
+                                       </div>
                                </div>
-                       </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 824c0e88da58c754a8b323bb94a6f646858a304c..7d7190d3dc8d4a7150949d5979503fdf52800f71 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="table">
-                               <div class="table_header">
-                                       #{msg.LOGIN_TABLE_HEADER_SHARED_ADDRESSBOOKS}
-                               </div>
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_TABLE_HEADER_SHARED_ADDRESSBOOKS}
+                                       </div>
 
-                               <div class="para">
-                                       <h:dataTable id="sharedAddressbooks" var="share" value="#{shareController.allShares()}" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_SHARED_ADDRESSBOOKS}" rendered="#{shareController.isSharingAddressbooks()}">
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.SHARED_ADDRESSBOOK}</f:facet>
-
-                                                       <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
-                                                               <f:param name="addressbookId" value="#{share.shareAddressbook.addressbookId}" />
-                                                               <h:outputText id="addressbookName" value="#{share.shareAddressbook.addressbookName}" title="#{msg.SHARED_ADDRESSBOOK_TITLE}" />
-                                                       </h:link>
-                                               </h:column>
-
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.SHAREE_USER_NAME}</f:facet>
-                                                       <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
-                                                               <ui:param name="user" value="#{share.setShareUserSharee(shareUserSharer)}" />
-                                                       </ui:include>
-                                               </h:column>
-
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.SHARE_CREATED}</f:facet>
-                                                       <h:outputText id="shareCreated" value="#{share.shareCreated.time}" title="#{msg.SHARE_CREATED_TITLE}">
-                                                               <f:convertDateTime for="shareCreated" type="both" timeStyle="short" dateStyle="medium" />
-                                                       </h:outputText>
-                                               </h:column>
-                                       </h:dataTable>
-                               </div>
+                                       <div class="para">
+                                               <h:dataTable id="sharedAddressbooks" var="share" value="#{shareController.allShares()}" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_SHARED_ADDRESSBOOKS}" rendered="#{shareController.isSharingAddressbooks()}">
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.SHARED_ADDRESSBOOK}</f:facet>
 
-                               <div class="para">
-                                       <h:outputText class="notice" value="#{msg.LOGIN_USER_HAS_NOT_SHARED_ADDRESSBOOKS}" rendered="#{not shareController.isSharingAddressbooks()}" />
-                               </div>
+                                                               <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{share.shareAddressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookName" value="#{share.shareAddressbook.addressbookName}" title="#{msg.SHARED_ADDRESSBOOK_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.SHAREE_USER_NAME}</f:facet>
+                                                               <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
+                                                                       <ui:param name="user" value="#{share.setShareUserSharee(shareUserSharer)}" />
+                                                               </ui:include>
+                                                       </h:column>
 
-                               <div class="table_footer">
-                                       <h:link id="shareAddressbook" outcome="user_list" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOKS_TITLE}" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOKS}" />
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.SHARE_CREATED}</f:facet>
+                                                               <h:outputText id="shareCreated" value="#{share.shareCreated.time}" title="#{msg.SHARE_CREATED_TITLE}">
+                                                                       <f:convertDateTime for="shareCreated" type="both" timeStyle="short" dateStyle="medium" />
+                                                               </h:outputText>
+                                                       </h:column>
+                                               </h:dataTable>
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText class="notice" value="#{msg.LOGIN_USER_HAS_NOT_SHARED_ADDRESSBOOKS}" rendered="#{not shareController.isSharingAddressbooks()}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:link id="shareAddressbook" outcome="user_list" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOKS_TITLE}" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOKS}" />
+                                       </div>
                                </div>
-                       </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 491ad98cbf0fe1fa04e1c58ff401dc989042de94..6e1ac3ac62c6c944256fa3715f376aefada01743 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="table_big">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table_big">
 
-                               <div class="table_header">
-                                       #{msg.TABLE_HEADER_CHOOSE_USER_FOR_SHARING}
-                               </div>
+                                       <div class="table_header">
+                                               #{msg.TABLE_HEADER_CHOOSE_USER_FOR_SHARING}
+                                       </div>
 
-                               <div class="para">
-                                       <h:outputText id="userNotLoggedIn" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
+                                       <div class="para">
+                                               <h:outputText id="userNotLoggedIn" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
 
-                                       <h:dataTable id="userList" headerClass="table_header_column" var="user" value="#{addressbookController.allUsersNotSharing()}" rendered="#{loginController.isUserLoggedIn() and not empty addressbookController.addressbook and not loginController.isInvisible()}">
+                                               <h:dataTable id="userList" headerClass="table_header_column" var="user" value="#{addressbookController.allUsersNotSharing()}" rendered="#{loginController.isUserLoggedIn() and not empty addressbookController.addressbook and not loginController.isInvisible()}">
 
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.USER_ID}</f:facet>
-                                                       <h:outputText value="#{user.userId}" />
-                                               </h:column>
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.USER_ID}</f:facet>
+                                                               <h:outputText value="#{user.userId}" />
+                                                       </h:column>
 
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.USER_NAME}</f:facet>
-                                                       <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
-                                                               <ui:param name="user" value="#{user}" />
-                                                       </ui:include>
-                                               </h:column>
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.USER_NAME}</f:facet>
+                                                               <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
+                                                                       <ui:param name="user" value="#{user}" />
+                                                               </ui:include>
+                                                       </h:column>
 
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.LOGIN_START_SHARING_TITLE}</f:facet>
-                                                       <h:form acceptcharset="utf-8" id="startSharing" rendered="#{profileController.isProfileLinkVisibleByUser(user)}">
-                                                               <h:commandButton class="submit" id="submit" value="#{msg.LOGIN_START_SHARING_BUTTON}" action="#{shareController.startSharing(user, addressbookController.addressbook)}" title="#{msg.LOGIN_START_SHARING_BUTTON_TITLE}" />
-                                                       </h:form>
-                                               </h:column>
-                                       </h:dataTable>
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.LOGIN_START_SHARING_TITLE}</f:facet>
+                                                               <h:form acceptcharset="utf-8" id="startSharing" rendered="#{profileController.isProfileLinkVisibleByUser(user)}">
+                                                                       <h:commandButton class="submit" id="submit" value="#{msg.LOGIN_START_SHARING_BUTTON}" action="#{shareController.startSharing(user, addressbookController.addressbook)}" title="#{msg.LOGIN_START_SHARING_BUTTON_TITLE}" />
+                                                               </h:form>
+                                                       </h:column>
+                                               </h:dataTable>
 
-                                       <h:outputText id="addressbokUnset" class="notice" value="#{msg.LOGIN_ADDRESSBOOK_NOT_SET}" rendered="#{empty addressbookController.addressbook}" />
+                                               <h:outputText id="addressbokUnset" class="notice" value="#{msg.LOGIN_ADDRESSBOOK_NOT_SET}" rendered="#{empty addressbookController.addressbook}" />
 
-                                       <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and not empty addressbookController.addressbook and not loginController.isInvisible()}" />
-                               </div>
+                                               <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and not empty addressbookController.addressbook and not loginController.isInvisible()}" />
+                                       </div>
 
-                               <div class="table_footer">
-                                       <ul>
-                                               <li>#{msg.LOGIN_START_SHARING_NOTICE1}</li>
-                                               <li>#{msg.LOGIN_START_SHARING_NOTICE2}</li>
-                                       </ul>
+                                       <div class="table_footer">
+                                               <ul>
+                                                       <li>#{msg.LOGIN_START_SHARING_NOTICE1}</li>
+                                                       <li>#{msg.LOGIN_START_SHARING_NOTICE2}</li>
+                                               </ul>
+                                       </div>
                                </div>
-                       </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>