Author: bleny Date: 2011-06-06 15:47:32 +0000 (Mon, 06 Jun 2011) New Revision: 1320 Log: fix links in ObsMer|Vente sampling plan Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java trunk/wao-ui/src/main/webapp/SamplingPlan.tml Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java 2011-06-06 15:36:16 UTC (rev 1319) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java 2011-06-06 15:47:32 UTC (rev 1320) @@ -39,6 +39,7 @@ import fr.ifremer.wao.ui.components.SamplingFilterComponent; import fr.ifremer.wao.ui.data.ExportStreamResponse; import fr.ifremer.wao.ui.data.RequiresAuthentication; +import fr.ifremer.wao.ui.data.WaoActivationContext; import fr.ifremer.wao.ui.services.WaoManager; import org.apache.commons.collections.CollectionUtils; import org.apache.tapestry5.StreamResponse; @@ -609,5 +610,18 @@ boolean rowHasHistoric = CollectionUtils.isNotEmpty(row.getSampleRowLog()); return rowHasHistoric; } - + + public String[] getContextForEditingSampleRow() { + WaoActivationContext waoActivationContext = WaoActivationContext.newEmptyContext(); + waoActivationContext.setSampleRowId(row.getTopiaId()); + return waoActivationContext.toStrings(); + } + + public String[] getContextForBoats() { + WaoActivationContext contextForBoats = + WaoActivationContext.newEmptyContext(); + contextForBoats.setSampleRowCode(row.getCode()); + return contextForBoats.toStrings(); + } + } Modified: trunk/wao-ui/src/main/webapp/SamplingPlan.tml =================================================================== --- trunk/wao-ui/src/main/webapp/SamplingPlan.tml 2011-06-06 15:36:16 UTC (rev 1319) +++ trunk/wao-ui/src/main/webapp/SamplingPlan.tml 2011-06-06 15:47:32 UTC (rev 1320) @@ -282,7 +282,7 @@ <td class="${actionsClass} bright" style="white-space: nowrap;"> <t:unless t:test="user.guest"> <t:if t:test="rowNotFinished"> - <a t:type="pagelink" t:page="boats" t:context="row.code"> + <a t:type="pagelink" t:page="boats" t:context="contextForBoats"> <img src="${asset:context:}/img/boat.png" alt="${message:wao.ui.entity.Boats}" /> </a> <p:else> @@ -296,7 +296,7 @@ </t:unless> </t:unless> <t:if t:test="canEditSampleRow()"> - <a t:type="pagelink" t:page="sampleRowForm" t:context="row.topiaId" title="${message:wao.ui.action.edit}"> + <a t:type="pagelink" t:page="sampleRowForm" t:context="contextForEditingSampleRow" title="${message:wao.ui.action.edit}"> <img src="${asset:context:}/img/edit.png" alt="${message:wao.ui.action.edit}" /> </a> <t:unless t:test="row.hasSampleMonthRealTideTime()">