[Suiviobsmer-commits] r701 - in trunk: wao-business/src/main/java/fr/ifremer/wao/service wao-business/src/main/resources/i18n wao-business/src/main/xmi wao-ui/src/main/java/fr/ifremer/wao/ui/pages wao-ui/src/main/webapp
Author: bleny Date: 2010-10-21 14:51:31 +0000 (Thu, 21 Oct 2010) New Revision: 701 Log: added filter on all synthesis ; saving before refactor (break the build) Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties trunk/wao-business/src/main/xmi/wao.zargo trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java trunk/wao-ui/src/main/webapp/Synthesis.tml Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java 2010-10-21 10:21:30 UTC (rev 700) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java 2010-10-21 14:51:31 UTC (rev 701) @@ -175,22 +175,21 @@ * results since this date. For observer view, only results for his * company is needed. * - * @param company the company used to filter results - * @param fromDate the since date used to filter contact results * @return a BoardingResult which contains the number of boats for boardings * from 1 to {@code MAX_BOARDINGS}, the boat with the max boarding and its * value. * @throws WaoException */ - @Override + @Deprecated public BoardingResult executeGetBoardingBoats(TopiaContext transaction, - Company company, Date fromDate) - throws TopiaException { + Company company, + Date fromDate) + throws TopiaException { Map<String, Integer> map = new LinkedHashMap<String, Integer>(); BoardingResult result = new BoardingResultImpl(); result.setData(map); - // Initialiaze max boardings and its max key value + // Initialize max boardings and its max key value final int maxBoardings = 12; final String maxBoardingsKey = maxBoardings + " +"; @@ -201,13 +200,11 @@ } map.put(maxBoardingsKey, 0); - ContactDAO dao = - WaoDAOHelper.getContactDAO(transaction); + ContactDAO dao = WaoDAOHelper.getContactDAO(transaction); // The number of boardings is the number of finished contacts // Use fromDate to filter contacts finished from this date // No need to use boat filter for this method - TopiaQuery query = - dao.createQueryDoneContactsFromDate(null, fromDate); + TopiaQuery query = dao.createQueryDoneContactsFromDate(null, fromDate); String contact = query.getMainAlias(); String sampleRow = contact + "." + Contact.SAMPLE_ROW; @@ -260,7 +257,83 @@ return result; } + @Override + public BoardingResult executeGetBoardingBoats(TopiaContext transaction, + SamplingFilter filter) + throws TopiaException { + Map<String, Integer> map = new LinkedHashMap<String, Integer>(); + BoardingResult result = new BoardingResultImpl(); + result.setData(map); + // Initialize max boardings and its max key value + final int maxBoardings = 12; + final String maxBoardingsKey = maxBoardings + " +"; + + // Prepare map which contains for each entry the number of boardings + // for the key and the number of boats for the value. + for (int i = 1; i < maxBoardings; i++) { + map.put(String.valueOf(i), 0); + } + map.put(maxBoardingsKey, 0); + + // The number of boardings is the number of finished contacts + // Use fromDate to filter contacts finished from this date + // No need to use boat filter for this method + WaoQueryBuilder builder = context.newQueryBuilder(); + ContactProperty contactProperty = builder.initializeForContact(); + TopiaQuery query = builder.applySamplingFilter(filter). + addEquals(contactProperty.state(), ContactState.BOARDING_DONE.ordinal()). + addEquals(contactProperty.validationCompany(), Boolean.TRUE). + addNullOr(contactProperty.validationProgram(), Op.EQ, Boolean.TRUE); + + String contact = query.getMainAlias(); + String sampleRow = contact + "." + Contact.SAMPLE_ROW; + + // Only for sampleRows with averageTideTime less or equals to 2 days + query.addWhere(sampleRow + "." + SampleRow.AVERAGE_TIDE_TIME, Op.LE, 2.); + + // Prepare aliases for mapping results in select part + String countAlias = "nbBoardings"; + String boatAlias = "boat"; + // Use a map for each result with boat and its number of boardings + // Order by number of boardings to easily find the max value (the + // first result) + query.setSelect("new map(" + contact + "." + Contact.BOAT + " as " + + boatAlias + ", COUNT(*) as " + countAlias + ")"). + addGroup(contact + "." + Contact.BOAT). + addOrderDesc("COUNT(*)"); + + if (log.isTraceEnabled()) { + log.trace("Exec query : " + query); + } + + List<Map<String, Object>> nbBoardingsByBoat = transaction.findByQuery(query); + + if (!nbBoardingsByBoat.isEmpty()) { + for (Map<String, Object> row : nbBoardingsByBoat) { + Long count = (Long)row.get(countAlias); + int intValue = count.intValue(); + String value = count.toString(); + if (intValue >= maxBoardings) { + value = maxBoardingsKey; + } + // Increment the number of boats for the current number of + // boardings + Integer nbBoats = map.get(value); + map.put(value, nbBoats + 1); + } + + // Set the max boat and its number of boardings value + Map<String, Object> max = nbBoardingsByBoat.get(0); + result.setMaxBoardingBoat((Boat)max.get(boatAlias)); + Long maxValue = (Long)max.get(countAlias); + result.setMaxBoardingValue(maxValue.intValue()); + } + return result; + } + + + @Deprecated public Map<String, Double> executeGetNonComplianceBoardingIndicator( TopiaContext transaction, Company company) throws TopiaException { @@ -353,7 +426,104 @@ return results; } - @Override + public Map<String, Double> executeGetNonComplianceBoardingIndicator( + TopiaContext transaction, SamplingFilter filter) throws TopiaException { + + // Carefull with results, the company may not be present in the map : + // only if there is no unfinished sampleRow or no contact done + Map<String, Double> results = new HashMap<String, Double>(); + + ContactDAO dao = WaoDAOHelper.getContactDAO(transaction); + + + WaoQueryBuilder builder = context.newQueryBuilder(); + ContactProperty contactProperty = builder.initializeForContact(); + TopiaQuery query = builder.applySamplingFilter(filter). + addEquals(contactProperty.state(), ContactState.BOARDING_DONE.ordinal()). + addEquals(contactProperty.validationCompany(), Boolean.TRUE). + addNullOr(contactProperty.validationProgram(), Op.EQ, Boolean.TRUE); + + + // Only for done contacts with no constraint + // TopiaQuery query = + // dao.createQueryDoneContactsFromDate(null, null); + + // Prepare properties for query + String contactAlias = query.getMainAlias(); + String sampleRowProperty = + TopiaQuery.getProperty(contactAlias, Contact.SAMPLE_ROW); + String nbObservantsRealProperty = + TopiaQuery.getProperty(contactAlias, Contact.NB_OBSERVANTS); + + String sampleRowEndProperty = + TopiaQuery.getProperty(sampleRowProperty, SampleRow.PERIOD_END); + String companyProperty = + TopiaQuery.getProperty(sampleRowProperty, SampleRow.COMPANY); + String nbObservantsExpectedProperty = + TopiaQuery.getProperty(sampleRowProperty, SampleRow.NB_OBSERVANTS); + + String companyNameProperty = + TopiaQuery.getProperty(companyProperty, Company.NAME); + + // Only for unfinished sampleRows + query.addWhere(sampleRowEndProperty, Op.GE, context.getCurrentDate()); + + // Prepare results + query.setSelect(companyNameProperty, "COUNT(*)"). + addGroup(companyNameProperty); + + if (log.isDebugEnabled()) { + log.debug("Query for total : " + query); + } + + List<Object[]> totalResults = transaction.findByQuery(query); + + // Use the same query and add the constraint of non compliance + //i.e. nbObservantsReal (contact) < nbObservantsExpected (sampleRow) +// query.addWhere(contact + "." + Contact.NB_OBSERVANTS + " < " + +// sampleRow + "." + SampleRow.NB_OBSERVANTS); + query.addWhere(new StringBuilder(nbObservantsRealProperty). + append(" < "). + append(nbObservantsExpectedProperty). + toString() + ); + + if (log.isDebugEnabled()) { + log.debug("Query for result : " + query); + } + + List<Object[]> diffResults = transaction.findByQuery(query); + + // Use the map to set the number of non compliance results + for (Object[] row : diffResults) { + String rowCompanyName = (String)row[0]; + Long rowCount = (Long)row[1]; + if (log.isDebugEnabled()) { + log.debug("result row : " + rowCompanyName + " = " + rowCount); + } + results.put(rowCompanyName, rowCount.doubleValue()); + } + + // Get the previous value from the map and make the division to have + // the result percent of non compliance. Put 0 in the map if no + // previous result is set + for (Object[] row : totalResults) { + String rowCompanyName = (String)row[0]; + Long rowCount = (Long)row[1]; + if (log.isDebugEnabled()) { + log.debug("total row : " + rowCompanyName + " = " + rowCount); + } + Double value = results.get(rowCompanyName); + if (value == null) { + results.put(rowCompanyName, 0.); + } else { + results.put(rowCompanyName, value / rowCount); + } + } + return results; + } + + @Deprecated protected Map<String, Double> executeGetComplianceBoardingIndicator( TopiaContext transaction, Company company) throws Exception { // here, we need compliance, so we get non-compliance values @@ -372,6 +542,24 @@ } @Override + protected Map<String, Double> executeGetComplianceBoardingIndicator( + TopiaContext transaction, SamplingFilter filter) throws Exception { + // here, we need compliance, so we get non-compliance values + // and we make the operation to switch + + Map<String, Double> nonCompliances = executeGetNonComplianceBoardingIndicator(transaction, filter); + Map<String, Double> compliances = new HashMap<String, Double>(); + + // make the switch, fill compliances with data from nonCompliances + for (Map.Entry<String, Double> nonCompliance : nonCompliances.entrySet()) { + Double compliance = 1.0 - nonCompliance.getValue(); + compliances.put(nonCompliance.getKey(), compliance); + } + + return compliances; + } + + @Deprecated public Collection<ContactStateStatistics> executeGetContactStateStatistics( TopiaContext transaction, Company company, PeriodDates period) throws TopiaException { @@ -502,7 +690,67 @@ } @Override - public Collection<ContactAverageReactivity> + public Collection<ContactStateStatistics> executeGetContactStateStatistics + (TopiaContext transaction, SamplingFilter filter) + throws TopiaException { + + WaoQueryBuilder builder = context.newQueryBuilder(); + ContactProperty contactProperty = builder.initializeForContact(); + TopiaQuery query = builder.applySamplingFilter(filter). + addNullOr(contactProperty.validationProgram(), Op.EQ, Boolean.TRUE); + + WaoQueryHelper.CompanyProperty companyProperty = + contactProperty.observerProperty().companyProperty(); + + Company company = filter.getCompany(); + if (company != null) { + query.addEquals(companyProperty.$alias(), company); + } + + PeriodDates period = filter.getPeriod(); + if (period != null) { + // Contacts include in the period + period.initDayOfMonthExtremities(); + + query.addWhere(WaoQueryHelper.format( + "($1 IS NOT NULL AND $1 BETWEEN :fromDate AND :thruDate)" + + " OR ($1 IS NULL AND $2 BETWEEN :fromDate AND :thruDate)", + contactProperty.tideBeginDate(), + contactProperty.topiaCreateDate()) + ).addParam("fromDate", period.getFromDate()). + addParam("thruDate", period.getThruDate()); + } + + query.addGroup(companyProperty.name(), contactProperty.state()). + addOrder(companyProperty.name()). + setSelect(companyProperty.name(), contactProperty.state(), "COUNT(*)"); + + Map<String, ContactStateStatistics> results = new HashMap<String, ContactStateStatistics>(); + + List<Object[]> queryResults = transaction.findByQuery(query); + + for (Object[] row : queryResults) { + String rowCompanyName = (String)row[0]; + int rowState = (Integer)row[1]; + ContactState state = ContactState.valueOf(rowState); + Long rowCount = (Long)row[2]; + if (log.isDebugEnabled()) { + log.debug("res : " + rowCompanyName + " _ " + state + " _ " + rowCount); + } + ContactStateStatistics stats = results.get(rowCompanyName); + if (stats == null) { + stats = new ContactStateStatisticsImpl(); + stats.setCompanyName(rowCompanyName); + results.put(rowCompanyName, stats); + } + stats.addResult(state, rowCount.intValue()); + } + + return results.values(); + } + + @Deprecated + public Collection<ContactAverageReactivity> executeGetContactDataInputDateReactivity(TopiaContext transaction, Company company, PeriodDates period) throws TopiaException { // Carefull with results, the company may not be present in the map : @@ -568,6 +816,88 @@ } @Override + public Collection<ContactAverageReactivity> + executeGetContactDataInputDateReactivity(TopiaContext transaction, + SamplingFilter filter) throws TopiaException { + + if (filter.getPeriod() == null) { + filter.setPeriod(PeriodDates.createMonthsPeriodFromToday(-3)); + } + + + WaoQueryBuilder builder = context.newQueryBuilder(); + ContactProperty contactProperty = builder.initializeForContact(); + TopiaQuery query = builder.applySamplingFilter(filter). + addEquals(contactProperty.state(), ContactState.BOARDING_DONE.ordinal()). + addEquals(contactProperty.validationCompany(), Boolean.TRUE). + addNullOr(contactProperty.validationProgram(), Op.EQ, Boolean.TRUE); + + + // Carefull with results, the company may not be present in the map : + // only if there is no unfinished sampleRow or no contact done + + Map<String, ContactAverageReactivity> results = new HashMap<String, ContactAverageReactivity>(); + + ContactDAO dao = WaoDAOHelper.getContactDAO(transaction); + + //TopiaQuery query = dao.createQueryDoneContactsFromDate(null, period.getFromDate()); + + String contactAlias = query.getMainAlias(); + String companyProperty = + TopiaQuery.getProperty(contactAlias, Contact.OBSERVER, WaoUser.COMPANY); + String companyNameProperty = + TopiaQuery.getProperty(companyProperty, Company.NAME); + String tideBeginDateProperty = + TopiaQuery.getProperty(contactAlias, Contact.TIDE_BEGIN_DATE); + String dataInputProperty = + TopiaQuery.getProperty(contactAlias, Contact.DATA_INPUT_DATE); + + Company company = filter.getCompany(); + if (company != null) { + query.addEquals(companyProperty, company); + } + //period.initDayOfMonthExtremities(); + + PeriodDates period = filter.getPeriod(); + if (period.getThruDate() != null) { + query.addWhere(tideBeginDateProperty, Op.LE, period.getThruDate()); + } + + query.setSelect(companyNameProperty, dataInputProperty, tideBeginDateProperty); + + if (log.isDebugEnabled()) { + log.debug("Query : " + query); + } + + List<Object[]> res = transaction.findByQuery(query); + + for (Object[] row : res) { + String rowCompanyName = (String)row[0]; + Date rowDataInputDate = (Date)row[1]; + Date rowTideBeginDate = (Date)row[2]; + + int nbDays = DateUtil.getDifferenceInDays(rowTideBeginDate, rowDataInputDate); + + if (log.isDebugEnabled()) { + log.debug("Company : " + rowCompanyName); + log.debug("tideBegin : " + rowTideBeginDate); + log.debug("dataInput : " + rowDataInputDate); + log.debug("nbDays : " + nbDays); + } + + ContactAverageReactivity avg = results.get(rowCompanyName); + if (avg == null) { + avg = new ContactAverageReactivityImpl(); + avg.setCompanyName(rowCompanyName); + results.put(rowCompanyName, avg); + } + + avg.addValue(nbDays); + } + return results.values(); + } + + @Override public Map<String, PieChartData> executeGetContactPieChartDataByBoatDistrict( TopiaContext transaction, ContactFilter filter) throws TopiaException { @@ -652,6 +982,16 @@ return results; } + @Override + protected Map<Company, Double> executeGetDataReliability + (TopiaContext transaction, SamplingFilter filter) throws Exception { + + log.debug("period " + filter.getPeriod()); + + return null; + + } + protected Double getIndicatorValueForDataSampling (TopiaContext transaction, SamplingFilter filter) { @@ -690,9 +1030,9 @@ } protected Double getIndicatorValueForBoarding - (TopiaContext transaction, Company company, Date fromDate) { + (TopiaContext transaction, SamplingFilter filter) { - BoardingResult boardingResult = getBoardingBoats(company, fromDate); + BoardingResult boardingResult = getBoardingBoats(filter); int numberOfBoatWithOneBoarding = boardingResult.getData().get("1"); int totalNumberOfBoarding = 0; @@ -705,8 +1045,8 @@ } protected Double getIndicatorValueForComplianceBoarding - (TopiaContext transaction, Company company) { - Map<String, Double> complianceBoarding = getComplianceBoardingIndicator(company); + (TopiaContext transaction, SamplingFilter filter) { + Map<String, Double> complianceBoarding = getComplianceBoardingIndicator(filter); double total = 0.0; int numberOfCompanies = complianceBoarding.size(); for (Double compliance : complianceBoarding.values()) { @@ -717,8 +1057,9 @@ } protected Double getIndicatorValueForAllegroReactivity - (TopiaContext transaction, Company company, PeriodDates periodDates) { - Collection<ContactAverageReactivity> allegroReactivity = getContactDataInputDateReactivity(company, periodDates); + (TopiaContext transaction, SamplingFilter filter) { + Collection<ContactAverageReactivity> allegroReactivity = + getContactDataInputDateReactivity(filter); double sumAverages = 0.0; for (ContactAverageReactivity reactivity : allegroReactivity) { @@ -732,8 +1073,8 @@ @Override protected GlobalSynthesisResult executeGetGlobalSynthesisResult - (TopiaContext transaction, Company company, PeriodDates period) - throws Exception { + (TopiaContext transaction, Company company, PeriodDates period, + SamplingFilter filter) throws Exception { Double value = 30.0; Map<SynthesisId, Double> indicatorValues = new HashMap<SynthesisId, Double>(); @@ -744,10 +1085,10 @@ // value = getIndicatorValueForBoarding(transaction, company, fromDate); indicatorValues.put(SynthesisId.GRAPH_BOARDING, value); - value = getIndicatorValueForComplianceBoarding(transaction, company); + value = getIndicatorValueForComplianceBoarding(transaction, filter); indicatorValues.put(SynthesisId.IND_COMPLIANCE_BOARDING, value); - value = getIndicatorValueForAllegroReactivity(transaction, company, period); + value = getIndicatorValueForAllegroReactivity(transaction, filter); indicatorValues.put(SynthesisId.IND_ALLEGRO_REACTIVITY, value); // add data reliability indicator here Modified: trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties =================================================================== --- trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties 2010-10-21 10:21:30 UTC (rev 700) +++ trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties 2010-10-21 14:51:31 UTC (rev 701) @@ -79,6 +79,7 @@ wao.error.serviceSynthesis.getContactPieChartData= wao.error.serviceSynthesis.getContactPieChartDataByBoatDistrict= wao.error.serviceSynthesis.getContactStateStatistics= +wao.error.serviceSynthesis.getDataReliability= wao.error.serviceSynthesis.getDataSampling= wao.error.serviceSynthesis.getGlobalSynthesisParameters=Unable to get data about global synthesis parameters wao.error.serviceSynthesis.getGlobalSynthesisResult= Modified: trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties =================================================================== --- trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties 2010-10-21 10:21:30 UTC (rev 700) +++ trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties 2010-10-21 14:51:31 UTC (rev 701) @@ -78,6 +78,7 @@ wao.error.serviceSynthesis.getContactPieChartData= wao.error.serviceSynthesis.getContactPieChartDataByBoatDistrict= wao.error.serviceSynthesis.getContactStateStatistics=Impossible de r\u00E9cup\u00E9rer les statistiques sur les \u00E9tats des contacts +wao.error.serviceSynthesis.getDataReliability= wao.error.serviceSynthesis.getDataSampling=Impossible de r\u00E9cup\u00E9rer les donn\u00E9es pour le graphique dynamique des efforts de mar\u00E9es wao.error.serviceSynthesis.getGlobalSynthesisParameters=Impossible de r\u00E9cup\u00E9rer les donn\u00E9es concernant les indicateurs pour la synth\u00E8se globale wao.error.serviceSynthesis.getGlobalSynthesisResult= Modified: trunk/wao-business/src/main/xmi/wao.zargo =================================================================== (Binary files differ) Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-10-21 10:21:30 UTC (rev 700) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-10-21 14:51:31 UTC (rev 701) @@ -151,7 +151,7 @@ PeriodDates period = PeriodDates.createMonthsPeriodFromToday(-12); Company company = !user.isAdmin() ? user.getCompany() : null; globalSynthesisResult = serviceSynthesis.getGlobalSynthesisResult( - company, period); + company, period, getFilter()); } return globalSynthesisResult; } @@ -294,7 +294,7 @@ return this; } - /********************* STATIC GRAPH : BOARDINGBOAT ************************/ + /********************* STATIC GRAPH : BOARDING BOAT ***********************/ private BoardingResult boardingResult; @@ -335,8 +335,7 @@ public BoardingResult getBoardingResult() throws WaoException { if (boardingResult == null) { - boardingResult = serviceSynthesis.getBoardingBoats( - getCompanyForBoarding(), getFromDate()); + boardingResult = serviceSynthesis.getBoardingBoats(getFilter()); } return boardingResult; } @@ -381,7 +380,7 @@ if (complianceBoarding == null) { Company company = !user.isAdmin() ? user.getCompany() : null; complianceBoarding = - serviceSynthesis.getComplianceBoardingIndicator(company); + serviceSynthesis.getComplianceBoardingIndicator(getFilter()); } return complianceBoarding; @@ -432,7 +431,7 @@ if (contactStateStatistics == null) { Company company = !user.isAdmin() ? user.getCompany() : null; contactStateStatistics = - serviceSynthesis.getContactStateStatistics(company, getPeriodForContactStates()); + serviceSynthesis.getContactStateStatistics(getFilter()); } return contactStateStatistics; } @@ -483,8 +482,7 @@ if (allegroReactivity == null) { Company company = !user.isAdmin() ? user.getCompany() : null; allegroReactivity = - serviceSynthesis.getContactDataInputDateReactivity(company, - getPeriodForAllegroReactivity()); + serviceSynthesis.getContactDataInputDateReactivity(getFilter()); } return allegroReactivity; } Modified: trunk/wao-ui/src/main/webapp/Synthesis.tml =================================================================== --- trunk/wao-ui/src/main/webapp/Synthesis.tml 2010-10-21 10:21:30 UTC (rev 700) +++ trunk/wao-ui/src/main/webapp/Synthesis.tml 2010-10-21 14:51:31 UTC (rev 701) @@ -30,6 +30,62 @@ <t:layout t:pageTitle="Synthèse et indicateurs" t:contentId="so-synthesis" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> + + <fieldset> + <legend>Filtres</legend> + <div t:type="zone" t:id="filtersZone" class="so-filters-form" id="so-datasampling-filters"> + <!--<div t:type="zone" t:id="dataSamplingFiltersZone" t:update="show" id="so-datasampling-filters">--> + <form t:type="form" t:id="filtersForm" t:zone="so-datasampling-filters"> + <t:errors /> + <div class="t-beaneditor"> + <div class="filterRow"> + <label>Période: </label> + <t:label t:for="periodBegin" />: + <input t:type="datefield" class="width70" t:id="periodBegin" t:value="period.fromDate" t:format="MM/yyyy" t:validate="required"/> + <t:label t:for="periodEnd" />: + <input t:type="datefield" class="width70" t:id="periodEnd" t:value="period.thruDate" t:format="MM/yyyy" t:validate="required"/> + </div> + <div> + <t:if t:test="user.admin"> + <t:label t:for="company" />: + <input t:type="select" t:id="company" t:model="companySelectModel" value="companyId"/> + <input t:type="submit" class="ico22px refresh" t:id="refreshByCompany" value="Refresh" + title="Rafraîchir les filtres en fonction de la société sélectionnée"/> + </t:if> + <t:label t:for="programName" />: + <select t:type="select" t:id="programName" t:model="programSelectModel" value="filter.programName" /> + <input t:type="submit" class="ico22px refresh" t:id="refreshByProgram" value="Refresh" + title="Rafraîchir les secteurs de pêche et les métiers en fonction du programme sélectionné"/> + </div> + <div class="filterRow" t:type="zone" t:id="sampleRowZone" t:update="show"> + <t:label t:for="facadeName" />: + <select t:type="select" t:id="facadeName" t:model="facadeSelectModel" value="filter.facadeName" /> + <input t:type="submit" class="ico22px refresh" t:id="refreshByFacade" value="Refresh" + title="Rafraîchir les zones et les métiers en fonction de la façade sélectionnée"/> + <t:label t:for="sectorName" />: + <select t:type="select" t:id="sectorName" t:model="sectorSelectModel" value="filter.sectorName" /> + <input t:type="submit" class="ico22px refresh" t:id="refreshBySector" value="Refresh" + title="Rafraîchir les métiers en fonction de la zone sélectionnée"/> + <t:label t:for="sampleRow" />: + <input t:type="select" t:id="sampleRow" t:model="sampleRowSelectModel" value="sampleRowId" /> + + <!--<t:label t:for="program" />: + <input t:type="select" t:id="program" t:model="programSelectModel" value="programId" />--> + </div> + <div class="filterRow"> + <input t:type="checkbox" t:id="estimatedTides" value="filter.estimatedTides" /> + <t:label t:for="estimatedTides" title="L'effort d'observations estimé équivaut au nombre de contacts validés ou non par la société. Les contacts refusés par le programme ne sont pas pris en compte" /> + </div> + <div class="t-beaneditor-row aright"> + <input t:type="submit" class="ico search-32px" t:id="search" value="Search" title="Création du graphique en fonction des filtres saisies"/> + <input t:type="submit" class="ico undo" t:id="reset" value="Reset" title="Remettre les filtres par défaut" /> + </div> + </div> + </form> + <!--</div>--> + </div> + </fieldset> + <!-- MENU : delegator --> <div class="clearfix"> <div class="fleft" id="so-synthesis-menu"> @@ -75,60 +131,6 @@ <t:block t:id="ind0"> <div class="acenter" id="so-datasampling"> <h2>Données des marées (réalisé / planifié)</h2> - <fieldset> - <legend>Filtres</legend> - <div t:type="zone" t:id="filtersZone" class="so-filters-form" id="so-datasampling-filters"> - <!--<div t:type="zone" t:id="dataSamplingFiltersZone" t:update="show" id="so-datasampling-filters">--> - <form t:type="form" t:id="filtersForm" t:zone="so-datasampling-filters"> - <t:errors /> - <div class="t-beaneditor"> - <div class="filterRow"> - <label>Période: </label> - <t:label t:for="periodBegin" />: - <input t:type="datefield" class="width70" t:id="periodBegin" t:value="period.fromDate" t:format="MM/yyyy" t:validate="required"/> - <t:label t:for="periodEnd" />: - <input t:type="datefield" class="width70" t:id="periodEnd" t:value="period.thruDate" t:format="MM/yyyy" t:validate="required"/> - </div> - <div> - <t:if t:test="user.admin"> - <t:label t:for="company" />: - <input t:type="select" t:id="company" t:model="companySelectModel" value="companyId"/> - <input t:type="submit" class="ico22px refresh" t:id="refreshByCompany" value="Refresh" - title="Rafraîchir les filtres en fonction de la société sélectionnée"/> - </t:if> - <t:label t:for="programName" />: - <select t:type="select" t:id="programName" t:model="programSelectModel" value="filter.programName" /> - <input t:type="submit" class="ico22px refresh" t:id="refreshByProgram" value="Refresh" - title="Rafraîchir les secteurs de pêche et les métiers en fonction du programme sélectionné"/> - </div> - <div class="filterRow" t:type="zone" t:id="sampleRowZone" t:update="show"> - <t:label t:for="facadeName" />: - <select t:type="select" t:id="facadeName" t:model="facadeSelectModel" value="filter.facadeName" /> - <input t:type="submit" class="ico22px refresh" t:id="refreshByFacade" value="Refresh" - title="Rafraîchir les zones et les métiers en fonction de la façade sélectionnée"/> - <t:label t:for="sectorName" />: - <select t:type="select" t:id="sectorName" t:model="sectorSelectModel" value="filter.sectorName" /> - <input t:type="submit" class="ico22px refresh" t:id="refreshBySector" value="Refresh" - title="Rafraîchir les métiers en fonction de la zone sélectionnée"/> - <t:label t:for="sampleRow" />: - <input t:type="select" t:id="sampleRow" t:model="sampleRowSelectModel" value="sampleRowId" /> - - <!--<t:label t:for="program" />: - <input t:type="select" t:id="program" t:model="programSelectModel" value="programId" />--> - </div> - <div class="filterRow"> - <input t:type="checkbox" t:id="estimatedTides" value="filter.estimatedTides" /> - <t:label t:for="estimatedTides" title="L'effort d'observations estimé équivaut au nombre de contacts validés ou non par la société. Les contacts refusés par le programme ne sont pas pris en compte" /> - </div> - <div class="t-beaneditor-row aright"> - <input t:type="submit" class="ico search-32px" t:id="search" value="Search" title="Création du graphique en fonction des filtres saisies"/> - <input t:type="submit" class="ico undo" t:id="reset" value="Reset" title="Remettre les filtres par défaut" /> - </div> - </div> - </form> - <!--</div>--> - </div> - </fieldset> <p class="so-chart-types"> <a t:type="actionlink" t:context="[actionChartType,'BAR']"> <img src="${asset:context:}/img/chart-bar.png" alt="Diagramme en bâtons" title="Diagramme en bâtons" /> @@ -180,7 +182,7 @@ <!-- IND1 : COMPLIANCE_BOARDING --> <t:block t:id="ind2"> <div class="ind-table acenter" id="so-noncomplianceboarding"> - <h2>Non respect du nombre d'observateurs embarqués</h2> + <h2>Respect du nombre d'observateurs embarqués</h2> <br /> <t:if t:test="user.admin"> <p>
participants (1)
-
bleny@users.labs.libre-entreprise.org