Author: echatellier Date: 2013-02-14 16:01:31 +0100 (Thu, 14 Feb 2013) New Revision: 107 Url: http://forge.codelutin.com/projects/cantharella/repository/revisions/107 Log: refs #1653: Gestion des donn?\195?\169es binaire des fichiers en bytea; Added: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn$ButtonPanel.html trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn.java trunk/cantharella.web/src/main/webapp/images/download.png Modified: trunk/cantharella.data/src/main/java/nc/ird/cantharella/data/model/Document.java trunk/cantharella.data/src/main/resources/sql/dev_update.sql trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ManageDocumentPage.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ReadDocumentPage.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/LinkableImagePropertyColumn.java trunk/cantharella.web/src/main/resources/web_en.properties trunk/cantharella.web/src/main/resources/web_fr.properties Modified: trunk/cantharella.data/src/main/java/nc/ird/cantharella/data/model/Document.java =================================================================== --- trunk/cantharella.data/src/main/java/nc/ird/cantharella/data/model/Document.java 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.data/src/main/java/nc/ird/cantharella/data/model/Document.java 2013-02-14 15:01:31 UTC (rev 107) @@ -23,7 +23,6 @@ package nc.ird.cantharella.data.model; -import java.io.InputStream; import java.util.Date; import javax.persistence.Basic; @@ -103,10 +102,9 @@ @Length(max = LENGTH_MEDIUM_TEXT) private String fileName; - /* File data. - @Lob - @Basic(fetch=FetchType.LAZY, optional=true) - private byte[] fileContent;*/ + /** File data. */ + @Basic(fetch = FetchType.LAZY) + private byte[] fileContent; /** File mime type. */ @NotEmpty @@ -201,13 +199,13 @@ this.fileName = fileName; } - /*public byte[] getFileContent() { + public byte[] getFileContent() { return fileContent; } public void setFileContent(byte[] fileContent) { this.fileContent = fileContent; - }*/ + } public String getFileMimetype() { return fileMimetype; Modified: trunk/cantharella.data/src/main/resources/sql/dev_update.sql =================================================================== --- trunk/cantharella.data/src/main/resources/sql/dev_update.sql 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.data/src/main/resources/sql/dev_update.sql 2013-02-14 15:01:31 UTC (rev 107) @@ -91,7 +91,7 @@ dateCreation timestamp not null, description text, editeur varchar(100) not null, - fileContent oid, + fileContent bytea;, fileMimetype varchar(60) not null, fileName varchar(60) not null, langue varchar(2), Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ManageDocumentPage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ManageDocumentPage.java 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ManageDocumentPage.java 2013-02-14 15:01:31 UTC (rev 107) @@ -265,7 +265,7 @@ public void onValidate() { final FileUpload uploadedFile = fileUploadField.getFileUpload(); if (uploadedFile != null) { - //documentModel.getObject().setFileContent(uploadedFile.getBytes()); + documentModel.getObject().setFileContent(uploadedFile.getBytes()); documentModel.getObject().setFileName(uploadedFile.getClientFileName()); documentModel.getObject().setFileMimetype(uploadedFile.getContentType()); Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ReadDocumentPage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ReadDocumentPage.java 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/document/ReadDocumentPage.java 2013-02-14 15:01:31 UTC (rev 107) @@ -120,7 +120,7 @@ @Override public void onSuccess() { - successNextPage(ManageLotPage.class, ACTION_DELETE); + successNextPage(ManageDocumentPage.class, ACTION_DELETE); redirect(); } }); Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html 2013-02-14 15:01:31 UTC (rev 107) @@ -181,7 +181,7 @@ <fieldset> <legend><wicket:message key="ListDocumentsPage.AttachedDocuments" /></legend> <div wicket:id="ListDocumentsPage.AttachedDocuments.Refresh"> - <table cellspacing="0" wicket:id="ListDocumentsPage.AttachedDocuments"/> + <table class="large" cellspacing="0" wicket:id="ListDocumentsPage.AttachedDocuments"/> </div> <a wicket:id="NewDocument" class="add"><wicket:message key="ListDocumentsPage.NewDocument" /></a> </fieldset> Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java 2013-02-14 15:01:31 UTC (rev 107) @@ -22,6 +22,10 @@ */ package nc.ird.cantharella.web.pages.domain.molecule; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -47,6 +51,7 @@ import nc.ird.cantharella.web.pages.TemplatePage; import nc.ird.cantharella.web.pages.domain.campagne.ManageCampagnePage; import nc.ird.cantharella.web.pages.domain.document.ManageDocumentPage; +import nc.ird.cantharella.web.pages.domain.document.ReadDocumentPage; import nc.ird.cantharella.web.pages.domain.extraction.ReadExtractionPage; import nc.ird.cantharella.web.pages.domain.purification.ReadPurificationPage; import nc.ird.cantharella.web.pages.renderers.ProduitRenderer; @@ -54,6 +59,9 @@ import nc.ird.cantharella.web.utils.behaviors.JSConfirmationBehavior; import nc.ird.cantharella.web.utils.behaviors.MoleculeEditorBehavior; import nc.ird.cantharella.web.utils.behaviors.MoleculeViewBehavior; +import nc.ird.cantharella.web.utils.columns.AjaxButtonPropertyColumn; +import nc.ird.cantharella.web.utils.columns.LinkPropertyColumn; +import nc.ird.cantharella.web.utils.columns.LinkableImagePropertyColumn; import nc.ird.cantharella.web.utils.forms.AutoCompleteTextFieldString; import nc.ird.cantharella.web.utils.forms.AutoCompleteTextFieldString.ComparisonMode; import nc.ird.cantharella.web.utils.forms.SubmittableButton; @@ -66,6 +74,7 @@ import nc.ird.cantharella.web.utils.security.AuthRoles; import nc.ird.cantharella.web.utils.security.AuthSession; +import org.apache.commons.io.IOUtils; import org.apache.wicket.AttributeModifier; import org.apache.wicket.MarkupContainer; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -96,6 +105,7 @@ import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; +import org.apache.wicket.request.http.WebResponse; import org.apache.wicket.spring.injection.annot.SpringBean; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -278,21 +288,6 @@ formView.add(new TextField<String>("Molecule.createur", new PropertyModel<String>(moleculeModel, "createur")) .setEnabled(false)); - // Action : création d'un nouveau document - // ajaxSubmitLink permet de sauvegarder l'état du formulaire - formView.add(new AjaxSubmitLink("NewDocument") { - @Override - protected void onSubmit(AjaxRequestTarget request, Form<?> form) { - setResponsePage(new ManageDocumentPage(currentPage, moleculeModel.getObject(), false)); - } - - // si erreur, le formulaire est également enregistré puis la redirection effectuée - @Override - protected void onError(AjaxRequestTarget target, Form<?> form) { - setResponsePage(new ManageDocumentPage(currentPage, moleculeModel.getObject(), false)); - } - }.setVisibilityAllowed(editEnabled)); - // Action : création du lot Button createButton = new SubmittableButton(ACTION_CREATE, new SubmittableButtonEvents() { @Override @@ -606,7 +601,7 @@ * @param documentAttachable entity to get documents * @param currentPage current page */ - private void initAttachedDocumentsTable(final Form<Void> formView, final DocumentAttachable documentAttachable, CallerPage currentPage) { + private void initAttachedDocumentsTable(final Form<Void> formView, final DocumentAttachable documentAttachable, final CallerPage currentPage) { List<Document> documents = documentAttachable.getDocuments(); @@ -617,48 +612,77 @@ formView.add(attachedDocumentRefresh); SimpleSortableListDataProvider<Document> attachedDocumentsDataProvider = - new SimpleSortableListDataProvider<Document>( - documents, getSession().getLocale()); + new SimpleSortableListDataProvider<Document>(documents, getSession().getLocale()); List<IColumn<Document>> columns = new ArrayList<IColumn<Document>>(); + columns.add(new LinkPropertyColumn<Document>( + new Model<String>(getString("Document.titre")), "titre", "titre") { + @Override + public void onClick(Item<ICellPopulator<Document>> item, String componentId, IModel<Document> model) { + setResponsePage(new ReadDocumentPage(model.getObject(), documentAttachable, currentPage)); + } + }); + columns.add(new PropertyColumn<Document>( - new Model<String>(getString("Document.titre")), "titre", "titre")); - - columns.add(new PropertyColumn<Document>( new Model<String>(getString("Document.typeDocument")), "typeDocument.nom", "typeDocument.nom")); - + columns.add(new PropertyColumn<Document>( new Model<String>(getString("Document.createur")), "createur", "createur")); - - columns.add(new PropertyColumn<Document>( - new Model<String>(getString("Document.fileName")), "fileName", "fileName")); - columns.add(new AbstractColumn<Document>(new Model<String>(), "idMolecule") { + columns.add(new LinkableImagePropertyColumn<Document>(new Model<String>(getString("Document.link")), + "images/download.png", getString("Document.link"), getString("Document.link")) { @Override - public void populateItem(Item<ICellPopulator<Document>> cellItem, String componentId, final IModel<Document> rowModel) { - cellItem.add(new AjaxFallbackButton(componentId, new Model<String>(getString("Delete")), formView) { - @Override - protected void onSubmit(AjaxRequestTarget target, Form<?> form) { - documentAttachable.removeDocument(rowModel.getObject()); + public void onClick(Item<ICellPopulator<Document>> item, String componentId, IModel<Document> model) { - if (target != null) { - target.add(attachedDocumentRefresh); - refreshFeedbackPage(target); - } - } + Document document = model.getObject(); + WebResponse response = (WebResponse) getResponse(); + response.setContentType(document.getFileMimetype()); + response.setAttachmentHeader(document.getFileName()); - @Override - protected void onError(AjaxRequestTarget target, Form<?> form) { - // never called - } - }); + OutputStream out = getResponse().getOutputStream(); + InputStream in = new ByteArrayInputStream(document.getFileContent()); + try { + IOUtils.copy(in, out); + } catch (IOException e) { + e.printStackTrace(); + } } }); final DataTable<Document> attachedDocumentTable = new AjaxFallbackDefaultDataTable<Document>("ListDocumentsPage.AttachedDocuments", columns, attachedDocumentsDataProvider, WebContext.ROWS_PER_PAGE); + + columns.add(new AjaxButtonPropertyColumn<Document>(new Model<String>(getString("Actions")), + new Model<String>(getString("Delete")), formView) { + @Override + public void onSubmit(AjaxRequestTarget target, Form<?> form, IModel<Document> model) { + Document document = model.getObject(); + documentAttachable.removeDocument(document); + + if (target != null) { + target.add(attachedDocumentTable); + refreshFeedbackPage(target); + } + } + }); + attachedDocumentRefresh.add(attachedDocumentTable); + + // Action : création d'un nouveau document + // ajaxSubmitLink permet de sauvegarder l'état du formulaire + formView.add(new AjaxSubmitLink("NewDocument") { + @Override + protected void onSubmit(AjaxRequestTarget request, Form<?> form) { + setResponsePage(new ManageDocumentPage(currentPage, moleculeModel.getObject(), false)); + } + + // si erreur, le formulaire est également enregistré puis la redirection effectuée + @Override + protected void onError(AjaxRequestTarget target, Form<?> form) { + setResponsePage(new ManageDocumentPage(currentPage, moleculeModel.getObject(), false)); + } + }.setVisibilityAllowed(true)); } /** Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java 2013-02-14 15:01:31 UTC (rev 107) @@ -22,6 +22,10 @@ */ package nc.ird.cantharella.web.pages.domain.molecule; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.util.ArrayList; import java.util.List; @@ -48,6 +52,7 @@ import nc.ird.cantharella.web.utils.behaviors.MoleculeViewBehavior; import nc.ird.cantharella.web.utils.behaviors.ReplaceEmptyLabelBehavior; import nc.ird.cantharella.web.utils.columns.LinkPropertyColumn; +import nc.ird.cantharella.web.utils.columns.LinkableImagePropertyColumn; import nc.ird.cantharella.web.utils.forms.SubmittableButton; import nc.ird.cantharella.web.utils.forms.SubmittableButtonEvents; import nc.ird.cantharella.web.utils.models.DisplayBooleanPropertyModel; @@ -61,6 +66,7 @@ import nc.ird.cantharella.web.utils.security.AuthRoles; import nc.ird.cantharella.web.utils.security.AuthSession; +import org.apache.commons.io.IOUtils; import org.apache.wicket.AttributeModifier; import org.apache.wicket.MarkupContainer; import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable; @@ -80,6 +86,7 @@ import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; +import org.apache.wicket.request.http.WebResponse; import org.apache.wicket.spring.injection.annot.SpringBean; /** @@ -312,13 +319,30 @@ columns.add(new PropertyColumn<Document>( new Model<String>(getString("Document.typeDocument")), "typeDocument.nom", "typeDocument.nom")); - + columns.add(new PropertyColumn<Document>( new Model<String>(getString("Document.createur")), "createur", "createur")); - - columns.add(new PropertyColumn<Document>( - new Model<String>(getString("Document.fileName")), "fileName", "fileName")); + columns.add(new LinkableImagePropertyColumn<Document>(new Model<String>(getString("Document.link")), + "images/download.png", getString("Document.link"), getString("Document.link")) { + @Override + public void onClick(Item<ICellPopulator<Document>> item, String componentId, IModel<Document> model) { + + Document document = model.getObject(); + WebResponse response = (WebResponse) getResponse(); + response.setContentType(document.getFileMimetype()); + response.setAttachmentHeader(document.getFileName()); + + OutputStream out = getResponse().getOutputStream(); + InputStream in = new ByteArrayInputStream(document.getFileContent()); + try { + IOUtils.copy(in, out); + } catch (IOException e) { + e.printStackTrace(); + } + } + }); + final DataTable<Document> attachedDocumentTable = new AjaxFallbackDefaultDataTable<Document>("ListDocumentsPage.AttachedDocuments", columns, attachedDocumentsDataProvider, WebContext.ROWS_PER_PAGE); add(attachedDocumentTable); Added: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn$ButtonPanel.html =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn$ButtonPanel.html (rev 0) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn$ButtonPanel.html 2013-02-14 15:01:31 UTC (rev 107) @@ -0,0 +1,31 @@ +<!-- + #%L + Cantharella :: Web + $Id:$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 IRD (Institut de Recherche pour le Developpement) and by respective authors (see below) + %% + 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% + --> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> +<body> +<wicket:panel> + <input type="submit" wicket:id="button" /> +</wicket:panel> +</body> +</html> \ No newline at end of file Added: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn.java (rev 0) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn.java 2013-02-14 15:01:31 UTC (rev 107) @@ -0,0 +1,110 @@ +/* + * #%L + * Cantharella :: Web + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2012 IRD (Institut de Recherche pour le Developpement) and by respective authors (see below) + * %% + * 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 nc.ird.cantharella.web.utils.columns; + +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.form.AjaxButton; +import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator; +import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn; +import org.apache.wicket.markup.html.form.Form; +import org.apache.wicket.markup.html.panel.Panel; +import org.apache.wicket.markup.repeater.Item; +import org.apache.wicket.model.IModel; +import org.apache.wicket.model.Model; + +/** + * Column embeded in a datatable which represent an linkable image + * @author Adrien Cheype + * @param <T> Generic type + */ +abstract public class AjaxButtonPropertyColumn<T> extends AbstractColumn<T> { + + /** Title displayed for the button */ + private Model<String> buttonLabel; + + /** Form. */ + private Form<?> form; + + /** + * Constructor + * @param imageSrc Relative url for the image + * @param linkTitle Title displayed for the link + * @param altMessage Alternative message displayed when image can't be rendered + */ + public AjaxButtonPropertyColumn(Model<String> buttonLabel, Form<?> form) { + this(new Model<String>(), buttonLabel, form); + } + + /** + * Constructor + * @param displayModel header display model + * @param imageSrc Relative url for the image + * @param linkTitle Title displayed for the link + * @param altMessage Alternative message displayed when image can't be rendered + */ + public AjaxButtonPropertyColumn(IModel<String> displayModel, Model<String> buttonLabel, Form<?> form) { + super(displayModel); + this.buttonLabel = buttonLabel; + this.form = form; + } + + /** {@inheritDoc} */ + @Override + public void populateItem(Item<ICellPopulator<T>> item, String componentId, IModel<T> model) { + ButtonPanel panel = new ButtonPanel(item, componentId, model); + item.add(panel); + } + + /** + * Override this method to react to link clicks. Your own/internal row id will most likely be inside the model. + * @param item Item + * @param componentId Component id + * @param model Model + */ + public abstract void onSubmit(AjaxRequestTarget target, Form<?> form, IModel<T> model); + + /** + * Panel which include a linkable image. Used with the LinkableImagePropertyColumn$LinkablePanel.html file + */ + public class ButtonPanel extends Panel { + + /** + * Constructor + * @param item Item + * @param componentId Component id + * @param model Model + */ + public ButtonPanel(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> model) { + super(componentId); + + AjaxButton button = new AjaxButton("button", buttonLabel, form) { + @Override + protected void onSubmit(AjaxRequestTarget target, Form<?> form) { + AjaxButtonPropertyColumn.this.onSubmit(target, form, model); + } + }; + + add(button); + } + } +} \ No newline at end of file Property changes on: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/AjaxButtonPropertyColumn.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/LinkableImagePropertyColumn.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/LinkableImagePropertyColumn.java 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/columns/LinkableImagePropertyColumn.java 2013-02-14 15:01:31 UTC (rev 107) @@ -55,7 +55,18 @@ * @param altMessage Alternative message displayed when image can't be rendered */ public LinkableImagePropertyColumn(String imageSrc, String linkTitle, String altMessage) { - super(new Model<String>()); + this(new Model<String>(), imageSrc, linkTitle, altMessage); + } + + /** + * Constructor + * @param displayModel header display model + * @param imageSrc Relative url for the image + * @param linkTitle Title displayed for the link + * @param altMessage Alternative message displayed when image can't be rendered + */ + public LinkableImagePropertyColumn(IModel<String> displayModel, String imageSrc, String linkTitle, String altMessage) { + super(displayModel); this.imageSrc = imageSrc; this.linkTitle = linkTitle; this.altMessage = altMessage; Modified: trunk/cantharella.web/src/main/resources/web_en.properties =================================================================== --- trunk/cantharella.web/src/main/resources/web_en.properties 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/resources/web_en.properties 2013-02-14 15:01:31 UTC (rev 107) @@ -385,7 +385,7 @@ Molecule.masseMolaire.Required=Molar mass - can’t be null Molecule.masseMolaire.IConverter.BigDecimal=Molar mass - must be a decimal number -TestBio.date.IConverter.Date= The date is incorrectly formatted (DD/MM/YY) +TestBio.date.IConverter.Date=The date is incorrectly formatted (DD/MM/YY) TestBio.concMasseDefaut.IConverter.BigDecimal=Default Conc./Mass - must be a decimal number TestBio.resultats.valeur.IConverter.BigDecimal=Value - must be a decimal number TestBio.resultats.repere.Required=Mark – can’t be null @@ -408,6 +408,9 @@ TestBio.resultats.noProduit=The bioassay must contain at least a result of type "product" TestBio.resultsNotAccessibles=Some results are not displayed because you don't have the required rights over their products. +Document.dateCreation.IConverter.Date=The date is incorrectly formatted (DD/MM/YY) +Document.link=Link + #BASIC# Actions=Actions Submit=Submit Modified: trunk/cantharella.web/src/main/resources/web_fr.properties =================================================================== --- trunk/cantharella.web/src/main/resources/web_fr.properties 2013-02-14 01:47:03 UTC (rev 106) +++ trunk/cantharella.web/src/main/resources/web_fr.properties 2013-02-14 15:01:31 UTC (rev 107) @@ -406,6 +406,9 @@ TestBio.resultats.noProduit=Le test biologique doit comporter au moins un résultat de type "produit" TestBio.resultsNotAccessibles=Certains résultats ne sont pas affichés car vous n'avez pas les droits nécessaires sur leur produit. +Document.dateCreation.IConverter.Date=La date est mal formatée (JJ/MM/AA) +Document.link=Lien + #BASIC# Actions=Actions Submit=Valider Added: trunk/cantharella.web/src/main/webapp/images/download.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/images/download.png ___________________________________________________________________ Added: svn:mime-type + image/png