Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: edfb9063 by Tony Chemit at 2020-09-19T16:00:39+02:00 Nouveau texte de popup pour le cas 'Vous devez mettre à jour le form marée avant de pouvoir saisir le livre de bord' - See #1605 - - - - - 17 changed files: - client-datasource-editor-common/pom.xml - + client-datasource-editor-common/src/main/i18n/templates/askToFillTripLogbook_en_GB.ftl - + client-datasource-editor-common/src/main/i18n/templates/askToFillTripLogbook_es_ES.ftl - + client-datasource-editor-common/src/main/i18n/templates/askToFillTripLogbook_fr_FR.ftl - + client-datasource-editor-common/src/main/i18n/templates/askToFillTripObservations_en_GB.ftl - + client-datasource-editor-common/src/main/i18n/templates/askToFillTripObservations_es_ES.ftl - + client-datasource-editor-common/src/main/i18n/templates/askToFillTripObservations_fr_FR.ftl - client-datasource-editor-common/src/main/java/fr/ird/observe/client/datasource/editor/content/data/TripActionHelper.java - client-datasource-editor-common/src/main/java/fr/ird/observe/client/datasource/editor/content/data/TripUI.java - client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/CreateSupport.java - client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/LlTripActionHelper.java - client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/CreateSupport.java - client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/PsTripActionHelper.java - client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/localmarket/actions/LocalmarketUIActionSupport.java - observe-i18n/src/main/i18n/translations/observe_en_GB.properties - observe-i18n/src/main/i18n/translations/observe_es_ES.properties - observe-i18n/src/main/i18n/translations/observe_fr_FR.properties Changes: ===================================== client-datasource-editor-common/pom.xml ===================================== @@ -90,6 +90,11 @@ <version>${project.version}</version> </dependency> + <dependency> + <groupId>io.ultreia.java4all</groupId> + <artifactId>application-template</artifactId> + </dependency> + <dependency> <groupId>io.ultreia.java4all.jaxx</groupId> <artifactId>jaxx-runtime-spi</artifactId> ===================================== client-datasource-editor-common/src/main/i18n/templates/askToFillTripLogbook_en_GB.ftl ===================================== @@ -0,0 +1,45 @@ +<#-- + #%L + ObServe :: Client DataSource Editor Common + %% + Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +<html> +<body> +<p> + To be able to acquire data of type <i>${dtoType}</i>, the trip form must first be completed: +</p> +<ul> + <li>The <i>Logbook and associated data</i> checkbox must be checked</li> + <li>The <i>Logbook and associated data</i> tab must be properly filled</li> +</ul> +<hr/> +<br/> +<p> + Click on <b>Access to trip form</b> to fill properly the form and save.. +</p> +<br/> +<p>The <i>logbook and associated data</i> box will be checked automatically and you will be redirected to the proper + tab. +</p> +<br/> +<p> + You can then enter the data. +</p> +</body> +</html> ===================================== client-datasource-editor-common/src/main/i18n/templates/askToFillTripLogbook_es_ES.ftl ===================================== @@ -0,0 +1,49 @@ +<#-- + #%L + ObServe :: Client DataSource Editor Common + %% + Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +<html> +<body> +<p> + Para poder acceder al diario de pesca (<i>${dtoType}</i>), primero se debe completar el formulario de marea: +</p> +<ul> + <li>La casilla <i>diario de pesca y datos asociados</i> debe estar marcada</li> + <li>Se debe seleccionar la identidad de la persona que registra los datos en el <i>diario de pesca y datos + asociados</i> (observador/a u otro/a) + </li> +</ul> +<hr/> +<br/> +<p> + Haga click en <b>Acceder al formulario de marea</b> para añadir la identidad de la persona que registra los datos y + guardar. +</p> +<br/> +<p> + La casilla <i>diario de pesca y datos asociados</i> se marcará automáticamente. +</p> +<br/> +<p> + Podrá entonces introducir + datos. +</p> +</body> +</html> ===================================== client-datasource-editor-common/src/main/i18n/templates/askToFillTripLogbook_fr_FR.ftl ===================================== @@ -0,0 +1,43 @@ +<#-- + #%L + ObServe :: Client DataSource Editor Common + %% + Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +<html> +<body> +<p> + Pour pouvoir créer une donnée de type <i>${dtoType}</i>, le formulaire marée doit d'abord être complété : +</p> +<ul> + <li>La case <i>Livre de bord et données associées</i> doit être cochée</li> + <li>L'onglet <i>Livre de bord et données associées</i> doit dûment renseigné</li> +</ul> +<hr/> +<br/> +<p> + Cliquer sur <b>Accéder au formulaire marée</b> pour compléter ces données et enregistrer. +<p> +<br/> +<p> La case <i>livre de bord et données associées</i> sera cochée automatiquement, et vous serez redirigé vers l'onglet + à renseigner. +</p> +<br/> +<p> Vous pourrez ensuite saisir la donnée souhaitée.</p> +</body> +</html> ===================================== client-datasource-editor-common/src/main/i18n/templates/askToFillTripObservations_en_GB.ftl ===================================== @@ -0,0 +1,45 @@ +<#-- + #%L + ObServe :: Client DataSource Editor Common + %% + Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +<html> +<body> +<p> + To be able to acquire data of type <i>${dtoType}</i>, the trip form must first be completed: +</p> +<ul> + <li>The <i>Observations</i> checkbox must be checked</li> + <li>The <i>Observations</i> tab must be properly filled</li> +</ul> +<hr/> +<br/> +<p> + Click on <b>Access to trip form</b> to fill properly the form and save.. +</p> +<br/> +<p>The <i>observations</i> box will be checked automatically and you will be redirected to the proper + tab. +</p> +<br/> +<p> + You can then enter the data. +</p> +</body> +</html> ===================================== client-datasource-editor-common/src/main/i18n/templates/askToFillTripObservations_es_ES.ftl ===================================== @@ -0,0 +1,49 @@ +<#-- + #%L + ObServe :: Client DataSource Editor Common + %% + Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +<html> +<body> +<p> + Para poder acceder al observaciones (<i>${dtoType}</i>), primero se debe completar el formulario de marea: +</p> +<ul> + <li>La casilla <i>observaciones</i> debe estar marcada</li> + <li>Se debe seleccionar la identidad de la persona que registra los datos en el <i>observaciones</i> (observador/a u + otro/a) + </li> +</ul> +<hr/> +<br/> +<p> + Haga click en <b>Acceder al formulario de marea</b> para añadir la identidad de la persona que registra los datos y + guardar. +</p> +<br/> +<p> + La casilla <i>observaciones</i> se marcará automáticamente. +</p> +<br/> +<p> + Podrá entonces introducir + datos. +</p> +</body> +</html> ===================================== client-datasource-editor-common/src/main/i18n/templates/askToFillTripObservations_fr_FR.ftl ===================================== @@ -0,0 +1,44 @@ +<#-- + #%L + ObServe :: Client DataSource Editor Common + %% + Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +<html> +<body> +<p> + Pour pouvoir créer une donnée d'observation de type <i>${dtoType}</i>, le formulaire marée doit d'abord être complété + : +</p> +<ul> + <li>La case <i>Observations</i> doit être cochée</li> + <li>Le saisisseur des observations doit être sélectionné</li> +</ul> +<hr/> +<br/> +<p> + Cliquer sur <b>Accéder au formulaire marée</b> pour compléter ces données et enregistrer. +<p> + <br/> +<p> La case <i>observations</i> sera cochée automatiquement, et vous serez redirigé vers l'onglet + à renseigner. +</p> +<br/> +<p> Vous pourrez ensuite saisir la donnée souhaitée.</p> +</body> +</html> ===================================== client-datasource-editor-common/src/main/java/fr/ird/observe/client/datasource/editor/content/data/TripActionHelper.java ===================================== @@ -22,56 +22,107 @@ package fr.ird.observe.client.datasource.editor.content.data; * #L% */ +import fr.ird.observe.client.WithClientUIContext; import fr.ird.observe.client.datasource.editor.content.ContentUI; import fr.ird.observe.client.datasource.editor.tree.navigation.NavigationTree; -import fr.ird.observe.client.main.ObserveMainUI; import fr.ird.observe.client.util.UIHelper; import fr.ird.observe.dto.data.DataDto; import fr.ird.observe.dto.data.TripAware; import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper; import fr.ird.observe.navigation.tree.ReferenceNode; import fr.ird.observe.spi.DtoModelHelper; +import io.ultreia.java4all.application.template.spi.GenerateTemplate; import io.ultreia.java4all.i18n.I18n; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.nuiton.jaxx.runtime.swing.TabInfo; +import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.tree.TreeNode; +import java.util.Objects; +import java.util.function.Function; import static io.ultreia.java4all.i18n.I18n.t; /** * Store here any mutual code for some actions. */ -public class TripActionHelper { +@GenerateTemplate(template = { + "askToFillTripObservations.ftl", + "askToFillTripLogbook.ftl" +}) +public abstract class TripActionHelper implements WithClientUIContext { private static final Logger log = LogManager.getLogger(TripActionHelper.class); - protected static boolean gotoTripObservationTab(ObserveMainUI mainui, ContentUI ui, TripAware tripDto, Class<? extends DataDto> dtoType, int tabIndex) { + protected final ContentUI ui; + /** + * Used internal by template. + */ + private String dtoType; + + protected TripActionHelper(ContentUI ui) { + this.ui = Objects.requireNonNull(ui); + } + + public boolean gotoTripObservationTab(Class<? extends DataDto> dtoType) { + TripAware tripDto = getTrip(); + return gotoTripObservationTab(tripDto, dtoType); + } + + public boolean gotoTripLogbookTab(Class<? extends DataDto> dtoType) { + TripAware tripDto = getTrip(); + return gotoTripLogbookTab(tripDto, dtoType); + } + + protected abstract TripAware getTrip(); + + protected boolean gotoTripObservationTab(TripAware tripDto, Class<? extends DataDto> dtoType) { boolean canExecuteAction = tripDto.isObservationsAvailability(); if (!canExecuteAction) { - askAndGotoTripMetaDataTab(mainui, ui, tripDto, dtoType, TripAware.PROPERTY_OBSERVATIONS_AVAILABILITY, tabIndex); + String dataType = I18n.t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType)); + String message = getObservationMessage(dataType); + askAndGotoTripMetaDataTab(tripDto, dataType, message, TripAware.PROPERTY_OBSERVATIONS_AVAILABILITY, TripUI::getObservationsTab); } return canExecuteAction; } - protected static boolean gotoTripLogbookTab(ObserveMainUI mainui, ContentUI ui, TripAware tripDto, Class<? extends DataDto> dtoType, int tabIndex) { + protected boolean gotoTripLogbookTab(TripAware tripDto, Class<? extends DataDto> dtoType) { boolean canExecuteAction = tripDto.isLogbookAvailability(); if (!canExecuteAction) { - askAndGotoTripMetaDataTab(mainui, ui, tripDto, dtoType, TripAware.PROPERTY_LOGBOOK_AVAILABILITY, tabIndex); + String dataType = I18n.t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType)); + String message = getLogbookMessage(dataType); + askAndGotoTripMetaDataTab(tripDto, dataType, message, TripAware.PROPERTY_LOGBOOK_AVAILABILITY, TripUI::getLogbookTab); } return canExecuteAction; } - private static void askAndGotoTripMetaDataTab(ObserveMainUI mainui, ContentUI ui, TripAware tripDto, Class<? extends DataDto> dtoType, String availabilityPropertyName, int tabIndex) { - String dataType = I18n.t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType)); + protected String getObservationMessage(String dtoType) { + this.dtoType = dtoType; + try { + return TripActionHelperTemplate.generateAskToFillTripObservations(this); + } finally { + this.dtoType = null; + } + } + + protected String getLogbookMessage(String dtoType) { + this.dtoType = dtoType; + try { + return TripActionHelperTemplate.generateAskToFillTripLogbook(this); + } finally { + this.dtoType = null; + } + } + + private void askAndGotoTripMetaDataTab(TripAware tripDto, String dataType, String message, String availabilityPropertyName, Function<TripUI, TabInfo> tabGetter) { // Let's ask user to fill them - //FIXME Use a template int response = UIHelper.askUser( - mainui, - t("observe.data.common.Trip.title.can.not.create.trip.sub.data"), - dataType, + getClientUIContext().getMainUI(), + t("observe.data.common.Trip.title.can.not.create.trip.sub.data", dataType), + new JLabel(message), JOptionPane.WARNING_MESSAGE, new Object[]{ t("observe.data.common.Trip.choice.go.to.trip"), @@ -91,7 +142,15 @@ public class TripActionHelper { // set availability flag to true tripUI.getModel().set(availabilityPropertyName, true); // go to meta-data tab - SwingUtilities.invokeLater(() -> tripUI.getMainTabbedPane().setSelectedIndex(tabIndex)); + TabInfo tabInfo = tabGetter.apply(tripUI); + SwingUtilities.invokeLater(() -> tripUI.selectTab(tabInfo)); } } + + + public String getDtoType() { + return dtoType; + } + + } ===================================== client-datasource-editor-common/src/main/java/fr/ird/observe/client/datasource/editor/content/data/TripUI.java ===================================== @@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.content.data; import fr.ird.observe.client.datasource.editor.content.data.open.ContentOpenableUIModel; import fr.ird.observe.client.datasource.editor.content.data.trip.map.TripMapUI; +import org.nuiton.jaxx.runtime.swing.TabInfo; import javax.swing.JTabbedPane; @@ -44,4 +45,16 @@ public interface TripUI { ContentOpenableUIModel<?, ?> getModel(); + TabInfo getGeneralTab(); + + TabInfo getMapTab(); + + TabInfo getObservationsTab(); + + TabInfo getLogbookTab(); + + default void selectTab(TabInfo tabInfo) { + getMainTabbedPane().setSelectedIndex(tabInfo.getTabIndex()); + } + } ===================================== client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/CreateSupport.java ===================================== @@ -50,11 +50,11 @@ public class CreateSupport<D extends DataDto, R extends DataDtoReference<D, R>> protected boolean canExecuteAction(ActionEvent e) { boolean canExecuteAction = super.canExecuteAction(e); if (canExecuteAction && checkTripAvailability) { + LlTripActionHelper helper = new LlTripActionHelper(ui); if (getBeanType().getName().contains(".observation.")) { - canExecuteAction = LlTripActionHelper.gotoTripObservationTab(getMainUI(), ui, getServicesProvider(), getBeanType()); + canExecuteAction = helper.gotoTripObservationTab(getBeanType()); } else { - canExecuteAction = LlTripActionHelper.gotoTripLogbookTab(getMainUI(), ui, getServicesProvider(), getBeanType()); - + canExecuteAction = helper.gotoTripLogbookTab(getBeanType()); } } return canExecuteAction; ===================================== client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/LlTripActionHelper.java ===================================== @@ -22,13 +22,9 @@ package fr.ird.observe.client.datasource.editor.content.data.ll; * #L% */ -import fr.ird.observe.client.ClientUIContextApplicationComponent; import fr.ird.observe.client.datasource.editor.content.ContentUI; import fr.ird.observe.client.datasource.editor.content.data.TripActionHelper; -import fr.ird.observe.client.main.ObserveMainUI; -import fr.ird.observe.dto.data.DataDto; import fr.ird.observe.dto.data.ll.common.TripDto; -import fr.ird.observe.services.ObserveServicesProvider; /** * Created on 18/09/2020. @@ -38,22 +34,13 @@ import fr.ird.observe.services.ObserveServicesProvider; */ public class LlTripActionHelper extends TripActionHelper { - public static boolean gotoTripObservationTab(ObserveMainUI mainui, ContentUI ui, ObserveServicesProvider servicesProvider, Class<? extends DataDto> dtoType) { - TripDto tripDto = getTrip(servicesProvider); - return gotoTripObservationTab(mainui, ui, tripDto, dtoType, 2); + public LlTripActionHelper(ContentUI ui) { + super(ui); } - public static boolean gotoTripLogbookTab(ObserveMainUI mainui, ContentUI ui, ObserveServicesProvider servicesProvider, Class<? extends DataDto> dtoType) { - TripDto tripDto = getTrip(servicesProvider); - return gotoTripLogbookTab(mainui, ui, tripDto, dtoType, 3); - } - - public static String getSelectedTripId() { - return ClientUIContextApplicationComponent.value().getObserveSelectModel().getLongline().getTrip().getId(); - } - - static TripDto getTrip(ObserveServicesProvider servicesProvider) { - String tripId = getSelectedTripId(); - return servicesProvider.getLlCommonTripService().loadDto(tripId); + @Override + protected TripDto getTrip() { + String tripId = getClientUIContext().getObserveSelectModel().getLongline().getTrip().getId(); + return getClientUIContext().getDataSourcesManager().getMainDataSource().getLlCommonTripService().loadDto(tripId); } } ===================================== client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/CreateSupport.java ===================================== @@ -50,11 +50,11 @@ public class CreateSupport<D extends DataDto, R extends DataDtoReference<D, R>> protected boolean canExecuteAction(ActionEvent e) { boolean canExecuteAction = super.canExecuteAction(e); if (canExecuteAction && checkTripAvailability) { + PsTripActionHelper helper = new PsTripActionHelper(ui); if (getBeanType().getName().contains(".observation.")) { - canExecuteAction = PsTripActionHelper.gotoTripObservationTab(getMainUI(), ui, getServicesProvider(), getBeanType()); + canExecuteAction = helper.gotoTripObservationTab(getBeanType()); } else { - canExecuteAction = PsTripActionHelper.gotoTripLogbookTab(getMainUI(), ui, getServicesProvider(), getBeanType()); - + canExecuteAction = helper.gotoTripLogbookTab(getBeanType()); } } return canExecuteAction; ===================================== client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/PsTripActionHelper.java ===================================== @@ -22,13 +22,9 @@ package fr.ird.observe.client.datasource.editor.content.data.ps; * #L% */ -import fr.ird.observe.client.ClientUIContextApplicationComponent; import fr.ird.observe.client.datasource.editor.content.ContentUI; import fr.ird.observe.client.datasource.editor.content.data.TripActionHelper; -import fr.ird.observe.client.main.ObserveMainUI; -import fr.ird.observe.dto.data.DataDto; import fr.ird.observe.dto.data.ps.common.TripDto; -import fr.ird.observe.services.ObserveServicesProvider; /** * Created on 18/09/2020. @@ -38,22 +34,13 @@ import fr.ird.observe.services.ObserveServicesProvider; */ public class PsTripActionHelper extends TripActionHelper { - public static boolean gotoTripObservationTab(ObserveMainUI mainui, ContentUI ui, ObserveServicesProvider servicesProvider, Class<? extends DataDto> dtoType) { - TripDto tripDto = getTrip(servicesProvider); - return gotoTripObservationTab(mainui, ui, tripDto, dtoType, 1); + public PsTripActionHelper(ContentUI ui) { + super(ui); } - public static boolean gotoTripLogbookTab(ObserveMainUI mainui, ContentUI ui, ObserveServicesProvider servicesProvider, Class<? extends DataDto> dtoType) { - TripDto tripDto = getTrip(servicesProvider); - return gotoTripLogbookTab(mainui, ui, tripDto, dtoType, 2); - } - - public static String getSelectedTripId() { - return ClientUIContextApplicationComponent.value().getObserveSelectModel().getSeine().getTrip().getId(); - } - - static TripDto getTrip(ObserveServicesProvider servicesProvider) { - String tripId = getSelectedTripId(); - return servicesProvider.getPsCommonTripService().loadDto(tripId); + @Override + protected TripDto getTrip() { + String tripId = getClientUIContext().getObserveSelectModel().getSeine().getTrip().getId(); + return getClientUIContext().getDataSourcesManager().getMainDataSource().getPsCommonTripService().loadDto(tripId); } } ===================================== client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/localmarket/actions/LocalmarketUIActionSupport.java ===================================== @@ -68,7 +68,8 @@ public abstract class LocalmarketUIActionSupport<D extends DataDto> extends Cont protected boolean canExecuteAction(ActionEvent e) { boolean canExecuteAction = super.canExecuteAction(e); if (canExecuteAction) { - canExecuteAction = PsTripActionHelper.gotoTripLogbookTab(getMainUI(), ui, getServicesProvider(), getBeanType()); + PsTripActionHelper helper = new PsTripActionHelper(ui); + canExecuteAction = helper.gotoTripLogbookTab(getBeanType()); } return canExecuteAction; } ===================================== observe-i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -440,8 +440,8 @@ observe.data.Trip.validation.startDate.after.now=Start date of the trip must be observe.data.Trip.validation.unclosed.activityObs=There is an open activity on trip (%1$s). observe.data.Trip.validation.unclosed.routeObs=There is an open route on trip (%1$s). observe.data.Trip.validation.vessel.overlap=There is already a trip using same vessel on equivalent date range. \#TODO -observe.data.common.Trip.choice.go.to.trip=Go to trip -observe.data.common.Trip.title.can.not.create.trip.sub.data=Can't create a trip data... +observe.data.common.Trip.choice.go.to.trip=Access to trip form +observe.data.common.Trip.title.can.not.create.trip.sub.data=Can't create a trip data of type `%s`... observe.data.ll.Activity.validation.endDate.after.currentTrip.startDate=End date must be after current trip start date observe.data.ll.Activity.validation.endDate.after.startDate=End date must be after start date observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate=End date must be before current trip end date @@ -490,11 +490,11 @@ observe.data.ll.common.Trip.availableData=Available data observe.data.ll.common.Trip.ersId=Id ERS observe.data.ll.common.Trip.generalComment=Comment observe.data.ll.common.Trip.generalTab=Common characteristics -observe.data.ll.common.Trip.logbookAvailability=Logbook +observe.data.ll.common.Trip.logbookAvailability=Logbook and associated data observe.data.ll.common.Trip.logbookComment=Comment observe.data.ll.common.Trip.logbookDataEntryOperator=Data entry operator observe.data.ll.common.Trip.logbookDataQuality=Data quality -observe.data.ll.common.Trip.logbookTab=Logbook +observe.data.ll.common.Trip.logbookTab=Logbook and associated data observe.data.ll.common.Trip.mapTab=Map observe.data.ll.common.Trip.message.not.open=Current trip is not opened, no edit possible. observe.data.ll.common.Trip.noOfCrewMembers=Numer of crew @@ -1343,7 +1343,7 @@ observe.data.ps.common.Trip.list=List of trips observe.data.ps.common.Trip.list.message.none=< No trip for current program > observe.data.ps.common.Trip.localMarketTotalWeight=Local market total weight (t) observe.data.ps.common.Trip.loch=Loch (mile) -observe.data.ps.common.Trip.logbookAvailability=Logbook +observe.data.ps.common.Trip.logbookAvailability=Logbook and associated data observe.data.ps.common.Trip.logbookComment=Comment observe.data.ps.common.Trip.logbookDataEntryOperator=Data entry operator observe.data.ps.common.Trip.logbookDataQuality=Data quality ===================================== observe-i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -440,8 +440,8 @@ observe.data.Trip.validation.startDate.after.now=Start date of the trip must be observe.data.Trip.validation.unclosed.activityObs=Existe una actividad que no fue cerrada (%1$s). observe.data.Trip.validation.unclosed.routeObs=Existe una ruta que no fue cerrada (%1$s). observe.data.Trip.validation.vessel.overlap=There is already a trip using same vessel on equivalent date range. \#TODO -observe.data.common.Trip.choice.go.to.trip=Go to trip \#TODO -observe.data.common.Trip.title.can.not.create.trip.sub.data=Can't create a trip data... \#TODO +observe.data.common.Trip.choice.go.to.trip=Acceder al formulario de marea +observe.data.common.Trip.title.can.not.create.trip.sub.data=Can't create a trip data of type `%s`... \#TODO observe.data.ll.Activity.validation.endDate.after.currentTrip.startDate=End date must be after current trip start date \#TODO observe.data.ll.Activity.validation.endDate.after.startDate=End date must be after start date \#TODO observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate=End date must be before current trip end date \#TODO @@ -490,21 +490,21 @@ observe.data.ll.common.Trip.availableData=Données disponibles observe.data.ll.common.Trip.ersId=Id ERS observe.data.ll.common.Trip.generalComment=Comentarios observe.data.ll.common.Trip.generalTab=General características -observe.data.ll.common.Trip.logbookAvailability=Logbook \#TODO +observe.data.ll.common.Trip.logbookAvailability=Diario de pesca y datos asociados observe.data.ll.common.Trip.logbookComment=Comentarios observe.data.ll.common.Trip.logbookDataEntryOperator=Operador de captación de datos observe.data.ll.common.Trip.logbookDataQuality=Qualité de donnée \#TODO -observe.data.ll.common.Trip.logbookTab=Caractéristiques Logbook +observe.data.ll.common.Trip.logbookTab=Diario de pesca y datos asociados observe.data.ll.common.Trip.mapTab=Mapa observe.data.ll.common.Trip.message.not.open=La marea actual no está abierta, no se puede modificar. observe.data.ll.common.Trip.noOfCrewMembers=Nombre d'équipage observe.data.ll.common.Trip.noOfDays=Duración (días) observe.data.ll.common.Trip.observationMethod=Observations method \#TODO -observe.data.ll.common.Trip.observationsAvailability=Données d'observation +observe.data.ll.common.Trip.observationsAvailability=Observaciones observe.data.ll.common.Trip.observationsComment=Comentarios observe.data.ll.common.Trip.observationsDataEntryOperator=Operador de captación de datos observe.data.ll.common.Trip.observationsDataQuality=Qualité de donnée \#TODO -observe.data.ll.common.Trip.observationsTab=Caractéristiques d'observation +observe.data.ll.common.Trip.observationsTab=Observaciones observe.data.ll.common.Trip.species=Especie objetivo observe.data.ll.common.Trip.species.selected=Espèces sélectionnées \#TODO observe.data.ll.common.Trip.species.universe=Espèces disponibles \#TODO @@ -1343,7 +1343,7 @@ observe.data.ps.common.Trip.list=Lista de mareas observe.data.ps.common.Trip.list.message.none=Ninguna marea para el programa actual observe.data.ps.common.Trip.localMarketTotalWeight=Total marché local (en t) \#TODO observe.data.ps.common.Trip.loch=Loch (miles nautiques) \#TODO -observe.data.ps.common.Trip.logbookAvailability=Logbook \#TODO +observe.data.ps.common.Trip.logbookAvailability=Diario de pesca y datos asociados observe.data.ps.common.Trip.logbookComment=Comentario observe.data.ps.common.Trip.logbookDataEntryOperator=Opérateur de saisie \#TODO observe.data.ps.common.Trip.logbookDataQuality=Qualité de donnée \#TODO ===================================== observe-i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -440,8 +440,8 @@ observe.data.Trip.validation.startDate.after.now=La date de début de marée doi observe.data.Trip.validation.unclosed.activityObs=Il existe une activité non clôturée (%1$s). observe.data.Trip.validation.unclosed.routeObs=Il existe une route non clôturée (%1$s). observe.data.Trip.validation.vessel.overlap=Il existe déjà une marée utilisant ce navire sur une plage temporelle équivalente. \#TODO -observe.data.common.Trip.choice.go.to.trip=Accéder à la marée -observe.data.common.Trip.title.can.not.create.trip.sub.data=Impossible de créer une donnée de marée... +observe.data.common.Trip.choice.go.to.trip=Accéder au formulaire marée +observe.data.common.Trip.title.can.not.create.trip.sub.data=Impossible de créer une donnée de type `%s` pour la marée... observe.data.ll.Activity.validation.endDate.after.currentTrip.startDate=La date de fin doit être supérieure ou égale à la date de début de marée observe.data.ll.Activity.validation.endDate.after.startDate=La date de fin doit être supérieure ou égale à la date de début de l'activité observe.data.ll.Activity.validation.endDate.before.currentTrip.endDate=La date de fin doit être inférieur ou égale à la date de fin de marée @@ -490,11 +490,11 @@ observe.data.ll.common.Trip.availableData=Données disponibles observe.data.ll.common.Trip.ersId=Id ERS observe.data.ll.common.Trip.generalComment=Commentaire observe.data.ll.common.Trip.generalTab=Caractéristiques communes -observe.data.ll.common.Trip.logbookAvailability=Livre de bord +observe.data.ll.common.Trip.logbookAvailability=Livre de bord et données associées observe.data.ll.common.Trip.logbookComment=Commentaire observe.data.ll.common.Trip.logbookDataEntryOperator=Opérateur de saisie observe.data.ll.common.Trip.logbookDataQuality=Qualité de donnée -observe.data.ll.common.Trip.logbookTab=Caractéristiques Logbook +observe.data.ll.common.Trip.logbookTab=Livre de bord et données associées observe.data.ll.common.Trip.mapTab=Carte observe.data.ll.common.Trip.message.not.open=La marée courante n'est pas ouverte, aucune modification possible. observe.data.ll.common.Trip.noOfCrewMembers=Nombre d'équipage @@ -504,7 +504,7 @@ observe.data.ll.common.Trip.observationsAvailability=Données d'observation observe.data.ll.common.Trip.observationsComment=Commentaire observe.data.ll.common.Trip.observationsDataEntryOperator=Opérateur de saisie observe.data.ll.common.Trip.observationsDataQuality=Qualité de donnée -observe.data.ll.common.Trip.observationsTab=Caractéristiques d'observation +observe.data.ll.common.Trip.observationsTab=Données d'observation observe.data.ll.common.Trip.species=Espèces ciblées observe.data.ll.common.Trip.species.selected=Espèces sélectionnées observe.data.ll.common.Trip.species.universe=Espèces disponibles @@ -1343,7 +1343,7 @@ observe.data.ps.common.Trip.list=Liste des marées observe.data.ps.common.Trip.list.message.none=< Aucune marée pour le programme courant > observe.data.ps.common.Trip.localMarketTotalWeight=Total marché local (en t) observe.data.ps.common.Trip.loch=Loch (miles nautiques) -observe.data.ps.common.Trip.logbookAvailability=Livre de Bord +observe.data.ps.common.Trip.logbookAvailability=Livre de bord et données associées observe.data.ps.common.Trip.logbookComment=Commentaire observe.data.ps.common.Trip.logbookDataEntryOperator=Opérateur de saisie observe.data.ps.common.Trip.logbookDataQuality=Qualité de donnée View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/edfb9063f743dcb6eb2a641f08... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/edfb9063f743dcb6eb2a641f08... You're receiving this email because of your account on gitlab.com.