r25 - in trunk: echobase-entities/src/license echobase-entities/src/main/resources/i18n echobase-entities/src/main/xmi echobase-services/src/main/java/fr/ifremer/echobase/services echobase-services/src/main/java/fr/ifremer/echobase/services/models echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json echobase-ui/src/main/resources echobase-ui/src/main/resources/config echobase-ui/src/main/resources/i18n echobase-ui/src/main/
Author: sletellier Date: 2011-11-08 18:51:54 +0100 (Tue, 08 Nov 2011) New Revision: 25 Url: http://forge.codelutin.com/repositories/revision/echobase/25 Log: - Add survey entity - Add import pages - Creating import model in service - Creating survey service Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/SurveyService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/ImportAction.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersDatas.java trunk/echobase-ui/src/main/resources/config/struts-import.xml trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp Removed: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersAction.java trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportProgress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportResult.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/imports.jsp Modified: trunk/echobase-entities/src/license/THIRD-PARTY.properties trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties trunk/echobase-entities/src/main/xmi/echobase.zargo trunk/echobase-ui/src/main/resources/config/struts-json.xml trunk/echobase-ui/src/main/resources/config/struts-user.xml trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties trunk/echobase-ui/src/main/resources/struts.xml trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/includes/menu.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportQueryForm.jsp Modified: trunk/echobase-entities/src/license/THIRD-PARTY.properties =================================================================== --- trunk/echobase-entities/src/license/THIRD-PARTY.properties 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-entities/src/license/THIRD-PARTY.properties 2011-11-08 17:51:54 UTC (rev 25) @@ -5,7 +5,6 @@ # - BSD style # - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 # - Common Public License Version 1.0 -# - General Public License (GPL) # - Indiana University Extreme! Lab Software License, vesion 1.1.1 # - Lesser General Public License (LGPL) v 3.0 # - Lesser General Public License (LPGL) @@ -19,9 +18,8 @@ # Please fill the missing licenses for dependencies : # # -#Thu Nov 03 15:02:42 CET 2011 +#Tue Nov 08 16:07:35 CET 2011 antlr--antlr--2.7.6=BSD License commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 dom4j--dom4j--1.6.1=BSD License javax.transaction--jta--1.1=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -echobase.title.dbEditor=Editeur de données Modified: trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties =================================================================== --- trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2011-11-08 17:51:54 UTC (rev 25) @@ -11,4 +11,5 @@ echobase.common.name=Nom echobase.common.password=Mot de passe echobase.common.sqlQuery=Requête SQL +echobase.common.survey= echobase.config.data.directory.description=Chemin de l'application Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo =================================================================== (Binary files differ) Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/SurveyService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/SurveyService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/SurveyService.java 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,39 @@ +package fr.ifremer.echobase.services; + +import fr.ifremer.echobase.EchoBaseTechnicalException; +import fr.ifremer.echobase.entities.EchoBaseDAOHelper; +import fr.ifremer.echobase.entities.Survey; +import fr.ifremer.echobase.entities.SurveyDAO; +import org.nuiton.topia.TopiaException; + +import java.util.List; + +/** + * Service to manage all concerning survey + * + * @author sletellier <letellier@codelutin.com> + */ +public class SurveyService extends AbstractEchoBaseService { + + public List<Survey> getSurveys() { + try { + List<Survey> surveys = getDAO().findAll(); + return surveys; + } catch (TopiaException eee) { + throw new EchoBaseTechnicalException(eee); + } + } + + public Survey getSurveyById(String topiaId) { + try { + Survey survey = getDAO().findByTopiaId(topiaId); + return survey; + } catch (TopiaException eee) { + throw new EchoBaseTechnicalException(eee); + } + } + + protected SurveyDAO getDAO() throws TopiaException { + return EchoBaseDAOHelper.getSurveyDAO(getTransaction()); + } +} Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,198 @@ +package fr.ifremer.echobase.services.models; + +import fr.ifremer.echobase.entities.Survey; +import org.apache.commons.lang.StringUtils; + +import java.io.File; + +/** + * Object representing all import configuration + * + * @author sletellier <letellier@codelutin.com> + */ +public class ImportModel { + + protected Survey surveySelected; + + protected File accessImport; + protected String accessImportFileName; + + protected File accousticImport; + protected String accousticImportFileName; + + protected File pecherieImport; + protected String pecherieImportFileName; + + protected File lectureAgeGenImport; + protected String lectureAgeGenImportFileName; + + protected File eventsImport; + protected String eventsImportFileName; + + protected File typeEchoSpeciesImport; + protected String typeEchoSpeciesImportFileName; + + protected String comment; + + public Survey getSurveySelected() { + return surveySelected; + } + + public void setSurveySelected(Survey surveySelected) { + this.surveySelected = surveySelected; + } + + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public File getAccessImport() { + return accessImport; + } + + public void setAccessImport(File accessImport) { + this.accessImport = accessImport; + } + + public String getAccessImportFileName() { + return accessImportFileName; + } + + public void setAccessImportFileName(String accessImportFileName) { + this.accessImportFileName = accessImportFileName; + } + + public File getAccousticImport() { + return accousticImport; + } + + public void setAccousticImport(File accousticImport) { + this.accousticImport = accousticImport; + } + + public String getAccousticImportFileName() { + return accousticImportFileName; + } + + public void setAccousticImportFileName(String accousticImportFileName) { + this.accousticImportFileName = accousticImportFileName; + } + + public File getPecherieImport() { + return pecherieImport; + } + + public void setPecherieImport(File pecherieImport) { + this.pecherieImport = pecherieImport; + } + + public String getPecherieImportFileName() { + return pecherieImportFileName; + } + + public void setPecherieImportFileName(String pecherieImportFileName) { + this.pecherieImportFileName = pecherieImportFileName; + } + + public File getLectureAgeGenImport() { + return lectureAgeGenImport; + } + + public void setLectureAgeGenImport(File lectureAgeGenImport) { + this.lectureAgeGenImport = lectureAgeGenImport; + } + + public String getLectureAgeGenImportFileName() { + return lectureAgeGenImportFileName; + } + + public void setLectureAgeGenImportFileName(String lectureAgeGenImportFileName) { + this.lectureAgeGenImportFileName = lectureAgeGenImportFileName; + } + + public File getEventsImport() { + return eventsImport; + } + + public void setEventsImport(File eventsImport) { + this.eventsImport = eventsImport; + } + + public String getEventsImportFileName() { + return eventsImportFileName; + } + + public void setEventsImportFileName(String eventsImportFileName) { + this.eventsImportFileName = eventsImportFileName; + } + + public File getTypeEchoSpeciesImport() { + return typeEchoSpeciesImport; + } + + public void setTypeEchoSpeciesImport(File typeEchoSpeciesImport) { + this.typeEchoSpeciesImport = typeEchoSpeciesImport; + } + + public String getTypeEchoSpeciesImportFileName() { + return typeEchoSpeciesImportFileName; + } + + public void setTypeEchoSpeciesImportFileName(String typeEchoSpeciesImportFileName) { + this.typeEchoSpeciesImportFileName = typeEchoSpeciesImportFileName; + } + + public boolean validate() { + + // access file or survey is selected, not both + boolean result = surveySelected == null ^ accessImport == null; + + // Less one of other import + result = result && (accessImport != null || + accousticImport != null || + lectureAgeGenImport != null || + pecherieImport != null || + eventsImport != null || + typeEchoSpeciesImport != null); + + return result; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + + // Add selected survey + if (surveySelected != null) { + addToBuilder(builder, "surveySelected", surveySelected.getName()); + } + + // Add all import files + addToBuilder(builder, "accessImportFile", accessImportFileName); + addToBuilder(builder, "accousticImportFile", accousticImportFileName); + addToBuilder(builder, "pecherieImportFile", pecherieImportFileName); + addToBuilder(builder, "lectureAgeGenImportFile", lectureAgeGenImportFileName); + addToBuilder(builder, "eventsImportFile", eventsImportFileName); + addToBuilder(builder, "pecherieImportFile", typeEchoSpeciesImportFileName); + + if (StringUtils.isNotEmpty(comment)) { + addToBuilder(builder, "comment", comment); + } + return builder.toString().trim(); + } + + protected void addToBuilder(StringBuilder builder, String name, String value) { + if (StringUtils.isNotEmpty(value)) { + builder.append(" "); + builder.append(name); + builder.append("["); + builder.append(value); + builder.append("]"); + } + } +} Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/ImportAction.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/ImportAction.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/ImportAction.java 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,82 @@ +package fr.ifremer.echobase.ui.actions; + +import com.google.common.collect.Maps; +import com.opensymphony.xwork2.Preparable; +import fr.ifremer.echobase.entities.Survey; +import fr.ifremer.echobase.services.SurveyService; +import fr.ifremer.echobase.services.models.ImportModel; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.List; +import java.util.Map; + +/** + * Action to manage imports + * + * @author sletellier <letellier@codelutin.com> + * @since 0.1 + */ +public class ImportAction extends EchoBaseActionSupport { + + protected static final Log log = LogFactory.getLog(ImportAction.class); + + protected ImportModel importModel; + + protected Map<String, String> surveys; + + public ImportModel getImportModel() { + if (importModel == null) { + importModel = new ImportModel(); + } + return importModel; + } + + public void setImportModel(ImportModel importModel) { + this.importModel = importModel; + } + + public String getSelectedSurvey() { + Survey surveySelected = getImportModel().getSurveySelected(); + if (surveySelected == null) { + return null; + } + return surveySelected.getTopiaId(); + } + + public void setSelectedSurvey(String selectedSurveyId) { + Survey selectedSurvey = newService(SurveyService.class).getSurveyById(selectedSurveyId); + getImportModel().setSurveySelected(selectedSurvey); + } + + public Map<String, String> getSurveys() { + return surveys; + } + + @Override + public String input() throws Exception { + + SurveyService service = newService(SurveyService.class); + List<Survey> allSurveys = service.getSurveys(); + + surveys = Maps.newHashMap(); + for (Survey survey : allSurveys) { + surveys.put(survey.getTopiaId(), survey.getName()); + } + + return INPUT; + } + + @Override + public String execute() throws Exception { + log.info("Will import : " + importModel.toString()); + return SUCCESS; + } + + @Override + public void validate() { + if (!importModel.validate()) { + addActionError(getText("echobase.error.importArgument")); + } + } +} Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersAction.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersAction.java 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersAction.java 2011-11-08 17:51:54 UTC (rev 25) @@ -1,73 +0,0 @@ -/* - * #%L - * EchoBase :: UI - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.ui.actions.json; - -import fr.ifremer.echobase.entities.EchoBaseUser; -import fr.ifremer.echobase.entities.EchoBaseUserDTO; -import fr.ifremer.echobase.services.UserService; -import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; - -import java.util.ArrayList; -import java.util.List; - -/** - * Obtains all users of the echobase internal database. - * - * @author sletellier <letellier@codelutin.com> - * @since 0.1 - */ -public class GetUsersAction extends EchoBaseActionSupport { - - private static final long serialVersionUID = 1L; - -// protected transient UserService service; - - protected List<EchoBaseUserDTO> users; - - public List<EchoBaseUserDTO> getUsers() { - return users; - } - -// protected UserService getUserService() { -// if (service == null) { -// service = newService(UserService.class); -// } -// return service; -// } - - @Override - public String execute() throws Exception { - -// List<EchoBaseUser> allUsers = getUserService().getUsers(); - List<EchoBaseUser> allUsers = newService(UserService.class).getUsers(); - - users = new ArrayList<EchoBaseUserDTO>(allUsers.size()); - for (EchoBaseUser user : allUsers) { - users.add(user.toDTO()); - } - - return SUCCESS; - } - -} Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersDatas.java (from rev 24, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersAction.java) =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersDatas.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersDatas.java 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,63 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.json; + +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.entities.EchoBaseUserDTO; +import fr.ifremer.echobase.services.UserService; +import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; + +import java.util.ArrayList; +import java.util.List; + +/** + * Obtains all users of the echobase internal database. + * + * @author sletellier <letellier@codelutin.com> + * @since 0.1 + */ +public class GetUsersDatas extends EchoBaseActionSupport { + + private static final long serialVersionUID = 1L; + + protected List<EchoBaseUserDTO> users; + + public List<EchoBaseUserDTO> getUsers() { + return users; + } + + @Override + public String execute() throws Exception { + + List<EchoBaseUser> allUsers = newService(UserService.class).getUsers(); + + users = new ArrayList<EchoBaseUserDTO>(allUsers.size()); + for (EchoBaseUser user : allUsers) { + users.add(user.toDTO()); + } + + return SUCCESS; + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/GetUsersDatas.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/resources/config/struts-import.xml =================================================================== --- trunk/echobase-ui/src/main/resources/config/struts-import.xml (rev 0) +++ trunk/echobase-ui/src/main/resources/config/struts-import.xml 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!DOCTYPE struts PUBLIC + "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" + "http://struts.apache.org/dtds/struts-2.1.7.dtd"> + +<struts> + + <package name="import" extends="loggued" namespace="/import"> + + <!-- Display import page --> + <action name="import" class="fr.ifremer.echobase.ui.actions.ImportAction" method="input"> + <interceptor-ref name="basicStackLoggued"/> + <result name="input">/WEB-INF/jsp/import/import.jsp</result> + <result name="success" type="redirectAction">doImport</result> + </action> + + <!-- Display import page --> + <action name="doImport" class="fr.ifremer.echobase.ui.actions.ImportAction"> + <interceptor-ref name="paramsPrepareParamsStackLoggued"/> + <result name="success">/WEB-INF/jsp/import/importProgress.jsp</result> + </action> + + </package> + +</struts> + Modified: trunk/echobase-ui/src/main/resources/config/struts-json.xml =================================================================== --- trunk/echobase-ui/src/main/resources/config/struts-json.xml 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/resources/config/struts-json.xml 2011-11-08 17:51:54 UTC (rev 25) @@ -23,7 +23,6 @@ #L% --> - <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.1.7.dtd"> @@ -33,7 +32,7 @@ <package name="json" extends="loggued" namespace="/json"> <action name="getUsers" - class="fr.ifremer.echobase.ui.actions.json.GetUsersAction"> + class="fr.ifremer.echobase.ui.actions.json.GetUsersDatas"> <interceptor-ref name="basicStackLoggued"/> <interceptor-ref name="checkUserIsAdmin"/> <result type="json"/> Modified: trunk/echobase-ui/src/main/resources/config/struts-user.xml =================================================================== --- trunk/echobase-ui/src/main/resources/config/struts-user.xml 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/resources/config/struts-user.xml 2011-11-08 17:51:54 UTC (rev 25) @@ -23,7 +23,6 @@ #L% --> - <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.1.7.dtd"> Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties =================================================================== --- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2011-11-08 17:51:54 UTC (rev 25) @@ -1,14 +1,17 @@ echobase.action.create=Créer echobase.action.delete=Suppression +echobase.action.import=Importer echobase.action.locale.english=Anglais echobase.action.locale.french=Français echobase.action.login=Connection echobase.action.logout=Déconnection echobase.action.save=Sauvegarder echobase.common.admin=Administrateur +echobase.common.comment=Commentaire echobase.common.email=Email +echobase.common.import=Import configuration echobase.common.password=Mot de passe -echobase.common.save=Sauvegarder +echobase.common.survey=Campagne echobase.common.tableName=Nom de la table echobase.common.user=Utilisateur echobase.error.bad.password=Mot de passe incorrrect @@ -19,6 +22,12 @@ echobase.export.queryDescription=Description echobase.export.queryName=Nom echobase.export.querySql=SQL +echobase.importFile.access=Base access +echobase.importFile.accoustique=Fichier accoustique +echobase.importFile.events=Fichier evenements +echobase.importFile.lectureAgeGen=Fichier lecture age +echobase.importFile.pecherie=Fichier pecherie +echobase.importFile.typeEchoSpecies=Fichier espèces echobase.info.no.table.selected=Aucune table sélectionnée echobase.label.admin.user.create=Création d'un utilisateur echobase.label.admin.user.delete=Suppression d'un utilisateur @@ -35,6 +44,7 @@ echobase.menu.logs=Logs echobase.menu.users=Utilisateurs echobase.msg.warnImportInProgress=Merci de ne pas fermer la fenêtre pour pouvoir acceder au résultats de l'import. +echobase.survey.selectHeader=Selectionnez une campagne echobase.title.export=Export echobase.title.import=Imports echobase.title.importProgress=Import en cours Modified: trunk/echobase-ui/src/main/resources/struts.xml =================================================================== --- trunk/echobase-ui/src/main/resources/struts.xml 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/resources/struts.xml 2011-11-08 17:51:54 UTC (rev 25) @@ -144,6 +144,7 @@ <include file="config/struts-dbeditor.xml"/> <include file="config/struts-json.xml"/> <include file="config/struts-user.xml"/> + <include file="config/struts-import.xml"/> </struts> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -41,7 +41,6 @@ <div id="body"> - <%-- TODO sletellier 20111104 : add this --%> <s:if test="hasActionMessages()"> <div class="info_success"> <s:actionmessage/> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/includes/menu.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/includes/menu.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/includes/menu.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -25,13 +25,13 @@ <div class="cleanBoth"> <ul> <li> - <s:a action="import"><s:text name="echobase.menu.import"/></s:a> + <s:a action="import" namespace="/import"><s:text name="echobase.menu.import"/></s:a> </li> <li> <s:a action="export"><s:text name="echobase.menu.export"/></s:a> </li> <li> - <s:a action="export"><s:text name="echobase.menu.logs"/></s:a> + <s:a action="logs"><s:text name="echobase.menu.logs"/></s:a> </li> <s:if test="%{userIsAdmin}"> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -43,7 +43,7 @@ </script> <div> - <s:select key="tableName" href='%{getTableNamesUrl}' + <s:select key="tableName" label='%{getText("echobase.common.tableName")}' list="tableNames" headerKey="" headerValue=""/> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportQueryForm.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportQueryForm.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportQueryForm.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -49,7 +49,7 @@ <s:url id="saveExportQueryUrl" action="saveExportQuery" namespace="export"/> <s:set id="saveExportQueryText"> - <s:text name="echobase.common.save"/> + <s:text name="echobase.action.save"/> </s:set> <sj:submit id="saveQuery" Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportProgress.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportProgress.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportProgress.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -1,33 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> - -<title><s:text name="echobase.title.importProgress"/></title> - -<sj:progressbar value="%{EchoBaseActionContext.progression}"/> - -<%-- TODO letellier 20111104 : Add warn icon --%> -<p><s:text name="echobase.msg.warnImportInProgress"/></p> \ No newline at end of file Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportResult.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportResult.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportResult.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -1,29 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<title><s:text name="echobase.title.importResult"/></title> - -<%-- TODO letellier 20111104 : Add import results --%> \ No newline at end of file Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp (from rev 24, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/imports.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,56 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.import"/></title> + +<s:form id="importForm" action="import" namespace="/import" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.common.import"/> + </legend> + <s:select + key="selectedSurvey" + label='%{getText("echobase.common.survey")}' + list="surveys" + emptyOption="true" + headerKey="-1" + headerValue='%{getText("echobase.survey.selectHeader")}' + /> + + <s:file name="importModel.accessImport" key="echobase.importFile.access"/> + <s:file name="importModel.accousticImport" key="echobase.importFile.accoustique"/> + <s:file name="importModel.pecherieImport" key="echobase.importFile.pecherie"/> + <s:file name="importModel.lectureAgeGenImport" key="echobase.importFile.lectureAgeGen"/> + <s:file name="importModel.eventsImport" key="echobase.importFile.events"/> + <s:file name="importModel.typeEchoSpeciesImport" key="echobase.importFile.typeEchoSpecies"/> + + <s:textarea name="importModel.comment" key="echobase.common.comment"/> + + </fieldset> + <br/> + <s:submit id="addFilesSubmit" value='%{getText("echobase.action.import")}'/> +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp (from rev 24, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportProgress.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,33 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + +<title><s:text name="echobase.title.importProgress"/></title> + +<sj:progressbar value="%{EchoBaseActionContext.progression}"/> + +<%-- TODO letellier 20111104 : Add warn icon --%> +<p><s:text name="echobase.msg.warnImportInProgress"/></p> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp (from rev 24, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/ImportResult.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -0,0 +1,29 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importResult"/></title> + +<%-- TODO letellier 20111104 : Add import results --%> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/imports.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/imports.jsp 2011-11-08 14:08:22 UTC (rev 24) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/imports.jsp 2011-11-08 17:51:54 UTC (rev 25) @@ -1,43 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<title><s:text name="echobase.title.import"/></title> - -<s:form id="importForm" action="importFiles" namespace="/import" method="POST" enctype="multipart/form-data"> - - <%-- TODO letellier 20111104 : Allow to select existing campagne --%> - - <s:file name="accoustique" key="echobase.importFile.accoustique"/> - <s:file name="pecherie" key="echobase.importFile.pecherie"/> - <s:file name="lectureAgeGen" key="echobase.importFile.lectureAgeGen"/> - <s:file name="events" key="echobase.importFile.events"/> - <s:file name="typeEchoSpecies" key="echobase.importFile.typeEchoSpecies"/> - - <s:textarea name="comment" key="echobase.common.comment"/> - - <s:submit id="addFilesSubmit" - value="%{saveText}"/> -</s:form> \ No newline at end of file
participants (1)
-
sletellier@users.forge.codelutin.com