3 * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 <%@ include file="/html/common/init.jsp" %>
27 <c:if test="<%= ShutdownUtil.isInProcess() %>">
28 <div class="popup-alert-notice" id="lfrShutdownMessage">
29 <span class="notice-label"><liferay-ui:message key="maintenance-alert" /></span> <span class="notice-date"><%= FastDateFormatFactoryUtil.getTime(locale).format(Time.getDate(CalendarFactoryUtil.getCalendar(timeZone))) %> <%= timeZone.getDisplayName(false, TimeZone.SHORT, locale) %></span>
30 <span class="notice-message"><%= LanguageUtil.format(pageContext, "the-portal-will-shutdown-for-maintenance-in-x-minutes", String.valueOf(ShutdownUtil.getInProcess() / Time.MINUTE), false) %></span>
32 <c:if test="<%= Validator.isNotNull(ShutdownUtil.getMessage()) %>">
33 <span class="custom-shutdown-message"><%= HtmlUtil.escape(ShutdownUtil.getMessage()) %></span>
38 <!-- REMOVE test=false TO SHOW IMPERSONNATE TOP MESSAGE -->
39 <c:if test="<%= false %>">
40 <c:if test="<%= themeDisplay.isImpersonated() %>">
41 <div class="popup-alert-notice">
42 <span class="notice-message">
44 <c:when test="<%= themeDisplay.isSignedIn() %>">
45 <%= LanguageUtil.format(pageContext, "hi-x-you-are-impersonating-x", new Object[] {realUser.getFullName(), user.getFullName()}) %>
48 <%= LanguageUtil.format(pageContext, "hi-x-you-are-impersonating-the-guest-user", new Object[] {realUser.getFullName()}) %>
53 <a href="<%= PortalUtil.getLayoutURL(layout, themeDisplay, false) %>"><liferay-ui:message key="be-yourself-again" /></a>
56 Locale realUserLocale = realUser.getLocale();
57 Locale userLocale = user.getLocale();
60 <c:if test="<%= !realUserLocale.equals(userLocale) %>">
63 String doAsUserLanguageId = null;
64 String changeLanguageMessage = null;
66 if (locale.getLanguage().equals(realUserLocale.getLanguage()) && locale.getCountry().equals(realUserLocale.getCountry())) {
67 doAsUserLanguageId = userLocale.getLanguage() + "_" + userLocale.getCountry();
68 changeLanguageMessage = LanguageUtil.format(realUserLocale, "change-to-x's-preferred-language-(x)", new String[] {user.getFullName(), userLocale.getDisplayLanguage(realUserLocale)});
71 doAsUserLanguageId = realUserLocale.getLanguage() + "_" + realUserLocale.getCountry();
72 changeLanguageMessage = LanguageUtil.format(realUserLocale, "change-to-your-preferred-language-(x)", realUserLocale.getDisplayLanguage(realUserLocale));
76 <div class="current-user-language">
77 <a href="<%= HttpUtil.setParameter(PortalUtil.getCurrentURL(request), "doAsUserLanguageId", doAsUserLanguageId) %>"><%= changeLanguageMessage %></a>