=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2012-11-06 07:01:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2012-12-07 18:16:00 +0000
@@ -67,7 +67,7 @@
private DataSet dataSet;
- private Period period; // Applicable to data set report
+ private Period period; // Applicable to report table and data set report
private OrganisationUnit organisationUnit; // Applicable to report table and data set report
@@ -103,9 +103,10 @@
this.created = new Date();
}
- public Interpretation( ReportTable reportTable, OrganisationUnit organisationUnit, String text )
+ public Interpretation( ReportTable reportTable, Period period, OrganisationUnit organisationUnit, String text )
{
this.reportTable = reportTable;
+ this.period = period;
this.organisationUnit = organisationUnit;
this.text = text;
this.created = new Date();
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2012-11-05 19:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2012-12-07 18:16:00 +0000
@@ -157,6 +157,7 @@
@RequestMapping( value = "/reportTable/{uid}", method = RequestMethod.POST, consumes = { "text/html", "text/plain" } )
public void shareReportTableInterpretation(
@PathVariable( "uid" ) String reportTableUid,
+ @RequestParam( value = "pe", required = false ) String isoPeriod,
@RequestParam( value = "ou", required = false ) String orgUnitUid,
@RequestBody String text, HttpServletResponse response ) throws IOException
{
@@ -167,7 +168,9 @@
ContextUtils.conflictResponse( response, "Report table identifier not valid: " + reportTableUid );
return;
}
-
+
+ Period period = PeriodType.getPeriodFromIsoString( isoPeriod );
+
OrganisationUnit orgUnit = null;
if ( orgUnitUid != null )
@@ -181,7 +184,7 @@
}
}
- Interpretation interpretation = new Interpretation( reportTable, orgUnit, text );
+ Interpretation interpretation = new Interpretation( reportTable, period, orgUnit, text );
interpretationService.saveInterpretation( interpretation );
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2012-12-06 09:20:32 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2012-12-07 18:16:00 +0000
@@ -33,9 +33,10 @@
$encoder.htmlEncode( $ip.map.name )
#elseif( $ip.reportTableInterpretation )
#if( $ip.organisationUnit )#set( $ou = "&ou=" + $ip.organisationUnit.uid )#else#set( $ou = "" )#end
+ #if( $ip.period )#set( $pe = "&pe=" + $ip.period.isoDate )#else#set( $pe = "" )#end
+ href="../dhis-web-reporting/exportTable.action?uid=${ip.reportTable.uid}${pe}${ou}">
$encoder.htmlEncode( $ip.reportTable.name )
#elseif( $ip.dataSetReportInterpretation )
-
+
#parse( "dhis-web-commons/ajax/htmlGrid.vm" )