← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18853: tracker-capture: use the same tei list template whenever necessary

 

------------------------------------------------------------
revno: 18853
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-04-09 14:36:37 +0200
message:
  tracker-capture: use the same tei list template whenever necessary
removed:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/tei.html
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/add-relationship.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/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/add-relationship.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/add-relationship.html	2015-04-09 10:18:52 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/add-relationship.html	2015-04-09 12:36:37 +0000
@@ -92,7 +92,7 @@
                 <!-- entity grid begins -->
                 <div class="row" ng-if="showTrackedEntityDiv">
                     <img class="col-md-12" src="../images/ajax-loader-bar.gif" ng-if="!teiFetched"/>
-                    <div class="col-md-12" ng-include="'components/relationship/tei.html'"></div>                        
+                    <div class="col-md-12" ng-include="'views/tei.html'"></div>                        
                 </div>
                 <!-- entity grid ends -->
 

=== removed 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 11:54:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/tei.html	1970-01-01 00:00:00 +0000
@@ -1,53 +0,0 @@
-<div ng-switch="teiCount">                    
-    <div ng-switch-when="undefined">
-        <div class="alert alert-warning vertical-spacing">
-            {{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}                        
-        </div>
-    </div>
-    <div ng-switch-when="0">  
-        <div class="alert alert-warning vertical-spacing">
-            {{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}                        
-        </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-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-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>
-
-    </div>
-</div> 
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html	2015-03-20 13:08:47 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html	2015-04-09 12:36:37 +0000
@@ -1,4 +1,4 @@
-<div ng-switch="teiCount" class='vertical-spacing'>                    
+<div ng-switch="teiCount">                    
     <div ng-switch-when="undefined">
         <div class="alert alert-warning vertical-spacing">
             {{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}                        
@@ -9,46 +9,46 @@
             {{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}                        
         </div>
     </div>    
-    <div ng-switch-default>        
+    <div ng-switch-default> 
+
         <!-- entity begins -->
-        <table class="table table-striped dhis2-table-hover table-bordered">               
-            <thead>                        
-                <tr>
-                    <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| orderBy:d2Sort:reverse"   
-                    ng-click="showDashboard(trackedEntity)"
-                    title="{{'go_to_dashboard'| translate}}">
-                    <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>
-
-        <!-- entity ends -->
-
-        <!-- paging begins -->
+        <div class="vertical-spacing">
+            <table class="table table-striped dhis2-table-hover table-bordered">               
+                <thead>                        
+                    <tr>
+                        <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="selectedTei.trackedEntityInstance ? assignRelationship(trackedEntity) : showDashboard(trackedEntity)"
+                        ng-if="selectedTei.trackedEntityInstance ? trackedEntity.id !== selectedTei.trackedEntityInstance : true"
+                        title="{{selectedTei.trackedEntityInstance ? 'select' : 'go_to_dashboard'| translate}}">
+                        <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>
-        <!-- paging ends -->
 
     </div>
 </div> 
\ No newline at end of file