[% l('View/Place Orders') %]
</a>
</li>
+ <li role="menuitem">
+ <a ng-click="view_feedback()" href="">
+ [% l('View Feedback') %]
+ </a>
+ </li>
</ul>
</div>
</div>
<div class="flex-cell strong-text">[% l('Bib Call #:') %]</div>
<div class="flex-cell flex-2"><span tooltip-html-unsafe="{{bib_cn_tooltip}}">{{bib_cn}}<span></div>
- <div class="flex-cell strong-text"></div>
- <div class="flex-cell"></div>
+ <div class="flex-cell strong-text">[% l('Feedback?') %]</div>
+ <div class="flex-cell">{{feedback.present}}</div>
<div class="flex-cell strong-text">[% l('Record Owner:') %]</div>
<div class="flex-cell">{{record.owner().shortname()}}</div>
--- /dev/null
+<div>
+ <div class="modal-header">
+ <button type="button" class="close"
+ ng-click="cancel()" aria-hidden="true">×</button>
+ <h4 class="modal-title">[% l('View Record Feedback') %]</h4>
+ </div>
+ <div class="modal-body">
+ <div ng-repeat="f in feedback" class="row">
+ <div class="col-md-2">{{f.create_date() | date:egDateAndTimeFormat}}</div>
+ <div class="col-md-8" ng-class="{ acknowledged : f.acked() == 't' }">{{f.value()}}</div>
+ <div class="col-md-2"><button ng-click="f.acked('t')" class="btn btn-info btn-xs">[% l('Acknowledge') %]</button></div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" ng-click="ok()"
+ class="btn btn-primary" value="[% l('OK') %]"/>
+ <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
+ </div>
+</div>
$timeout(function() { $window.open(url, '_blank') });
}
+ $scope.view_feedback = function() {
+ var recId = $scope.record_id;
+ $uibModal.open({
+ templateUrl : './cat/share/t_view_feedback',
+ backdrop : 'static',
+ animation : true,
+ controller:
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
+ $scope.feedback = [];
+ egCore.pcrud.search('brf',
+ { record : recId, acked : 'f' }, {}, { atomic : true }
+ ).then(function(list) {
+ $scope.feedback = list;
+ });
+
+ $scope.ok = function() {
+ angular.forEach($scope.feedback, function(f) {
+ if (f.acked() == 't') {
+ egCore.pcrud.update(f);
+ }
+ });
+ $uibModalInstance.close();
+ }
+ $scope.cancel = function($event) {
+ $uibModalInstance.dismiss();
+ $event.preventDefault();
+ }
+ }
+ ]
+ });
+ }
+
$scope.replaceBarcodes = function() {
var copy_list = gatherSelectedRawCopies();
if (copy_list.length == 0) return;
$scope.bib_cn_tooltip = $sce.trustAsHtml(tooltip);
}
});
+ $scope.feedback = {};
+ egCore.pcrud.search('brf',
+ { record : $scope.recordId, acked : 'f' },
+ {},
+ { atomic : true }
+ ).then(function(list) {
+ $scope.feedback['present'] = (list.length > 0) ? true : false;
+ });
}
$scope.$watch('recordId',