=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/event/DataValue.java' --- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/event/DataValue.java 2013-07-04 08:55:19 +0000 +++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/event/DataValue.java 2013-07-05 04:25:13 +0000 @@ -29,7 +29,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import org.hisp.dhis.common.DxfNamespaces; /** * @author Morten Olav Hansen === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/EventController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/EventController.java 2013-07-04 08:55:19 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/EventController.java 2013-07-05 04:25:13 +0000 @@ -37,7 +37,6 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; -import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -46,14 +45,13 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.InputStream; import java.util.Map; /** * @author Morten Olav Hansen */ @Controller -@RequestMapping(value = EventController.RESOURCE_PATH) +@RequestMapping( value = EventController.RESOURCE_PATH ) public class EventController { public static final String RESOURCE_PATH = "/events"; @@ -84,17 +82,18 @@ if ( options.hasLinks() ) { - event.setHref( ContextUtils.getRootPath( request ) + "/events/" + uid ); + event.setHref( ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + uid ); } model.addAttribute( "model", event ); + model.addAttribute( "viewClass", options.getViewClass( "detailed" ) ); - return StringUtils.uncapitalize( "event" ); + return "event"; } @RequestMapping( method = RequestMethod.POST, consumes = "application/xml" ) @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_DATAVALUE_ADD')" ) - public void postXmlObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception + public void postXmlObject( HttpServletResponse response, HttpServletRequest request ) throws Exception { ImportSummaries importSummaries = eventService.saveEventsXml( request.getInputStream() ); JacksonUtils.toXml( response.getOutputStream(), importSummaries ); @@ -102,13 +101,13 @@ @RequestMapping( method = RequestMethod.POST, consumes = "application/json" ) @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_DATAVALUE_ADD')" ) - public void postJsonObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception + public void postJsonObject( HttpServletResponse response, HttpServletRequest request ) throws Exception { ImportSummaries importSummaries = eventService.saveEventsJson( request.getInputStream() ); JacksonUtils.toJson( response.getOutputStream(), importSummaries ); } - @ExceptionHandler(IllegalArgumentException.class) + @ExceptionHandler( IllegalArgumentException.class ) public void handleError( IllegalArgumentException ex, HttpServletResponse response ) { ContextUtils.conflictResponse( response, ex.getMessage() ); === added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/event.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/event.xsl 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/event.xsl 2013-07-05 04:25:13 +0000 @@ -0,0 +1,41 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID
Program
Program Stage
Organisation Unit
Event Date
Completed
Stored By
+ +
+
+ +
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2013-05-31 05:04:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2013-07-05 04:25:13 +0000 @@ -57,6 +57,7 @@ +