Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
</div>
<div class="row"
ng-class="{'patron-summary-alert' : !patron().dob()}">
- <div class="col-md-5">[% l('Date of Birth') %]</div>
- <div class="col-md-7">{{patron().dob() | date:'shortDate'}}</div>
+ <a class="col-md-5" ng-if="obscure_dob()" ng-click="show_dob(true)">[% l('Date of Birth') %]</a>
+ <div class="col-md-5" ng-if="!obscure_dob()">[% l('Date of Birth') %]</div>
+ <div class="col-md-7" ng-show="now_show_dob()">{{patron().dob() | date:'shortDate'}}</div>
</div>
<div class="row">
<div class="col-md-5">[% l('Last Activity') %]</div>
return $q.when();
}
+ $scope._show_dob = {};
+ $scope.show_dob = function (val) {
+ if ($scope.patron()) {
+ if (typeof val != 'undefined') $scope._show_dob[$scope.patron().id()] = val;
+ return $scope._show_dob[$scope.patron().id()];
+ }
+ return !egCore.env.aous['circ.obscure_dob'];
+ }
+
+ $scope.obscure_dob = function() { return egCore.env.aous['circ.obscure_dob']; }
+ $scope.now_show_dob = function() { return egCore.env.aous['circ.obscure_dob'] ? $scope.show_dob() : true; }
$scope.patron = function() { return patronSvc.current }
$scope.patron_stats = function() { return patronSvc.patron_stats }
$scope.summary_stat_cats = function() { return patronSvc.summary_stat_cats }