dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40779
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20747: tracker-capture: active program list now shows currently selected program as well
------------------------------------------------------------
revno: 20747
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-10-16 15:43:11 +0200
message:
tracker-capture: active program list now shows currently selected program as well
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css
--
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/activeprograms/active-programs-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs-controller.js 2015-10-05 08:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs-controller.js 2015-10-16 13:43:11 +0000
@@ -11,20 +11,11 @@
$scope.$on('selectedItems', function(event, args) {
var selections = CurrentSelection.get();
$scope.selectedTeiId = selections.tei ? selections.tei.trackedEntityInstance : null;
- $scope.activeEnrollments = [];
+ $scope.activeEnrollments = [];
+ $scope.selectedProgram = selections.pr ? selections.pr : null;
angular.forEach(selections.enrollments, function(en){
if(en.status === "ACTIVE"){
- if( !selections.pr ){
- $scope.activeEnrollments.push(en);
- }
- if( selections.pr && selections.pr.id ){
- if(selections.pr.id !== en.program){
- $scope.activeEnrollments.push(en);
- }
- else{
- $scope.emptyActiveProgramLabel = $translate.instant('no_active_program_than_selected');
- }
- }
+ $scope.activeEnrollments.push(en);
}
});
});
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html 2015-10-05 08:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/activeprograms/active-programs.html 2015-10-16 13:43:11 +0000
@@ -10,13 +10,16 @@
</span>
</div>
<div ng-show="activeProgramsWidget.expand" class="panel-body dashboard-widget-container">
- <div ng-show="activeEnrollments.length === 0" class="alert alert-warning">{{emptyActiveProgramLabel}}</div>
- <div class="row" ng-if="activeEnrollments.length > 0">
- <table class="table table-striped dhis2-table-hover">
- <tr ng-repeat="activeEnrollment in activeEnrollments" ng-click="changeProgram(activeEnrollment.program)">
- <td>
+ <div ng-show="activeEnrollments.length === 0" class="alert alert-warning">{{'no_active_programs_exist' | translate}}</div>
+ <div ng-if="activeEnrollments.length > 0">
+ <table class="table table-striped dhis2-table-hover table-bordered">
+ <tr ng-repeat="activeEnrollment in activeEnrollments">
+ <td ng-if="selectedProgram && selectedProgram.id !== activeEnrollment.program" title="{{'set_as_current'| translate}}" ng-click="changeProgram(activeEnrollment.program)">
{{programNames[activeEnrollment.program].name}}
</td>
+ <td ng-if="selectedProgram && selectedProgram.id === activeEnrollment.program">
+ <div class="this-active-program">{{programNames[activeEnrollment.program].name}}</div>
+ </td>
</tr>
</table>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties 2015-10-16 12:07:08 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties 2015-10-16 13:43:11 +0000
@@ -188,8 +188,8 @@
visits=Visits
current_selections=Current selections
activePrograms=Active programs
-no_active_program=No active programs to show
-no_active_program_than_selected=No active programs other than selected
+set_as_current=Set as current
+no_active_programs_exist=No active programs exist
org_unit=Organisation unit
org_unit_scope=Organisation unit scope
SELECTED=Selected
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2015-10-16 05:31:30 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2015-10-16 13:43:11 +0000
@@ -1174,3 +1174,9 @@
padding: 5px !important;
color: #555 !important;
}
+
+.this-active-program {
+ font-weight: bold;
+ cursor: none;
+ width: 100%;
+}
\ No newline at end of file