]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
added missing language i18n strings + show logout form only to logged-in users ...
authorRoland Häder <roland@mxchange.org>
Fri, 10 Jun 2016 13:01:57 +0000 (15:01 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 28 Jul 2016 19:15:58 +0000 (21:15 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java
web/user/login_logout.xhtml

index f5a841f4fc1358b87bb7b0eddb4f82abbfb695e2..b71a3f43600422f32e2f6928e515bf6df75c1d45 100644 (file)
@@ -40,19 +40,27 @@ public interface PizzaUserLoginWebSessionController extends Serializable {
         */
        void setBaseTemplatePathName (final String baseTemplatePathName);
 
+       /**
+        * Logout for administrator area. If a logged-in user instance exists, it is
+        * being logged-out, too.
+        * <p>
+        * @return Outcome (should be redirected)
+        */
+       String doAdminLogout ();
+
        /**
         * Logins the user, if the account is found, confirmed and unlocked.
         * <p>
         * @return Redirect target
         */
-       String doLogin ();
+       String doUserLogin ();
 
        /**
         * Logout for current user by invalidating the current session.
         * <p>
         * @return Outcome (should be redirected)
         */
-       String doLogout ();
+       String doUserLogout ();
 
        /**
         * Getter for logged-in user instance
index 270222178293c2bfa8b10232da1f27789946821e..8d8c61f18466de5f4eee73e99892bf2f07f2cf87 100644 (file)
@@ -15,7 +15,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:form id="user_logout">
+                       <h:form id="user_logout" rendered="#{userLoginController.isUserLoggedIn()}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputText value="#{msg.LOGIN_USER_LOGOUT_TITLE}" />
                                        </div>
                                </div>
                        </h:form>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>