← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18852: tracker-capture: being consistent in listing TEIs

 

------------------------------------------------------------
revno: 18852
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-04-09 13:54:56 +0200
message:
  tracker-capture: being consistent in listing TEIs
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/tei.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-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/tei.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/tei.html	2015-04-09 09:31:35 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/tei.html	2015-04-09 11:54:56 +0000
@@ -10,31 +10,44 @@
         </div>
     </div>    
     <div ng-switch-default> 
-        
+
         <!-- entity begins -->
         <div class="vertical-spacing">
             <table class="table table-striped dhis2-table-hover table-bordered">               
                 <thead>                        
                     <tr>
-                        <th ng-show="gridColumn.show" ng-repeat="gridColumn in gridColumns">
-                            {{gridColumn.name}}
-                        </th>                                    
+                        <th ng-repeat="gridColumn in gridColumns| filter:{show: true}" class='mouse-pointer' ng-click="sortGrid(gridColumn)">                            
+                            <!-- sort icon begins -->                                
+                            <span ng-hide="gridColumn.showFilter" class="bold pointer" title="{{'sort'| translate}}">
+                                <span ng-class="{true: 'red'} [sortColumn.id === gridColumn.id]"><i class="fa fa-sort"></i></span>
+                                {{gridColumn.name}}
+                            </span>
+                            <!-- sort icon ends -->                            
+                        </th>                              
                     </tr>                        
                 </thead>
                 <tbody id="list">
                     <tr ng-repeat="trackedEntity in trackedEntityList.rows" 
                         ng-click="assignRelationship(trackedEntity)"
-                        ng-show="trackedEntity.id !== selectedTei.trackedEntityInstance">
-                        <td ng-show="gridColumn.show"                                            
-                            ng-repeat="gridColumn in gridColumns">                                                
-                            {{trackedEntity[gridColumn.id]}}                                                
+                        ng-if="trackedEntity.id !== selectedTei.trackedEntityInstance">
+                        <td ng-repeat="gridColumn in gridColumns| filter:{show: true}">
+                            <span ng-switch="gridColumn.valueType">
+                                <span ng-switch-when="bool">
+                                    <span ng-if="trackedEntity[gridColumn.id] === 'true'">{{'yes'| translate}}</span>
+                                    <span ng-if="trackedEntity[gridColumn.id] === 'false'">{{ 'no' | translate}}</span>
+                                </span>
+                                <span ng-switch-when="trueOnly">
+                                    <span ng-if="trackedEntity[gridColumn.id] === 'true'"><i class="fa fa-check"></i></span>
+                                </span>
+                                <span ng-switch-default>{{trackedEntity[gridColumn.id]}}</span>
+                            </span>
                         </td>
                     </tr>
                 </tbody>        
             </table>
         </div>
         <!-- entity ends -->  
-        <!--<serverside-paginator></serverside-paginator>--> 
-                  
+        <serverside-paginator></serverside-paginator>
+
     </div>
 </div> 
\ No newline at end of file