Author: lkaufmann Date: 2014-05-16 15:29:12 +0200 (Fri, 16 May 2014) New Revision: 1949 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1949 Log: Refs #4997 Change date display in sampling plan table 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-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp trunk/wao-web/src/main/webapp/wao.css Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java 2014-05-16 10:19:41 UTC (rev 1948) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java 2014-05-16 13:29:12 UTC (rev 1949) @@ -43,6 +43,12 @@ protected static final String MONTH_PATTERN = "MM/yyyy"; @Deprecated + protected static final String MONTH_ONLY_PATTERN = "MM"; + + @Deprecated + protected static final String YEAR_ONLY_PATTERN = "yyyy"; + + @Deprecated protected static final String DATE_PATTERN = "dd/MM/yyyy"; @Deprecated @@ -92,6 +98,14 @@ public static String formatMonth(Locale locale, Date date) { return I18n.l(locale, "wao.month.formatter", date); } + + public static String formatDateMonth(Locale locale, Date date) { + return I18n.l(locale, "wao.datemonth.formatter", date); + } + + public static String formatDateYear(Locale locale, Date date) { + return I18n.l(locale, "wao.dateyear.formatter", date); + } public static Date parseMonth(Locale locale, String monthYear) throws ParseException { String pattern = I18n.l(locale, "wao.month.parser"); 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-05-16 10:19:41 UTC (rev 1948) +++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-05-16 13:29:12 UTC (rev 1949) @@ -140,8 +140,10 @@ wao.business.other= wao.date.formatter=%1$td-%1$tm-%1$tY wao.date.parser=dd-MM-yyyy +wao.datemonth.formatter=%1$tm wao.datetime.formatter=%1$td-%1$tm-%1$tY %1$tH\:%1$tM wao.datetime.parser=dd-MM-yyyy HH\:mm +wao.dateyear.formatter=%1$tY wao.month.formatter=%1$tm-%1$tY wao.month.parser=MM-yyyy wao.time.formatter=%1$tH\:%1$tM 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-05-16 10:19:41 UTC (rev 1948) +++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-05-16 13:29:12 UTC (rev 1949) @@ -139,8 +139,10 @@ wao.business.other= wao.date.formatter=%1$td/%1$tm/%1$tY wao.date.parser=dd/MM/yyyy +wao.datemonth.formatter=%1$tm wao.datetime.formatter=%1$td/%1$tm/%1$tY %1$tH\:%1$tM wao.datetime.parser=dd/MM/yyyy HH\:mm +wao.dateyear.formatter=%1$tY wao.month.formatter=%1$tm/%1$tY wao.month.parser=MM/yyyy wao.month.pattern=MM/yyyy 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-05-16 10:19:41 UTC (rev 1948) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoJspActionSupport.java 2014-05-16 13:29:12 UTC (rev 1949) @@ -72,6 +72,14 @@ return date == null ? "" : WaoUtils.formatDate(getLocale(), date); } + public String formatDateMonth(Date date) { + return date == null ? "" : WaoUtils.formatDateMonth(getLocale(), date); + } + + public String formatDateYear(Date date) { + return date == null ? "" : WaoUtils.formatDateYear(getLocale(), date); + } + public String formatDateTime(Date date) { return date == null ? "" : WaoUtils.formatDateTime(getLocale(), date); } 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-05-16 10:19:41 UTC (rev 1948) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-05-16 13:29:12 UTC (rev 1949) @@ -294,7 +294,8 @@ <!-- Months columns --> <s:iterator value="samplingPlan.months" var="month"> <th class="effort <s:if test="isCurrentMonth(#month)"> now</s:if>"> - <s:property value="%{formatMonth(#month)}"/> + <span class="month"><s:property value="%{formatDateMonth(#month)}"/></span> + <span class="year"><s:property value="%{formatDateYear(#month)}"/></span> </th> </s:iterator> <th><s:text name="wao.ui.misc.total"/></th> Modified: trunk/wao-web/src/main/webapp/wao.css =================================================================== --- trunk/wao-web/src/main/webapp/wao.css 2014-05-16 10:19:41 UTC (rev 1948) +++ trunk/wao-web/src/main/webapp/wao.css 2014-05-16 13:29:12 UTC (rev 1949) @@ -272,6 +272,17 @@ font-size:24px; } +h3 { + background: none repeat scroll 0 0 #E5E5E5; + border-bottom: 1px solid #CCCCCC; + font-family: 'Roboto',sans-serif; + font-size: 18px; + font-weight: normal; + line-height: normal; + margin: 15px 0 5px; + padding: 5px 10px; +} + /** * .large-table */ @@ -295,9 +306,9 @@ padding: 2px; } .large-table thead th { - border: 1px solid #666; - color: #EEE; - background-color: #888; + border: 1px solid #444; + color: #FFF; + background-color: #777; padding: 10px 0; } @@ -311,6 +322,7 @@ color: #b2f0b2; letter-spacing: 0.5px; text-transform: uppercase; + background-color: #666; } /* @@ -332,13 +344,16 @@ </th> */ -.effort.now .mois { - font-size: 24px; +.effort .month { + font-size: 21px; letter-spacing: 1px; display: block; } +.effort .year { + color: #DDD; + padding: 0 3px; +} - /** * Les filtres */ @@ -353,7 +368,8 @@ margin-left: 5px; margin-right: 5px; } -#sampling-plan-filters-form{ +#sampling-plan-filters-form, +#contacts-filters-form { padding-top:20px; background:#f5f5f5 url(images/bg-filtres.jpg) repeat-x 0 bottom; border-bottom:1px solid #CCC; @@ -410,9 +426,11 @@ background: rgba(0,0,0,0.45); color: #FFF; outline: none; + display: block; + margin: 3px 0 0 0; } .sticky-buttons button.btn:hover { - background: rgba(0,0,0,0.65); + background: rgba(0,0,0,0.75); } .sticky-buttons button.btn i.fa { font-size: 18px; @@ -541,6 +559,8 @@ justify-content: space-around; align-items: stretch; flex-wrap: nowrap; + background-color: #F6F6F6; + border-bottom: 1px solid #EEEEEE; } #boats-filters-list-details-layout > div { @@ -667,7 +687,8 @@ /** * Form edition */ -main.form > form { +main.form > form, +main.form > .form-wrapper { background-color: #FFF; border-left: 1px solid #BBB; border-right: 1px solid #BBB; @@ -686,19 +707,24 @@ border-right: 1px solid #BBB; } -main.form form h1 { +main.form form h1, +main.form .form-wrapper h1 { padding: 5px 20px; border-bottom: 2px solid #00B2B2; } main.form form .control-group, -main.form form legend { +main.form .form-wrapper .control-group, +main.form form legend, +main.form .form-wrapper legend{ padding: 0 20px; } -main.form form .form-actions { +main.form form .form-actions, +main.form .form-wrapper .form-actions{ margin: 20px 0 0 0; } -main.form form .form-actions button.btn { +main.form form .form-actions button.btn, +main.form .form-wrapper .form-actions button.btn { float: right; }