=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties 2014-09-12 15:30:51 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties 2014-10-06 13:02:52 +0000 @@ -730,6 +730,7 @@ search_for_user_groups=Search for user groups object_will_created_public=This object will be created with public edit and view rights object_will_created_private=This object will be private to yourself +created_by=Created by #-- Countries / flags ---------------------------------------------------------# === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SharingController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SharingController.java 2014-05-22 12:40:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SharingController.java 2014-10-06 13:02:52 +0000 @@ -83,7 +83,7 @@ @Autowired private AclService aclService; - @RequestMapping( value = "", produces = { "application/json", "text/*" } ) + @RequestMapping( method = RequestMethod.GET, produces = { "application/json" } ) public void getSharing( @RequestParam String type, @RequestParam String id, HttpServletResponse response ) throws IOException { if ( !aclService.isShareable( type ) ) @@ -154,7 +154,7 @@ JacksonUtils.toJson( response.getOutputStream(), sharing ); } - @RequestMapping( value = "", method = { RequestMethod.POST, RequestMethod.PUT }, consumes = "application/json" ) + @RequestMapping( method = { RequestMethod.POST, RequestMethod.PUT }, consumes = "application/json" ) public void setSharing( @RequestParam String type, @RequestParam String id, HttpServletResponse response, HttpServletRequest request ) throws IOException { Class sharingClass = aclService.classForType( type ); @@ -251,7 +251,7 @@ ContextUtils.okResponse( response, "Access control set" ); } - @RequestMapping( value = "/search", produces = { "application/json", "text/*" } ) + @RequestMapping( value = "/search", method = RequestMethod.GET, produces = { "application/json" } ) public void searchUserGroups( @RequestParam String key, HttpServletResponse response ) throws IOException { SharingUserGroups sharingUserGroups = new SharingUserGroups(); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js 2014-05-26 21:36:48 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js 2014-10-06 13:02:52 +0000 @@ -140,6 +140,15 @@ return v; } +function setCreatedBy( user ) { + if ( user && user.name ) { + $('#sharingUser').text(user.name); + } + else { + $('#sharingUser').text("[None]"); + } +} + function showSharingDialogWithContext( context ) { // context always give type which starts with UpperCase var type = context.type.charAt(0).toLowerCase() + context.type.slice(1); @@ -148,6 +157,7 @@ function showSharingDialog( type, uid ) { loadSharingSettings(type, uid).done(function( data ) { + setCreatedBy(data.object.user); setPublicAccess(data.object.publicAccess); setExternalAccess(data.object.externalAccess); setUserGroupAccesses(data.object.userGroupAccesses); @@ -170,7 +180,7 @@ modal: true, resizable: false, width: 485, - height: 480, + height: 500, buttons: { 'Cancel': function() { $(this).dialog('close'); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2014-09-24 11:57:54 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2014-10-06 13:02:52 +0000 @@ -333,10 +333,9 @@ - - + @@ -344,7 +343,10 @@ - + + + +
$i18n.getString( "external_access" )$i18n.getString( "created_by" ):
$i18n.getString( "external_access" )