otherwise selecting the active table won't work cleanly -->
<uib-tab index="'create-subscription'" heading="[% l('Create Subscription') %]">
<p>Create Subscription TODO</p>
+<!-- TODO: move the grid to a separate template file -->
+<div>
+ <eg-grid
+ id-field="index"
+ features="-display,-sort,-multisort"
+ items-provider="distStreamGridDataProvider"
+ grid-controls="distStreamGridControls"
+ persist-key="serials.dist_stream_grid">
+
+ <eg-grid-action handler="apply_receiving_template"
+ label="[% l('Apply Receiving Template') %]"></eg-grid-action>
+ <eg-grid-action handler="apply_binding_template"
+ label="[% l('Apply Binding Template') %]"></eg-grid-action>
+ <eg-grid-action handler="additional_routing"
+ label="[% l('Additional Routing') %]"></eg-grid-action>
+ <eg-grid-action handler="link_mfhd"
+ label="[% l('Link MFHD') %]"></eg-grid-action>
+ <eg-grid-action handler="edit_offsets"
+ label="[% l('Edit Offets') %]"></eg-grid-action>
+ <eg-grid-action handler="clone_subscription"
+ label="[% l('Clone Subscription') %]"></eg-grid-action>
+
+ <eg-grid-field label="[% l('Owning Library') %]" path="owning_lib.name" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Distribution Library') %]" path="sdist.holding_lib.name" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Distribution Label') %]" path="sdist.label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Copy Stream') %]" path="sstr.id" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Offset') %]" path="expected_date_offset" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Start Date') %]" path="start_date" datatype="timestamp" visible></eg-grid-field>
+ <eg-grid-field label="[% l('End Date') %]" path="end_date" datatype="timestamp" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Route To') %]" path="sstr.routing_label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Additional Routing') %]" path="sstr.additional_routing" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Receiving Template') %]" path="sdist.receive_unit_template.name" visible></eg-grid-field>
+ <eg-grid-field label="[% l('MFHD ID') %]" path="sdist.record_entry" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Summary Display') %]" path="sdist.summary_method" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Receiving Call Number') %]" path="sdist.receive_call_number.label"></eg-grid-field>
+ <eg-grid-field label="[% l('Binding Call Number') %]" path="sdist.bind_call_number.label"></eg-grid-field>
+ <eg-grid-field label="[% l('Binding Template') %]" path="sdist.bind_unit_template.name"></eg-grid-field>
+ <eg-grid-field label="[% l('Unit Label Prefix') %]" path="sdist.unit_label_prefix"></eg-grid-field>
+ <eg-grid-field label="[% l('Unit Label Suffix') %]" path="sdist.unit_label_suffix"></eg-grid-field>
+ <eg-grid-field label="[% l('Display Grouping') %]" path="sdist.display_grouping"></eg-grid-field>
+ <eg-grid-field label="[% l('Subscription ID') %]" path="id"></eg-grid-field>
+ <eg-grid-field label="[% l('Distribution ID') %]" path="sdist.id"></eg-grid-field>
+ </eg-grid>
+</div>
</uib-tab>
<uib-tab index="'prediction'" heading="[% l('Manage Predictions') %]">
<p>Frequency TODO</p>
-angular.module('egSerialsApp', ['ui.bootstrap','ngRoute','egCoreMod','egGridMod','ngToast'])
+angular.module('egSerialsApp', ['ui.bootstrap','ngRoute','egCoreMod','egGridMod','ngToast','egSerialsMod'])
.config(['ngToastProvider', function(ngToastProvider) {
ngToastProvider.configure({
})
.controller('ManageCtrl',
- ['$scope','$routeParams','$location','$window','$q',
-function($scope , $routeParams , $location , $window , $q
+ ['$scope','$routeParams','$location','$window','$q','egSerialsCoreSvc','egCore',
+ 'egGridDataProvider',
+function($scope , $routeParams , $location , $window , $q , egSerialsCoreSvc , egCore ,
+ egGridDataProvider
) {
$scope.bib_id = $routeParams.bib_id;
$scope.active_tab = $routeParams.active_tab ? $routeParams.active_tab : 'create-subscription';
+ egSerialsCoreSvc.fetch($scope.bib_id).then(function() {
+ });
+ $scope.distStreamGridControls = {
+ activateItem : function (item) { } // TODO
+ };
+ $scope.distStreamGridDataProvider = egGridDataProvider.instance({
+ get : function(offset, count) {
+ return this.arrayNotifier(egSerialsCoreSvc.subList, offset, count);
+ }
+ });
+
}])