← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15974: event capture - note/comment recording

 

------------------------------------------------------------
revno: 15974
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Sun 2014-07-06 14:46:18 +0200
message:
  event capture - note/comment recording
added:
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/notes.html
modified:
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/customForm.html
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/eventList.html


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json	2014-07-05 09:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json	2014-07-06 12:46:18 +0000
@@ -10,6 +10,9 @@
     "no_registered_event": "There are no registered events.",
     "event_registration_error": "Error in event registration",
     "help": "Help",
+    "details": "Details",
+    "created_by": "Registered by",
+    "date": "Date",
     "edit": "Edit",
     "edit_in_grid": "Edit in grid",
     "full_edit": "Full edit",
@@ -38,6 +41,9 @@
     "select_columns_to_show": "Select columns to show",
     "show_details": "Show details",
     "add_your_comment_here": "Add your comment here",
+    "comments": "Comments",
+    "recorded_comments": "Recorded comments",
+    "show_comments": "Show comments",
     "new_event": "New Event",
     "data_element": "Data element",
     "value": "Value",

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2014-07-05 09:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2014-07-06 12:46:18 +0000
@@ -8,6 +8,7 @@
         function($scope,
                 $filter,
                 $modal,
+                storage,
                 Paginator,
                 TranslationService,                
                 ProgramFactory,
@@ -36,7 +37,19 @@
     $scope.displayCustomForm = false;
     $scope.currentElement = {id: '', update: false};
     $scope.selectedOrgUnit = '';
+    
+    //notes
     $scope.note = {};
+    var today = moment();
+    today = Date.parse(today);
+    today = $filter('date')(today, 'yyyy-MM-dd');
+    
+    var loginDetails = storage.get('LOGIN_DETAILS');
+    var storedBy = '';
+    if(loginDetails){
+        storedBy = loginDetails.userCredentials.username;
+    }
+    $scope.noteExists = false;
         
     //watch for selection of org unit from tree
     $scope.$watch('selectedOrgUnit', function(newObj, oldObj) {
@@ -90,6 +103,7 @@
     //get events for the selected program (and org unit)
     $scope.loadEvents = function(){   
         
+        $scope.noteExists = false;
         $scope.selectedProgramStage = null;
         
         //Filtering
@@ -165,6 +179,10 @@
                     if( angular.isObject( $scope.dhis2Events ) ) {
 
                         for(var i=0; i < $scope.dhis2Events.length; i++){  
+                            
+                            if($scope.dhis2Events[i].notes && !$scope.noteExists){
+                                $scope.noteExists = true;
+                            }
 
                             //check if event is empty
                             if(!angular.isUndefined($scope.dhis2Events[i].dataValues)){                            
@@ -313,6 +331,7 @@
         $scope.eventRegistration = !$scope.eventRegistration;          
         $scope.currentEvent = angular.copy($scope.newDhis2Event);        
         $scope.outerForm.submitted = false;
+        $scope.note = {};
         
         //$scope.currentEvent = {};
     };    
@@ -324,7 +343,8 @@
         $scope.outerForm.$valid = true;
     };
     
-    $scope.showEditEventInFull = function(){        
+    $scope.showEditEventInFull = function(){       
+        $scope.note = {};
         $scope.displayCustomForm = $scope.customForm ? true:false;                
 
         $scope.currentEvent = ContextMenuSelectedItem.getSelectedItem();  
@@ -340,8 +360,7 @@
             if(!$scope.currentEvent.hasOwnProperty(prStDe.dataElement.id)){
                 $scope.currentEvent[prStDe.dataElement.id] = '';
             }
-        });
-        
+        });        
     };
     
     $scope.switchDataEntryForm = function(){
@@ -375,8 +394,11 @@
         }; 
         
         if(!angular.isUndefined($scope.note.value) && $scope.note.value != ''){
-            console.log('the note is:  ', $scope.note.value);
             dhis2Event.notes = [{value: $scope.note.value}];
+            
+            newEvent.notes = [{value: $scope.note.value, storedDate: today, storedBy: storedBy}];
+            
+            $scope.noteExists = true;
         }
         
         if($scope.selectedProgramStage.captureCoordinates){
@@ -452,6 +474,20 @@
                                      longitude: $scope.currentEvent.coordinate.longitude ? $scope.currentEvent.coordinate.longitude : ''};             
         }
         
+        if(!angular.isUndefined($scope.note.value) && $scope.note.value != ''){
+           
+            updatedEvent.notes = [{value: $scope.note.value}];
+            
+            if($scope.currentEvent.notes){
+                $scope.currentEvent.notes.splice(0,0,{value: $scope.note.value, storedDate: today, storedBy: ''});
+            }
+            else{
+                $scope.currentEvent.notes = [{value: $scope.note.value, storedDate: today, storedBy: storedBy}];
+            }   
+            
+            $scope.noteExists = true;
+        }
+
         DHIS2EventFactory.update(updatedEvent).then(function(data){            
             
             //update original value
@@ -547,10 +583,39 @@
         });        
     };
     
