2 <label>[% l('Subscriptions owned by or below') %]</label>
3 <eg-org-selector selected="owning_ou" onchange="owning_ou_changed"
4 sticky-setting="serials.ssub_owning_lib_filter">
6 <span class="alert alert-warning" ng-show="subscriptions.length == 0">
7 [% l('No subscriptions are owned by this library') %]
10 <form name="ssubform" class="pad-vert">
11 <div class="form-inline" ng-repeat="ssub in subscriptions">
12 <div class="row form-inline">
13 <div class="form-group col-sm-2">
14 [% l('#[_1]', '{{ssub.id}}') %]
15 <label>[% l('Owned By') %]</label>
16 <eg-org-selector selected="ssub.owning_lib"></eg-org-selector>
18 <div class="form-group col-sm-3">
20 <div class="form-group col-lg-6">
21 <label class="pull-right">[% l('Start Date') %]</label>
23 <div class="form-group col-lg-6">
24 <div class="pull-left"><eg-date-input ng-model="ssub.start_date" focus-me="ssub._focus_me"></eg-date-input></div>
28 <div class="form-group col-sm-3">
30 <div class="form-group col-lg-6">
31 <label class="pull-right">[% l('End Date') %]</label>
33 <div class="form-group col-lg-6">
34 <div class="pull-left"><eg-date-input ng-model="ssub.end_date"></eg-date-input></div>
38 <div class="form-group col-sm-3">
39 <label>[% l('Expected Offset') %]
40 <eg-help-popover help-text="[% l('The difference between the nominal publishing date of an issue and the date that you expect to receive your item.') %]">
42 <input class="form-control" type="text" ng-model="ssub.expected_date_offset"></input>
44 <div class="form-group col-sm-1">
45 <button class="btn btn-sm btn-warning" ng-click="add_distribution(ssub, true)">[% l('Add distribution') %]</button>
48 <div class="row form-inline pad-vert" ng-repeat="sdist in ssub.distributions">
50 <div class="col-sm-1">
51 <button class="btn btn-xs btn-danger" ng-if="sdist._isnew && ssub.distributions.length > 1"
52 ng-click="remove_pending_distribution(ssub, sdist)"
53 >[% l('Remove') %]</button>
55 <div class="col-sm-2">
56 <label>[% l('Distributed At') %]</label>
57 <eg-org-selector selected="sdist.holding_lib"></eg-org-selector>
59 <div class="col-sm-3">
60 <label>[% l('Label') %]</label>
61 <input class="form-control" type="text" required ng-model="sdist.label" focus-me="sdist._focus_me"></input>
63 <div class="col-sm-2">
64 <label>[% l('OPAC Display') %]
65 <eg-help-popover help-text="[% l('Whether the public catalog display of issues should be grouped by chronology (e.g., years) or enumeration (e.g., volume and number).') %]">
67 <select class="form-control" required ng-model="sdist.display_grouping">
68 <option value="chron">[% l('Chronological') %]</option>
69 <option value="enum" >[% l('Enumeration') %]</option>
72 <div class="col-sm-3">
73 <label>[% l('Receiving Template') %]</label>
74 <select class="form-control" ng-model="sdist.receive_unit_template"
75 ng-options="t.id as t.name for t in receiving_templates[sdist.holding_lib.id()]">
76 <option value=""></option>
79 <div class="col-sm-1" style="padding-left:0"><!-- Yes, it's terrible. But, nested grid alignment... -->
80 <button class="btn btn-sm btn-info" ng-click="add_stream(sdist, true)">[% l('Add item stream') %]</button>
83 <div class="row form-inline pad-vert">
84 <div class="row form-inline" ng-repeat="sstr in sdist.streams">
85 <div class="col-sm-1"></div>
86 <div class="col-sm-1">
87 <button class="btn btn-xs btn-danger" ng-if="sstr._isnew && sdist.streams.length > 1"
88 ng-click="remove_pending_stream(sdist, sstr)"
89 >[% l('Remove') %]</button>
91 <div class="col-sm-8">
92 <label>[% l('Send to') %]</label>
93 <eg-basic-combo-box list="localStreamNames" on-select="dirtyForm" selected="sstr.routing_label" focus-me="sstr._focus_me"></eg-basic-combo-box>
98 <div class="row form-inline pad-vert"></div>
100 <div class="row form-inline">
101 <button class="btn btn-warning pull-left" ng-click="add_subscription()">[% l('New Subscription') %]</button>
102 <div class="btn-group pull-right">
103 <button class="btn btn-default" ng-disabled="!ssubform.$dirty" ng-click="abort_changes(ssubform)">[% l('Cancel') %]</button>
104 <button class="btn btn-primary" ng-disabled="!ssubform.$dirty" ng-click="save_subscriptions(ssubform)">[% l('Save') %]</button>
107 <div class="row pad-vert"></div>
112 features="-display,-sort,-multisort"
113 items-provider="distStreamGridDataProvider"
114 grid-controls="distStreamGridControls"
115 persist-key="serials.dist_stream_grid">
117 <eg-grid-action handler="apply_binding_template"
118 label="[% l('Apply Binding Template') %]"></eg-grid-action>
119 <eg-grid-action handler="additional_routing" disabled="need_one_selected"
120 label="[% l('Additional Routing') %]"></eg-grid-action>
121 <eg-grid-action handler="subscription_notes" disabled="need_one_selected"
122 label="[% l('Subscription Notes') %]"></eg-grid-action>
123 <eg-grid-action handler="distribution_notes" disabled="need_one_selected"
124 label="[% l('Distribution Notes') %]"></eg-grid-action>
125 <eg-grid-action handler="link_mfhd" disabled="need_one_selected"
126 label="[% l('Link MFHD') %]"></eg-grid-action>
127 <eg-grid-action handler="delete_subscription"
128 label="[% l('Delete Subscription') %]"></eg-grid-action>
129 <eg-grid-action handler="delete_distribution"
130 label="[% l('Delete Distribution') %]"></eg-grid-action>
131 <eg-grid-action handler="delete_stream"
132 label="[% l('Delete Stream') %]"></eg-grid-action>
133 <eg-grid-action handler="clone_subscription"
134 label="[% l('Clone Subscription') %]"></eg-grid-action>
136 <eg-grid-field label="[% l('Owning Library') %]" path="owning_lib.name" visible></eg-grid-field>
137 <eg-grid-field label="[% l('Distribution Library') %]" path="sdist.holding_lib.name" visible></eg-grid-field>
138 <eg-grid-field label="[% l('Distribution Label') %]" path="sdist.label" visible></eg-grid-field>
139 <eg-grid-field label="[% l('Item Stream') %]" path="sstr.id" visible></eg-grid-field>
140 <eg-grid-field label="[% l('Offset') %]" path="expected_date_offset" visible></eg-grid-field>
141 <eg-grid-field label="[% l('Start Date') %]" path="start_date" datatype="timestamp" visible></eg-grid-field>
142 <eg-grid-field label="[% l('End Date') %]" path="end_date" datatype="timestamp" visible></eg-grid-field>
143 <eg-grid-field label="[% l('Route To') %]" path="sstr.routing_label" visible></eg-grid-field>
144 <eg-grid-field label="[% l('Additional Routing') %]" path="sstr.additional_routing" visible></eg-grid-field>
145 <eg-grid-field label="[% l('Receiving Template') %]" path="sdist.receive_unit_template.name"></eg-grid-field>
146 <eg-grid-field label="[% l('MFHD ID') %]" path="sdist.record_entry" visible></eg-grid-field>
147 <eg-grid-field label="[% l('Summary Display') %]" path="sdist.summary_method" visible></eg-grid-field>
148 <eg-grid-field label="[% l('Receiving Call Number') %]" path="sdist.receive_call_number.label"></eg-grid-field>
149 <eg-grid-field label="[% l('Binding Call Number') %]" path="sdist.bind_call_number.label"></eg-grid-field>
150 <eg-grid-field label="[% l('Binding Template') %]" path="sdist.bind_unit_template.name"></eg-grid-field>
151 <eg-grid-field label="[% l('Unit Label Prefix') %]" path="sdist.unit_label_prefix"></eg-grid-field>
152 <eg-grid-field label="[% l('Unit Label Suffix') %]" path="sdist.unit_label_suffix"></eg-grid-field>
153 <eg-grid-field label="[% l('Display Grouping') %]" path="sdist.display_grouping"></eg-grid-field>
154 <eg-grid-field label="[% l('Subscription ID') %]" path="id"></eg-grid-field>
155 <eg-grid-field label="[% l('Distribution ID') %]" path="sdist.id"></eg-grid-field>