r664 - in trunk/coser-web/src/main: java/fr/ifremer/coser/web/actions webapp/WEB-INF/decorators
Author: chatellier Date: 2011-02-04 10:38:36 +0000 (Fri, 04 Feb 2011) New Revision: 664 Log: Restore locale switch for index redirect (don't work on post) Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java Modified: trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp trunk/coser-web/src/main/webapp/WEB-INF/decorators/sublayout.jsp Copied: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java (from rev 645, trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java) =================================================================== --- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java (rev 0) +++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java 2011-02-04 10:38:36 UTC (rev 664) @@ -0,0 +1,49 @@ +/* + * #%L + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +package fr.ifremer.coser.web.actions; + +import org.apache.struts2.convention.annotation.Action; +import org.apache.struts2.convention.annotation.Result; + +import fr.ifremer.coser.web.actions.common.CoserAction; + +/** + * Action index, recupere la liste des resultats. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public class LocaleAction extends CoserAction { + + /** serialVersionUID. */ + private static final long serialVersionUID = 1663244944108703571L; + + @Override + @Action(results={@Result(location="index", type="redirect")}) + public String execute() { + return SUCCESS; + } +} Modified: trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp =================================================================== --- trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2011-02-04 10:05:16 UTC (rev 663) +++ trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2011-02-04 10:38:36 UTC (rev 664) @@ -55,10 +55,10 @@ <div class="degrade"> <div class="top_content"> <a href="<s:url action='index' namespace='/' />" class="accueil"><s:text name="message.index.title" /></a> - <a href="<s:url includeParams="get"> + <a href="<s:url namespace="/" action="locale"> <s:param name="request_locale">en</s:param> </s:url>" class="anglais">Anglais</a> - <a href="<s:url includeParams="get"> + <a href="<s:url namespace="/" action="locale"> <s:param name="request_locale">fr</s:param> </s:url>" class="francais">Francais</a> </div> Modified: trunk/coser-web/src/main/webapp/WEB-INF/decorators/sublayout.jsp =================================================================== --- trunk/coser-web/src/main/webapp/WEB-INF/decorators/sublayout.jsp 2011-02-04 10:05:16 UTC (rev 663) +++ trunk/coser-web/src/main/webapp/WEB-INF/decorators/sublayout.jsp 2011-02-04 10:38:36 UTC (rev 664) @@ -51,10 +51,10 @@ <div class="top_content clearfix"> <a href="<s:url action='index' namespace='/' />" class="accueil"><s:text name="message.index.title" /></a> - <a href="<s:url includeParams="get"> + <a href="<s:url namespace="/" action="locale"> <s:param name="request_locale">en</s:param> </s:url>" class="anglais">Anglais</a> - <a href="<s:url includeParams="get"> + <a href="<s:url namespace="/" action="locale"> <s:param name="request_locale">fr</s:param> </s:url>" class="francais">Francais</a> </div>
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org