+    $scope.showNotes = function(dhis2Event){
+        
+        var modalInstance = $modal.open({
+            templateUrl: 'views/notes.html',
+            controller: 'NotesController',
+            resolve: {
+                dhis2Event: function () {
+                    return dhis2Event;
+                }
+            }
+        });
+
+        modalInstance.result.then(function (){
+        });
+    };
+    
     $scope.getHelpContent = function(){
     };
 })
 
+//Controller for notes
+.controller('NotesController', 
+    function($scope, 
+            $modalInstance, 
+            dhis2Event){
+    
+    $scope.dhis2Event = dhis2Event;
+    
+    $scope.close = function () {
+        $modalInstance.close();
+    };      
+})
+
 //Controller for the header section
 .controller('HeaderController',
         function($scope,                

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js	2014-07-05 09:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/directives.js	2014-07-06 12:46:18 +0000
@@ -233,7 +233,7 @@
             content = $compile(content)(scope);
             var options = {
                     content: content,
-                    placement: 'bottom',
+                    placement: 'right',
                     trigger: 'hover',
                     html: true,
                     title: scope.title               

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2014-06-25 11:04:16 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2014-07-06 12:46:18 +0000
@@ -59,7 +59,8 @@
         var promise = def.promise();
         
         promise = promise.then( dhis2.ec.store.open );
-        promise = promise.then( getUserProfile );     
+        promise = promise.then( getUserProfile );
+        promise = promise.then( getLoginDetails );
         promise = promise.then( getMetaPrograms );     
         promise = promise.then( getPrograms );     
         promise = promise.then( getProgramStages );    
@@ -165,6 +166,21 @@
     return def.promise(); 
 }
 
+function getLoginDetails()
+{
+    var def = $.Deferred();
+
+    $.ajax({
+        url: '../api/me',
+        type: 'GET'
+    }).done( function(response) {            
+        localStorage['LOGIN_DETAILS'] = JSON.stringify(response);           
+        def.resolve();
+    });
+    
+    return def.promise(); 
+}
+
 function getMetaPrograms()
 {
     var def = $.Deferred();

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js	2014-06-25 11:04:16 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js	2014-07-06 12:46:18 +0000
@@ -133,7 +133,8 @@
             return promise;           
         },
     
-        update: function(dhis2Event){   
+        update: function(dhis2Event){  
+            console.log('the event is:  ', dhis2Event);
             dhis2.ec.storageManager.saveEvent(dhis2Event);
             var promise = $http.put('../api/events/' + dhis2Event.event, dhis2Event).then(function(response){
                 dhis2.ec.storageManager.clearEvent(dhis2Event);

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css	2014-07-05 09:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css	2014-07-06 12:46:18 +0000
@@ -356,6 +356,127 @@
     }
 }
 
+
+.popover {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: 1010;
+	display: none;
+	max-width: 276px;
+	padding: 1px;
+	text-align: left;
+	white-space: normal;
+	background-color: #fff;
+	border: 1px solid #ccc;
+	border: 1px solid rgba(0,0,0,0.2);
+	border-radius: 6px;
+	-webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
+	box-shadow: 0 5px 10px rgba(0,0,0,0.2);
+	background-clip: padding-box
+}
+.popover.top {
+	margin-top: -10px
+}
+.popover.right {
+	margin-left: 10px
+}
+.popover.bottom {
+	margin-top: 10px
+}
+.popover.left {
+	margin-left: -10px
+}
+.popover-title {
+	padding: 5px;;
+	margin: 0;
+	font-size: 14px;
+	font-weight: normal;
+	line-height: 18px;
+	background-color: #f7f7f7;
+	border-bottom: 1px solid #ebebeb;
+	border-radius: 5px 5px 0 0
+}
+.popover-content {
+	padding: 5px;
+}
+.popover .arrow, .popover .arrow:after {
+	position: absolute;
+	display: block;
+	width: 0;
+	height: 0;
+	border-color: transparent;
+	border-style: solid
+}
+.popover .arrow {
+	border-width: 11px
+}
+.popover .arrow:after {
+	border-width: 10px;
+	content: ""
+}
+.popover.top .arrow {
+	bottom: -11px;
+	left: 50%;
+	margin-left: -11px;
+	border-top-color: #999;
+	border-top-color: rgba(0,0,0,0.25);
+	border-bottom-width: 0
+}
+.popover.top .arrow:after {
+	bottom: 1px;
+	margin-left: -10px;
+	border-top-color: #fff;
+	border-bottom-width: 0;
+	content: " "
+}
+.popover.right .arrow {
+	top: 50%;
+	left: -11px;
+	margin-top: -11px;
+	border-right-color: #999;
+	border-right-color: rgba(0,0,0,0.25);
+	border-left-width: 0
+}
+.popover.right .arrow:after {
+	bottom: -10px;
+	left: 1px;
+	border-right-color: #fff;
+	border-left-width: 0;
+	content: " "
+}
+.popover.bottom .arrow {
+	top: -11px;
+	left: 50%;
+	margin-left: -11px;
+	border-bottom-color: #999;
+	border-bottom-color: rgba(0,0,0,0.25);
+	border-top-width: 0
+}
+.popover.bottom .arrow:after {
+	top: 1px;
+	margin-left: -10px;
+	border-bottom-color: #fff;
+	border-top-width: 0;
+	content: " "
+}
+.popover.left .arrow {
+	top: 50%;
+	right: -11px;
+	margin-top: -11px;
+	border-left-color: #999;
+	border-left-color: rgba(0,0,0,0.25);
+	border-right-width: 0
+}
+.popover.left .arrow:after {
+	right: 1px;
+	bottom: -10px;
+	border-left-color: #fff;
+	border-right-width: 0;
+	content: " "
+}
+
+
 .container {
     padding-right: 15px;
     padding-left: 15px;

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/customForm.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/customForm.html	2014-07-05 09:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/customForm.html	2014-07-06 12:46:18 +0000
@@ -50,10 +50,20 @@
 <dhis-custom-form custom-form-type="PROGRAM_STAGE" custom-form-object="selectedProgramStage"></dhis-custom-form>
 <div class="clear">
     <hr>
+    <h4>
+        {{'comments'| translate}}
+    </h4>
     <textarea rows="3" ng-model="note.value" placeholder="{{'add_your_comment_here'| translate}}" style="width:50%;"></textarea>
-    <table class="dhis2-list-table-striped" style='width: 50%;'>     
+    <table class="listTable dhis2-table-striped-border dhis2-table-hover" style='width: 50%;'>     
+        <thead>
+            <tr>
+                <th style="width:100%;">
+                    {{'recorded_comments' | translate}}
+                </th>
+            </tr>
+        </thead>
         <tr ng-repeat="note in currentEvent.notes">
-            <td colspan="2" class="over-flow-hidden" style="width:99.5%;">
+            <td class="over-flow-hidden" style="width:100%;">
                 <d2-pop-over content="note" template="note.html" details="{{'details'| translate}}">
                     <div>{{note.value}}</div>
                 </d2-pop-over>

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2014-07-05 09:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2014-07-06 12:46:18 +0000
@@ -12,7 +12,7 @@
     <tbody id="list">
         <tr>
             <td>
-                 {{selectedProgramStage.reportDateDescription ? selectedProgramStage.reportDateDescription : 'incident_date' | translate }}
+                {{selectedProgramStage.reportDateDescription ? selectedProgramStage.reportDateDescription : 'incident_date'| translate }}
             </td>
             <td>
                 <input type="text"                                                   
@@ -28,7 +28,7 @@
         </tr>
         <tr ng-if="selectedProgramStage.captureCoordinates">
             <td>
-                {{'latitude' | translate}}
+                {{'latitude'| translate}}
             </td>
             <td>
                 <input type="number"
@@ -43,7 +43,7 @@
         </tr>
         <tr ng-if="selectedProgramStage.captureCoordinates">
             <td>
-                {{'longitude' | translate}}
+                {{'longitude'| translate}}
             </td>
             <td>
                 <input type="number"
@@ -61,76 +61,86 @@
                 {{eventGridColumn.name}}                                              
             </td>
             <td >
-                <ng-form name="innerForm">
-                    <div ng-switch="eventGridColumn.type">
-                        <div ng-switch-when="int">
-                            <input type="number"
-                                   ng-model="currentEvent[eventGridColumn.id]"                                                                
-                                   ng-required={{eventGridColumn.compulsory}}
-                                   name="foo" 
-                                   style="width:99%;"/>
-                            <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
-                        </div>
-                        <div ng-switch-when="string">                                        
-                            <div class="container-fluid">
-                                <input type="text"
-                                       ng-model="currentEvent[eventGridColumn.id]"                                                                    
-                                       typeahead="option for option in programStageDataElements[eventGridColumn.id].dataElement.optionSet.options | filter:$viewValue | limitTo:20" 
-                                       typeahead-open-on-focus
-                                       ng-required={{eventGridColumn.compulsory}}
-                                       name="foo" 
-                                       style="width:99%;"/>
-                            <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
-                            </div>
-                        </div>
-                        <div ng-switch-when="bool">
-                            <select ng-model="currentEvent[eventGridColumn.id]"                                                                
-                                    ng-required={{eventGridColumn.compulsory}}
-                                    name="foo" 
-                                    style="width:99%;"/>
-                                <option value="">{{'please_select'| translate}}</option>                        
-                                <option value="0">{{'no'| translate}}</option>
-                                <option value="1">{{'yes'| translate}}</option>
-                            </select>
-                            <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
-                        </div>
-                        <div ng-switch-when="date">
-                            <input type="text"                                                                
-                                   placeholder="yyyy-mm-dd" 
-                                   ng-date 
-                                   ng-model="currentEvent[eventGridColumn.id]"                                                               
-                                   ng-required={{eventGridColumn.compulsory}}
-                                   name="foo" 
-                                   style="width:99%;"/>
-                            <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
-                        </div>
-                        <div ng-switch-when="trueOnly">
-                            <input type="checkbox"                                                                      
-                                   ng-model="currentEvent[eventGridColumn.id]"                                                               
-                                   ng-required={{eventGridColumn.compulsory}}
-                                   name="foo"/>
-                            <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
-                        </div>
-                    </div>
-                </ng-form>
-            </td>
-        </tr>        
-    </tbody>        
+    <ng-form name="innerForm">
+        <div ng-switch="eventGridColumn.type">
+            <div ng-switch-when="int">
+                <input type="number"
+                       ng-model="currentEvent[eventGridColumn.id]"                                                                
+                       ng-required={{eventGridColumn.compulsory}}
+                       name="foo" 
+                       style="width:99%;"/>
+                <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
+            </div>
+            <div ng-switch-when="string">                                        
+                <div class="container-fluid">
+                    <input type="text"
+                           ng-model="currentEvent[eventGridColumn.id]"                                                                    
+                           typeahead="option for option in programStageDataElements[eventGridColumn.id].dataElement.optionSet.options | filter:$viewValue | limitTo:20" 
+                           typeahead-open-on-focus
+                           ng-required={{eventGridColumn.compulsory}}
+                           name="foo" 
+                           style="width:99%;"/>
+                    <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
+                </div>
+            </div>
+            <div ng-switch-when="bool">
+                <select ng-model="currentEvent[eventGridColumn.id]"                                                                
+                        ng-required={{eventGridColumn.compulsory}}
+                        name="foo" 
+                        style="width:99%;"/>
+                <option value="">{{'please_select'| translate}}</option>                        
+                <option value="0">{{'no'| translate}}</option>
+                <option value="1">{{'yes'| translate}}</option>
+                </select>
+                <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
+            </div>
+            <div ng-switch-when="date">
+                <input type="text"                                                                
+                       placeholder="yyyy-mm-dd" 
+                       ng-date 
+                       ng-model="currentEvent[eventGridColumn.id]"                                                               
+                       ng-required={{eventGridColumn.compulsory}}
+                       name="foo" 
+                       style="width:99%;"/>
+                <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
+            </div>
+            <div ng-switch-when="trueOnly">
+                <input type="checkbox"                                                                      
+                       ng-model="currentEvent[eventGridColumn.id]"                                                               
+                       ng-required={{eventGridColumn.compulsory}}
+                       name="foo"/>
+                <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="required">{{'required'| translate}}</span>
+            </div>
+        </div>
+    </ng-form>
+</td>
+</tr>        
+</tbody>        
 </table>
-
+<hr>
+<h4>
+    {{'comments'| translate}}
+</h4>
 <textarea rows="3" ng-model="note.value" placeholder="{{'add_your_comment_here'| translate}}" style="width:99%;"></textarea>
 
-<table class="dhis2-list-table-striped">     
+<table class="listTable dhis2-table-striped-border dhis2-table-hover"> 
+    <thead>
+        <tr>
+            <th style="width:100%;">
+                {{'recorded_comments' | translate}}
+            </th>
+        </tr>
+    </thead>
     <tr ng-repeat="note in currentEvent.notes">
-        <td colspan="2" class="over-flow-hidden" style="width:99.5%;">
+        <td class="over-flow-hidden" style="width:100%;">
             <d2-pop-over content="note" template="note.html" details="{{'details'| translate}}">
                 <div>{{note.value}}</div>
             </d2-pop-over>
             <script type="text/ng-template" id="note.html">
-                <p>{{content.value}}</p>
-                <hr>
-                <p><strong>{{'created_by' | translate}}: </strong>{{content.storedBy}}</p>
-                <p><strong>{{'date' | translate}}: </strong>{{content.storedDate}}</p>                           
+                        <p>{{content.value}}</p>
+                        <hr>
+                        <p><strong>{{'created_by' | translate}}: </strong>{{content.storedBy}}</p>
+                        <p><strong>{{'date' | translate}}: </strong>{{content.storedDate}}</p>                           
             </script>
         </td>
     </tr>

=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/eventList.html	2014-06-13 06:12:21 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/eventList.html	2014-07-06 12:46:18 +0000
@@ -85,7 +85,10 @@
                                 </span>
                                 <!-- filter input field ends -->
 
-                            </th>                                            
+                            </th> 
+                            <th ng-if='noteExists'>
+                                {{'comment' | translate}}
+                            </th>
                         </tr>                        
                     </thead>
                     <tbody id="list">
@@ -178,7 +181,10 @@
                                         </div>
                                     </div>
                                 </ng-form>                                                
-                            </td>                                                                       
+                            </td>
+                            <td ng-if='noteExists'>                                
+                                <a href ng-click="showNotes(dhis2Event)" title="{{'show_comments'| translate}}"><i class="fa fa-info-circle"></i></a>
+                            </td>
                         </tr>
                     </tbody>        
                 </table>

=== added file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/notes.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/notes.html	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/notes.html	2014-07-06 12:46:18 +0000
@@ -0,0 +1,20 @@
+<div class="modal-header page">
+    <h3>{{'comments'| translate}}</h3>
+</div>
+
+<div class="modal-body page">   
+    <table class="dhis2-list-table-striped">    
+        
+        <tr ng-repeat="note in dhis2Event.notes">
+            <td class="over-flow-hidden" style="width:100%;">
+                <p>{{note.value}}</p>
+                <p><strong>{{'created_by' | translate}}: </strong>{{note.storedBy}}</p>
+                <p><strong>{{'date' | translate}}: </strong>{{note.storedDate}}</p>                    
+            </td>
+        </tr>
+    </table>
+</div>
+
+<div class="modal-footer page">        
+    <button data-ng-click="close()">{{'close'| translate}}</button>
+</div> 
\ No newline at end of file