Author: tchemit Date: 2014-03-31 17:36:31 +0200 (Mon, 31 Mar 2014) New Revision: 1782 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1782 Log: refs #4483 fix I18n + date month parser - format Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/MonthConverter.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java 2014-03-31 15:36:31 UTC (rev 1782) @@ -32,8 +32,11 @@ import java.util.Date; import java.util.LinkedList; import java.util.List; +import java.util.Locale; import java.util.regex.Pattern; +import static org.nuiton.i18n.I18n.l; + public class WaoUtils { protected static final String MONTH_PATTERN = "MM/yyyy"; @@ -65,8 +68,13 @@ return dateFormat.format(date); } - public static Date parseMonth(String monthYear) throws ParseException { - DateFormat dateFormat = new SimpleDateFormat(MONTH_PATTERN); + public static String formatMonth(Locale locale, Date date) { + return l(locale, "wao.month.formatter", date); + } + + public static Date parseMonth(Locale locale, String monthYear) throws ParseException { + String pattern = l(locale, "wao.month.pattern"); + DateFormat dateFormat = new SimpleDateFormat(pattern); return dateFormat.parse(monthYear); } @@ -82,15 +90,6 @@ return ordinals; } - //TODO use I18n - protected static final SimpleDateFormat dateFormat = new SimpleDateFormat("MM/yyyy"); - - public static boolean isCurrentMonth(Date month) { - String currentStr = dateFormat.format(new Date()); - String monthStr = dateFormat.format(month); - return currentStr.equals(monthStr); - } - public static Date getEndOfMonth(Date month) { return DateUtils.addMilliseconds( DateUtils.addMonths(month, 1), -1); Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties =================================================================== --- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-03-31 15:36:31 UTC (rev 1782) @@ -138,3 +138,5 @@ fr.ifremer.wao.entity.TerrestrialDivision=Terrestrial divisions fr.ifremer.wao.entity.TerrestrialLocation=Terrestrial locations wao.business.other= +wao.month.formatter=%1$tm-%1$tY +wao.month.pattern=MM-yyyy Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties =================================================================== --- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-03-31 15:36:31 UTC (rev 1782) @@ -137,3 +137,5 @@ fr.ifremer.wao.entity.TerrestrialDivision=Stratification géographique fr.ifremer.wao.entity.TerrestrialLocation=Lieux terrestres wao.business.other= +wao.month.formatter=%1$tm/%1$tY +wao.month.pattern=MM/yyyy Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java 2014-03-31 15:36:31 UTC (rev 1782) @@ -21,7 +21,6 @@ * #L% */ -import com.google.common.collect.Range; import fr.ifremer.wao.WaoUtils; import fr.ifremer.wao.entity.DCF5Code; import fr.ifremer.wao.entity.FishingZone; @@ -30,7 +29,6 @@ import fr.ifremer.wao.entity.SampleRowLog; import fr.ifremer.wao.entity.TerrestrialLocation; import org.apache.commons.collections4.CollectionUtils; -import org.nuiton.util.DateUtil; import java.io.Serializable; import java.text.NumberFormat; @@ -39,8 +37,11 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; +import static org.nuiton.i18n.I18n.l; + public class ObsMerSamplingPlan implements Iterable<ObsMerSamplingPlan.ObsMerSamplingPlanFacadePart>, Serializable { private static final long serialVersionUID = 1L; @@ -342,16 +343,22 @@ protected Date latestSampleLogCreateDate; /** - * Sample month range (from the first sample month to the last one). + * First sample month date. */ - protected Range<Date> sampleRowMonthPeriod; + protected Date firstSampleMonthDate; /** + * Last sample month date. + */ + protected Date lastSampleMonthDate; + + /** * Last sample month end of month. */ protected Date lastSampleMonthEndOfMonth; - public ObsMerSamplingPlanSampleRowPart(Map<Date, ObsMerSamplingPlanStatistics> nbTidesPerMonth, + public ObsMerSamplingPlanSampleRowPart(Locale locale, + Map<Date, ObsMerSamplingPlanStatistics> nbTidesPerMonth, SampleRow sampleRow, Double observationTimesInDaysExpected, Long observationTimesInDaysReal, @@ -409,9 +416,9 @@ dcf5CodesAndDescriptions = new LinkedHashMap<>(); for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) { String key = dcf5Code.getCode(); - String description = dcf5Code.getFishingGearCode() + " - " + dcf5Code.getFishingGearDCF().getI18nKey(); + String description = dcf5Code.getFishingGearCode() + " - " + l(locale, dcf5Code.getFishingGearDCF().getI18nKey()); if (dcf5Code.getTargetSpeciesCode() != null) { - description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + dcf5Code.getTargetSpeciesDCF().getI18nKey(); + description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + l(locale, dcf5Code.getTargetSpeciesDCF().getI18nKey()); } dcf5CodesAndDescriptions.put(key, description); } @@ -440,11 +447,10 @@ // compute sampleRowPeriod List<SampleMonth> sampleMonth = sampleRow.getSampleMonth(); - Date dateFrom = sampleMonth.get(0).getPeriodDate(); - Date dateTo = sampleMonth.get(sampleMonth.size() - 1).getPeriodDate(); - sampleRowMonthPeriod = Range.closed(dateFrom, dateTo); + firstSampleMonthDate = sampleMonth.get(0).getPeriodDate(); + lastSampleMonthDate = sampleMonth.get(sampleMonth.size() - 1).getPeriodDate(); - lastSampleMonthEndOfMonth = WaoUtils.getEndOfMonth(dateTo); + lastSampleMonthEndOfMonth = WaoUtils.getEndOfMonth(lastSampleMonthDate); } public String getSamplingStrategy() { @@ -455,10 +461,22 @@ return sampleRowId; } - public Range<Date> getSampleRowMonthPeriod() { - return sampleRowMonthPeriod; + public Date getLatestSampleLogCreateDate() { + return latestSampleLogCreateDate; } + public Date getFirstSampleMonthDate() { + return firstSampleMonthDate; + } + + public Date getLastSampleMonthDate() { + return lastSampleMonthDate; + } + + public Date getLastSampleMonthEndOfMonth() { + return lastSampleMonthEndOfMonth; + } + public int getNbObservants() { return nbObservants; } @@ -600,27 +618,17 @@ return observationTimesInDaysEstimated; } - public boolean hasNbTidesReal(Date month) { - Date current = new Date(); - boolean validMonth = month.before(current) || WaoUtils.isCurrentMonth(month); - return validMonth && getNbTidesReal(month) != null; - } - - public boolean hasNbTidesEstimated(Date month) { - Date current = new Date(); - boolean validMonth = month.before(current) || WaoUtils.isCurrentMonth(month); - return validMonth && getNbTidesEstimated(month) != null; - } - - public boolean isRecentlyUpdated() { - boolean isRecentlyUpdated = DateUtil.getDifferenceInDays(latestSampleLogCreateDate, new Date()) <= 2 * 7; - return isRecentlyUpdated; - } - - public boolean isNewContactCreatable() { - boolean isNewContactCreatable = new Date().before(lastSampleMonthEndOfMonth); - return isNewContactCreatable; - } +// public boolean hasNbTidesReal(Date month) { +// Date current = new Date(); +// boolean validMonth = month.before(current) || WaoUtils.isCurrentMonth(month); +// return validMonth && getNbTidesReal(month) != null; +// } +// +// public boolean hasNbTidesEstimated(Date month) { +// Date current = new Date(); +// boolean validMonth = month.before(current) || WaoUtils.isCurrentMonth(month); +// return validMonth && getNbTidesEstimated(month) != null; +// } } public static class ObsMerSamplingPlanStatistics implements Serializable { Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-03-31 15:36:31 UTC (rev 1782) @@ -133,7 +133,8 @@ */ protected Map<Date, MutableInt> totalRealForMonths; - public ObsMerSamplingPlanBuilder(Locale locale, SampleRowsFilter sampleRowsFilter) { + public ObsMerSamplingPlanBuilder(Locale locale, + SampleRowsFilter sampleRowsFilter) { this.sampleRowsFilter = sampleRowsFilter; this.sampleRowsFilterValues = new SampleRowsFilterValues(locale); this.facadeMap = new TreeMap<>(); @@ -173,7 +174,8 @@ Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> nbTidesPerMonth = computeNbTidesPerMonth(sampleRow); // add sample row - sectorPart.addSampleRow(sampleRow, + sectorPart.addSampleRow(sampleRowsFilterValues.getLocale(), + sampleRow, nbTidesPerMonth, observationTimesInDaysExpected, observationTimesInDaysReal, @@ -324,14 +326,16 @@ this.rows = new ArrayList<>(); } - protected ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart addSampleRow(SampleRow row, + protected ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart addSampleRow(Locale locale, + SampleRow row, Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> nbTidesPerMonth, Double observationTimesInDaysExpected, Long observationTimesInDaysReal, Long observationTimesInDaysEstimated) { ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart rowPart = - new ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart(nbTidesPerMonth, + new ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart(locale, + nbTidesPerMonth, row, observationTimesInDaysExpected, observationTimesInDaysReal, Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java 2014-03-31 15:36:31 UTC (rev 1782) @@ -21,6 +21,7 @@ * #L% */ +import fr.ifremer.wao.WaoUtils; import fr.ifremer.wao.entity.ObsProgram; import fr.ifremer.wao.services.AuthenticatedWaoUser; @@ -63,7 +64,7 @@ } public String formatMonth(Date date) { - return t("wao.ui.misc.month", date); + return WaoUtils.formatMonth(getLocale(), date); } public boolean isGoogleAnalyticsEnabled() { Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/MonthConverter.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/MonthConverter.java 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/MonthConverter.java 2014-03-31 15:36:31 UTC (rev 1782) @@ -21,18 +21,26 @@ * #L% */ +import com.google.common.base.Preconditions; +import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.conversion.TypeConversionException; import fr.ifremer.wao.WaoUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.struts2.util.StrutsTypeConverter; import java.text.ParseException; import java.util.Arrays; import java.util.Date; +import java.util.Locale; import java.util.Map; public class MonthConverter extends StrutsTypeConverter { + /** Logger. */ + private static final Log log = LogFactory.getLog(MonthConverter.class); + @Override public Date convertFromString(Map map, String[] strings, Class aClass) { @@ -48,9 +56,15 @@ } else { + Locale locale = (Locale) map.get(ActionContext.LOCALE); + Preconditions.checkNotNull(locale, "No locale found in ActionContext"); try { - parsedValue = WaoUtils.parseMonth(string); + parsedValue = WaoUtils.parseMonth(locale, string); } catch (ParseException e) { + if (log.isErrorEnabled()) { + log.error("Could not format parse date " + string, e); + } + //FIXME Find out why we don't see the error throw new TypeConversionException("strings=" + Arrays.toString(strings)); } @@ -79,8 +93,9 @@ Date date = (Date) o; - str = WaoUtils.formatMonth(date); - + Locale locale = (Locale) map.get(ActionContext.LOCALE); + Preconditions.checkNotNull(locale, "No locale found in ActionContext"); + str = WaoUtils.formatMonth(locale, date); } else { throw new UnsupportedOperationException("cannot convert to month " + o); } Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java 2014-03-31 15:36:31 UTC (rev 1782) @@ -27,7 +27,11 @@ import fr.ifremer.wao.services.service.ObsMerSamplingPlanService; import fr.ifremer.wao.services.service.SampleRowsFilterValues; import fr.ifremer.wao.web.WaoJspActionSupport; +import org.apache.commons.lang3.time.DateUtils; +import java.text.SimpleDateFormat; +import java.util.Date; + public class SamplingPlanAction extends WaoJspActionSupport implements Preparable { private static final long serialVersionUID = 1L; @@ -38,6 +42,8 @@ protected ObsMerSamplingPlan samplingPlan; + private Date now; + public void setService(ObsMerSamplingPlanService service) { this.service = service; } @@ -52,6 +58,7 @@ @Override public void prepare() { + now = new Date(); filter = service.newSampleRowsFilter(getAuthenticatedWaoUser()); } @@ -81,4 +88,23 @@ boolean fullView = getAuthenticatedWaoUser().isAdmin() || getAuthenticatedWaoUser().isProfessional(); return fullView; } + + protected SimpleDateFormat dateFormat = new SimpleDateFormat("MM/yyyy"); + + public boolean isCurrentMonth(Date month) { + + String currentStr = dateFormat.format(now); + String monthStr = dateFormat.format(month); + return currentStr.equals(monthStr); + } + + public String getFilterPeriodFromPlaceholder() { + String placeholder = formatMonth(DateUtils.addMonths(now, 1)); + return placeholder; + } + + public String getFilterPeriodToPlaceholder() { + String placeholder = formatMonth(DateUtils.addYears(now, 1)); + return placeholder; + } } Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties =================================================================== --- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-03-31 15:36:31 UTC (rev 1782) @@ -80,6 +80,7 @@ wao.ui.action.viewIndicatorsHistory=View indicators historic wao.ui.action.viewReal=View real observation effort wao.ui.action.viewSampleRowLog=View sample row log +wao.ui.action.zoomOnSampleRowPeriod=Use as filter dates the one of this sample row wao.ui.actions=Actions wao.ui.boatList=List of %s boats wao.ui.boatinfo.title=Infos about %s @@ -344,7 +345,6 @@ wao.ui.misc.information=Information wao.ui.misc.infosAbout=Infos about %s wao.ui.misc.logFile.description=Show log file for %s -wao.ui.misc.month=%1$tm-%1$tY wao.ui.misc.no=no wao.ui.misc.noComment=no comment wao.ui.misc.notValidated=Not validated Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties =================================================================== --- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-03-31 15:36:31 UTC (rev 1782) @@ -80,6 +80,7 @@ wao.ui.action.viewIndicatorsHistory=Voir l'historique des modifications des indicateurs wao.ui.action.viewReal=Voir l'effort d'observation réalisé wao.ui.action.viewSampleRowLog=Consulter l'historique de cette ligne +wao.ui.action.zoomOnSampleRowPeriod=Changer les dates de la période par rapport à celles de la ligne wao.ui.actions=Actions wao.ui.boatList=Liste de %s navires wao.ui.boatinfo.title=Informations sur %s @@ -344,7 +345,6 @@ wao.ui.misc.information=Informations wao.ui.misc.infosAbout=Informations sur %s wao.ui.misc.logFile.description=Afficher le fichier de log de %s -wao.ui.misc.month=%1$tm/%1$tY wao.ui.misc.no=Non wao.ui.misc.noComment=aucun commentaire wao.ui.misc.notValidated=Non validé Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-31 15:36:31 UTC (rev 1782) @@ -37,8 +37,6 @@ var sampleRowsFilterController = new SampleRowsFilterController(SAMPLE_ROWS_FILTER_VALUES_JSON_URL, $('#sampling-plan-filters-form')); sampleRowsFilterController.init(); - var fullView = <s:property value="fullView" />; - $('#switch-estimated-real').click(function () { $('#switch-estimated-real').toggleClass('show-estimated').toggleClass('show-real'); $('table.sampling-plan').toggleClass('show-estimated').toggleClass('show-real'); @@ -64,12 +62,12 @@ <s:textfield name="filter.periodFrom" label="%{getText('wao.ui.form.periodFrom')}" - placeholder="04/2014" + placeholder="%{getFilterPeriodFromPlaceholder()}" cssClass="input-small" /> <s:textfield name="filter.periodTo" label="%{getText('wao.ui.form.period.to')}" - placeholder="03/2015" + placeholder="%{getFilterPeriodToPlaceholder()}" cssClass="input-small" /> </fieldset> @@ -253,7 +251,7 @@ <!-- Months columns --> <s:iterator value="samplingPlan.months" var="month"> - <th class="effort <s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> now</s:if>"> + <th class="effort <s:if test="isCurrentMonth(#month)"> now</s:if>"> <s:property value="%{formatMonth(#month)}"/> </th> </s:iterator> @@ -353,7 +351,7 @@ <s:set var="expected" value="%{getNbTidesExpected(#month)}"/> <s:set var="estimated" value="%{getNbTidesEstimated(#month)}"/> <s:set var="real" value="%{getNbTidesReal(#month)}"/> - <td class="effort <s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> now</s:if><s:if test="#estimated != #real"> estimated-differ-from-real</s:if>"> + <td class="effort <s:if test="isCurrentMonth(#month)"> now</s:if><s:if test="#estimated != #real"> estimated-differ-from-real</s:if>"> <s:if test="#expected != null"> <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal"> <span class="estimated<s:if test="#estimated < #expected"> lower-than-expected</s:if><s:if test="#estimated > #expected"> higher-than-expected</s:if>"> @@ -434,7 +432,7 @@ </li> <li> <s:url action="delete-sample-row" id="deleteSampleRowUrl"> - <s:param name="companyId" value="sampleRowId" /> + <s:param name="sampleRowId" value="sampleRowId" /> </s:url> <s:a href="%{deleteSampleRowUrl}"> <i class="icon-trash"></i> <s:text name="wao.ui.action.delete" /> @@ -450,6 +448,22 @@ </s:a> </li> <li> + <s:url action="sampling-plan" id="sampleRowZoomUrl"> + <s:param name="filter.periodFrom" value="%{formatMonth(firstSampleMonthDate)}"/> + <s:param name="filter.periodTo" value="%{formatMonth(lastSampleMonthDate)}"/> + <s:param name="filter.companyIds" value="%{filter.companyIds}"/> + <s:param name="filter.programNames" value="%{filter.programNames}"/> + <s:param name="filter.sampleRowCodes" value="%{filter.sampleRowCodes}"/> + <s:param name="filter.fishingZoneFacadeNames" value="%{filter.targetSpeciesDcfIds}"/> + <s:param name="filter.fishingZoneSectorNames" value="%{filter.targetSpeciesDcfIds}"/> + <s:param name="filter.fishingGearDcfIds" value="%{filter.targetSpeciesDcfIds}"/> + <s:param name="filter.targetSpeciesDcfIds" value="%{filter.targetSpeciesDcfIds}"/> + </s:url> + <s:a href="%{sampleRowZoomUrl}"> + <!--i class="icon-time"></i--> <s:text name="wao.ui.action.zoomOnSampleRowPeriod" /> + </s:a> + </li> + <li> <s:url action="boats" id="viewElligibleBoatsUrl"> <s:param name="sampleRowIds" value="sampleRowId" /> </s:url> @@ -496,7 +510,7 @@ </th> <!-- Months columns --> <s:iterator value="samplingPlan.months" var="month"> - <td class="effort<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> now</s:if>"> + <td class="effort<s:if test="isCurrentMonth(#month)"> now</s:if>"> <s:set var="expected" value="%{samplingPlan.getTotalExpected(#month)}"/> <s:set var="estimated" value="%{samplingPlan.getTotalEstimated(#month)}"/> <s:set var="real" value="%{samplingPlan.getTotalReal(#month)}"/> Modified: trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-31 15:20:49 UTC (rev 1781) +++ trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-31 15:36:31 UTC (rev 1782) @@ -131,7 +131,7 @@ </a> <ul class="dropdown-menu"> <li> - <s:url id="changeLocaleUrl"> + <s:url id="changeLocaleUrl" includeParams="get"> <s:param name="request_locale"> <s:if test="\"fr\".equals(locale.toLanguageTag())"> en