--- /dev/null
+<div class="container-fluid">
+<div class="row bg-info">
+ <div class="col-md-1">
+ <h5>[% l('Template') %]</h5>
+ </div>
+ <div class="col-md-2">
+ <eg-basic-combo-box list="template_name_list" selected="template_name"></eg-basic-combo-box>
+ </div>
+ <div class="col-md-1">
+ <button class="btn btn-default " ng-click="applyTemplate(template_name)" type="button">[% l('Apply') %]</button>
+ </div>
+ <div class="col-md-6">
+ <div class="row" ng-show="template_controls">
+ <div class="col-md-4">
+ <div class="btn-group">
+ <label class="btn btn-default" ng-click="saveTemplate(template_name)">[% l('Save') %]</label>
+ <label class="btn btn-default" ng-click="deleteTemplate(template_name)">[% l('Delete') %]</label>
+ </div>
+ </div>
+ <div class="col-md-8">
+ <div class="btn-group pull-right">
+ <label class="btn btn-default" ng-click="importTemplates()">[% l('Import') %]</label>
+ <label class="btn btn-default" ng-click="exportTemplates()">[% l('Export') %]</label>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-2">
+ <button class="btn btn-default pull-right" ng-click="clearWorking()" type="button">Clear</button>
+ </div>
+</div>
+
+<div class="row pad-vert"></div>
+
+<div class="row bg-info">
+ <div class="col-md-4">
+ <b>[% l('Circulate?') %]</b>
+ </div>
+ <div class="col-md-4">
+ <b>[% l('Status') %]</b>
+ </div>
+ <div class="col-md-4">
+ <b>[% l('Statistical Catagories') %]</b>
+ </div>
+</div>
+
+ <div class="row">
+ <div class="col-md-8">
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.circulate !== undefined}">
+ <div class="row">
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.circulate" value="t"/>
+ [% l('Yes') %]
+ </label>
+ </div>
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.circulate" value="f"/>
+ [% l('No') %]
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.status !== undefined}">
+ <select class="form-control"
+ ng-model="working.status"
+ ng-options="s.id() as s.name() for s in status_list"
+ ></select>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Circulation Library') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('Reference?') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.circ_lib !== undefined}">
+ <eg-org-selector selected="working.circ_lib" noDefault label="[% l('(Unset)') %]" disableTest="cant_have_vols"></eg-org-selector>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.ref !== undefined}">
+ <div class="row">
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.ref" value="t"/>
+ [% l('Yes') %]
+ </label>
+ </div>
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.ref" value="f"/>
+ [% l('No') %]
+ </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Shelving Location') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('OPAC Visible?') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.location !== undefined}">
+ <select class="form-control"
+ ng-model="working.location"
+ ng-options="l.id() as l.name() for l in location_list"
+ ></select>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.opac_visible !== undefined}">
+ <div class="row">
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.opac_visible" value="t"/>
+ [% l('Yes') %]
+ </label>
+ </div>
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.opac_visible" value="f"/>
+ [% l('No') %]
+ </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Circulation Modifer') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('Price') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.circ_modifier !== undefined}">
+ <select class="form-control"
+ ng-model="working.circ_modifier"
+ ng-options="m.code() as m.name() for m in circ_modifier_list"
+ >
+ <option value="">[% l('<NONE>') %]</option>
+ </select>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.price !== undefined}">
+ <input class="form-control" ng-model="working.price" type="text"/>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Loan Duration') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('Cost') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.loan_duration !== undefined}">
+ <select class="form-control" ng-model="working.loan_duration">
+ <option value="1">[% l('Short') %]</option>
+ <option value="2" selected>[% l('Normal') %]</option>
+ <option value="3">[% l('Extended') %]</option>
+ </select>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.cost !== undefined}">
+ <input class="form-control" ng-model="working.cost" type="text"/>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Circulate as Type') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('Deposit?') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.circ_as_type !== undefined}">
+ <select class="form-control"
+ ng-model="working.circ_as_type"
+ ng-options="t.code() as t.value() for t in circ_type_list"
+ ></select>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.deposit !== undefined}">
+ <div class="row">
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.deposit" value="t"/>
+ [% l('Yes') %]
+ </label>
+ </div>
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.deposit" value="f"/>
+ [% l('No') %]
+ </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Holdable?') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('Deposit Amount') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.holdable !== undefined}">
+ <div class="row">
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.holdable" value="t"/>
+ [% l('Yes') %]
+ </label>
+ </div>
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.holdable" value="f"/>
+ [% l('No') %]
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.deposit_amount !== undefined}">
+ <input class="form-control" ng-model="working.deposit_amount" type="text"/>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Age-based Hold Protection') %]</b>
+ </div>
+ <div class="col-md-6">
+ <b>[% l('Quality') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.age_protect !== undefined}">
+ <select class="form-control"
+ ng-model="working.age_protect"
+ ng-options="a.id() as a.name() for a in age_protect_list"
+ ></select>
+ </div>
+ <div class="col-md-6" ng-class="{'bg-success': working.mint_condition !== undefined}">
+ <div class="row">
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.mint_condition" value="t"/>
+ [% l('Good') %]
+ </label>
+ </div>
+ <div class="col-xs-3">
+ <label>
+ <input type="radio" ng-model="working.mint_condition" value="f"/>
+ [% l('Damaged') %]
+ </label>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="row pad-vert"></div>
+
+ <div class="row bg-info">
+ <div class="col-md-6">
+ <b>[% l('Fine Level') %]</b>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-6" ng-class="{'bg-success': working.fine_level !== undefined}">
+ <select class="form-control" ng-model="working.fine_level">
+ <option value="1">[% l('Low') %]</option>
+ <option value="2" selected>[% l('Normal') %]</option>
+ <option value="3">[% l('High') %]</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="col=md-4">
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ statcats<br/>
+ </div>
+ </div>
+</div>
+</div>
+<div>
+ <div class="btn-group">
+ <label class="btn btn-default" ng-click="show_vols = !show_vols">
+ <span ng-show="show_vols" style="padding-right: 5px;">[% l('Hide Volume/Copy Details') %]</span>
+ <span ng-hide="show_vols" style="padding-right: 5px;">[% l('Show Volume/Copy Details') %]</span>
+ </label>
+ <label class="btn btn-default" ng-click="show_copies = !show_copies">
+ <span ng-show="show_copies" style="padding-right: 5px;">[% l('Hide Copy Attributes') %]</span>
+ <span ng-hide="show_copies" style="padding-right: 5px;">[% l('Show Copy Attributes') %]</span>
+ </label>
+ </div>
-<style> input[type=number] { width: 50px } </style>
-<style> select { width: 80px } </style>
-
-<accordion close-others="false">
- <accordion-group heading="Volume/Copy Details" is-open="show_vols">
-
- <div class="container-fluid">
- <div class="row bg-info">
- <div class="col-xs-2"><h4 class="center-block">[% l('Batch Apply') %]</h4></div>
- <div class="col-xs-10">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-1">
- <select ng-model="batch.classification" ng-options="cl.id() as cl.name() for cl in classification_list">
- <option value="">[% l('(Unset)') %]</option>
- </select>
- </div>
- <div class="col-xs-1">
- <select ng-model="batch.prefix" ng-options="p.id() as p.label() for p in prefix_list">
- <option value="">[% l('(Unset)') %]</option>
- </select>
- </div>
- <div class="col-xs-3">
- <input type="text" ng-model="batch.label"/>
- </div>
- <div class="col-xs-1">
- <select ng-model="batch.suffix" ng-options="s.id() as s.label() for s in suffix_list">
- <option value="">[% l('(Unset)') %]</option>
- </select>
- </div>
- <div class="col-xs-1"></div>
- <div class="col-xs-5">
- <button class="btn btn-default center-block" ng-click="applyBatchCNValues()" type="button">Apply</button>
- </div>
- </div>
+ <div class="container-fluid pad-vert" ng-show="show_vols">
+ <div class="row bg-info">
+ <div class="col-xs-2"><h4 class="center-block">[% l('Batch Apply') %]</h4></div>
+ <div class="col-xs-10">
+ <div class="row">
+ <div class="col-xs-2">
+ <select class="form-control" ng-model="batch.classification" ng-options="cl.id() as cl.name() for cl in classification_list">
+ </select>
+ </div>
+ <div class="col-xs-1">
+ <select class="form-control" ng-model="batch.prefix" ng-options="p.id() as p.label() for p in prefix_list">
+ </select>
+ </div>
+ <div class="col-xs-2">
+ <input class="form-control" type="text" ng-model="batch.label"/>
+ </div>
+ <div class="col-xs-1">
+ <select class="form-control" ng-model="batch.suffix" ng-options="s.id() as s.label() for s in suffix_list">
+ </select>
+ </div>
+ <div class="col-xs-1"></div>
+ <div class="col-xs-5">
+ <button class="btn btn-default center-block" ng-click="applyBatchCNValues()" type="button">Apply</button>
</div>
</div>
- </div> <!-- row -->
- <div class="row">
- <div class="col-xs-1"><h5>[% l('Library') %]</h5></div>
- <div class="col-xs-1"><h5>[% l('Volumes') %]</h5></div>
- <div class="col-xs-10">
- <div class="container-fluid">
+ </div>
+ </div>
+ <div class="row pad-vert">
+ <div class="col-xs-1"><b>[% l('Library') %]</b></div>
+ <div class="col-xs-1"><b>[% l('Volumes') %]</b></div>
+ <div class="col-xs-10">
+ <div class="row">
+ <div class="col-xs-2"><b>[% l('Classification') %]</b></div>
+ <div class="col-xs-1"><b>[% l('Prefix') %]</b></div>
+ <div class="col-xs-2"><b>[% l('Call Number') %]</b></div>
+ <div class="col-xs-1"><b>[% l('Suffix') %]</b></div>
+ <div class="col-xs-1"><b>[% l('Copies') %]</b></div>
+ <div class="col-xs-5">
<div class="row">
- <div class="col-xs-1"><h5>[% l('Classification') %]</h5></div>
- <div class="col-xs-1"><h5>[% l('Prefix') %]</h5></div>
- <div class="col-xs-3"><h5>[% l('Call Number') %]</h5></div>
- <div class="col-xs-1"><h5>[% l('Suffix') %]</h5></div>
- <div class="col-xs-1"><h5>[% l('Copies') %]</h5></div>
- <div class="col-xs-5">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-6"><h5>[% l('Barcode') %]</h5></div>
- <div class="col-xs-3"><h5>[% l('Copy #') %]</h5></div>
- <div class="col-xs-3"><h5>[% l('Part') %]</h5></div>
- </div>
- </div>
- </div>
+ <div class="col-xs-5"><b>[% l('Barcode') %]</b></div>
+ <div class="col-xs-3"><b>[% l('Copy #') %]</b></div>
+ <div class="col-xs-4"><b>[% l('Part') %]</b></div>
</div>
</div>
</div>
- </div> <!-- row -->
- <eg-vol-edit ng-repeat="(lib,callnumbers) in data.tree" record="{{record.id()}}" lib="{{lib}}" allcopies="data.copies" struct="data.tree[lib]"></eg-vol-edit>
- </div> <!-- container -->
+ </div>
+ </div> <!-- row -->
+ <eg-vol-edit ng-repeat="(lib,callnumbers) in data.tree" record="record.id()" lib="{{lib}}" allcopies="data.copies" struct="data.tree[lib]"></eg-vol-edit>
+ </div>
+
+</div>
+<div class="pad-vert">
- </accordion-group>
- <accordion-group heading="Copy Attributes" is-open="show_copies">
+ <div class="pad-vert" ng-show="show_copies">
<ul ng-model="copytab" class="nav nav-tabs">
<li ng-class="{active : copytab == 'working'}">
</li>
</ul>
-<div class="tab-content">
- <div class="tab-pane active">
- <div ng-show="copytab == 'working'">
-
- <div class="container-fluid"> <!-- working copy editor -->
- <div class="row">
- <div class="col-lg-4">
-
- <eg-grid
- id-field="id"
- idl-class="acp"
- features="startSelected,-pagination,-actions,-picker,-index"
- items-provider="workingGridDataProvider"
- grid-controls="workingGridControls"
- persist-key="cat.volcopy.copies">
-
- <eg-grid-menu-item handler="workingToComplete"
- label="[% l('Store Selected') %]"></eg-grid-menu-item>
-
-
- <eg-grid-field label="[% l('Barcode') %]" path='barcode' visible></eg-grid-field>
- <eg-grid-field label="[% l('Created') %]" path="create_date" visible></eg-grid-field>
- <eg-grid-field label="[% l('Activated') %]" path="active_date" visible></eg-grid-field>
- <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
-
- </eg-grid>
-
- </div>
- <div class="col-lg-8">
- <div class="container-fluid">
- <div class="row">
-
- <div class="col-md-4">
- <div class="container-fluid"> <!-- first column -->
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Circulate?') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="container-fluid"> <!-- circulate? -->
- <div class="row">
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.circulate" value="t"/>
- [% l('Yes') %]
- </label>
- </div>
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.circulate" value="f"/>
- [% l('No') %]
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Circulation Library') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <eg-org-selector selected="working.circ_lib" disableTest="cant_have_vols"></eg-org-selector>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Shelving Location') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select
- ng-model="working.location"
- ng-options="l.name() for l in location_list track by idTracker(l)"
- ></select>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Circulation Modifier') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select
- ng-model="working.circ_modifier"
- ng-options="m.name() for m in circ_mod_list track by tracker(m,'code')"
- ></select>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Circulate as Type') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select
- ng-model="working.circ_as_type"
- ng-options="t.value() for t in circ_type_list track by tracker(t,'code')"
- ></select>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Holdable?') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.holdable" value="t"/>
- [% l('Yes') %]
- </label>
- </div>
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.holdable" value="f"/>
- [% l('No') %]
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Loan Duration') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select ng-model="working.loan_duration">
- <option value="1">[% l('Short') %]</option>
- <option value="2" selected>[% l('Normal') %]</option>
- <option value="3">[% l('Extended') %]</option>
- </select>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Fine Level') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select ng-model="working.fine_level">
- <option value="1">[% l('Low') %]</option>
- <option value="2" selected>[% l('Normal') %]</option>
- <option value="3">[% l('High') %]</option>
- </select>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Age-based Hold Protection') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select
- ng-model="working.age_protect"
- ng-options="a.name() for a in age_protect_list track by idTracker(a)"
- ></select>
- </div>
- </div>
-
- </div> <!-- first column -->
- </div>
-
- <div class="col-md-4">
- <div class="container-fluid"> <!-- second column -->
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Status') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <select
- ng-model="working.status"
- ng-options="s.name() for s in status_list track by idTracker(s)"
- ></select>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Reference?') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.ref" value="t"/>
- [% l('Yes') %]
- </label>
- </div>
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.ref" value="f"/>
- [% l('No') %]
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('OPAC Visible?') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.opac_visible" value="t"/>
- [% l('Yes') %]
- </label>
- </div>
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.opac_visible" value="f"/>
- [% l('No') %]
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Price') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <input ng-model="working.price" type="text"/>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Cost') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <input ng-model="working.cost" type="text"/>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Deposit?') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.deposit" value="t"/>
- [% l('Yes') %]
- </label>
- </div>
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.deposit" value="f"/>
- [% l('No') %]
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Deposit Amount') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <input ng-model="working.deposit_amount" type="text"/>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Quality') %]</h5>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="container-fluid">
- <div class="row">
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.mint_condition" value="t"/>
- [% l('Good') %]
- </label>
- </div>
- <div class="col-xs-6">
- <label>
- <input type="radio" ng-model="working.mint_condition" value="f"/>
- [% l('Damaged') %]
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
-
- <div class="col-md-4">
- <div class="container-fluid"> <!-- third column -->
- <div class="row">
- <div class="col-md-12">
- <h5>[% l('Statistical Catagories') %]</h5>
- </div>
- </div>
- </div>
- </div>
-
+ <div class="tab-content">
+ <div class="tab-pane active">
+ <div ng-show="copytab == 'working'">
+
+ <div class="container-fluid"> <!-- working copy editor -->
+ <div class="row">
+ <div class="col-lg-4">
+
+ <eg-grid
+ id-field="id"
+ idl-class="acp"
+ features="startSelected,-pagination,-actions,-picker,-index"
+ items-provider="workingGridDataProvider"
+ grid-controls="workingGridControls"
+ persist-key="cat.volcopy.copies">
+
+ <eg-grid-menu-item handler="workingToComplete"
+ label="[% l('Store Selected') %]"></eg-grid-menu-item>
+
+
+ <eg-grid-field label="[% l('Barcode') %]" path='barcode' visible></eg-grid-field>
+ <eg-grid-field label="[% l('Created') %]" path="create_date" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Activated') %]" path="active_date" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
+
+ </eg-grid>
+
+ </div>
+
+ <div class="col-lg-8 give-cell-border">
+ <div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_attr_edit'"></div>
</div>
</div>
</div>
+
+ </div>
+ <div ng-show="copytab == 'complete'">
+ <eg-grid
+ id-field="id"
+ idl-class="acp"
+ features="-pagination,-actions,-picker,-index"
+ items-provider="completedGridDataProvider"
+ grid-controls="completedGridControls"
+ persist-key="cat.volcopy.copies.complete">
+
+ <eg-grid-menu-item handler="completeToWorking"
+ label="[% l('Edit Selected') %]"></eg-grid-menu-item>
+
+ <eg-grid-menu-item handler="saveAndExit"
+ label="[% l('Save & Exit') %]"></eg-grid-menu-item>
+
+ <eg-grid-field label="[% l('Barcode') %]" path='barcode' visible></eg-grid-field>
+ <eg-grid-field label="[% l('Created') %]" path="create_date" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Activated') %]" path="active_date" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Circ Library') %]" flesher="orgById" path="circ_lib.name" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Shelving Location') %]" flesher="locationById" path="location.name" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Circ Modifier') %]" path="circ_modifier" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Circulate?') %]" path="circulate" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Holdable?') %]" path="circulate" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Reference?') %]" path="ref" visible></eg-grid-field>
+ <eg-grid-field label="[% l('Status') %]" flesher="statusById" path="status.name" visible></eg-grid-field>
+ <eg-grid-field label="[% l('OPAC Visible') %]" path="opac_visible" visible></eg-grid-field>
+
+ </eg-grid>
+ </div>
+ </div>
</div>
- </div>
-
- </div>
- <div ng-show="copytab == 'complete'">
- <eg-grid
- id-field="id"
- idl-class="acp"
- features="-pagination,-actions,-picker,-index"
- items-provider="completedGridDataProvider"
- grid-controls="completedGridControls"
- persist-key="cat.volcopy.copies.complete">
-
- <eg-grid-menu-item handler="completeToWorking"
- label="[% l('Edit Selected') %]"></eg-grid-menu-item>
-
- <eg-grid-menu-item handler="saveAndExit"
- label="[% l('Save & Exit') %]"></eg-grid-menu-item>
- <eg-grid-field label="[% l('Barcode') %]" path='barcode' visible></eg-grid-field>
- <eg-grid-field label="[% l('Created') %]" path="create_date" visible></eg-grid-field>
- <eg-grid-field label="[% l('Activated') %]" path="active_date" visible></eg-grid-field>
- <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
- <eg-grid-field label="[% l('Circ Library') %]" flesher="orgById" path="circ_lib.name" visible></eg-grid-field>
- <eg-grid-field label="[% l('Shelving Location') %]" flesher="locationById" path="location.name" visible></eg-grid-field>
- <eg-grid-field label="[% l('Circ Modifier') %]" path="circ_modifier" visible></eg-grid-field>
- <eg-grid-field label="[% l('Circulate?') %]" path="circulate" visible></eg-grid-field>
- <eg-grid-field label="[% l('Holdable?') %]" path="circulate" visible></eg-grid-field>
- <eg-grid-field label="[% l('Reference?') %]" path="ref" visible></eg-grid-field>
- <eg-grid-field label="[% l('Status') %]" flesher="statusById" path="status.name" visible></eg-grid-field>
- <eg-grid-field label="[% l('OPAC Visible') %]" path="opac_visible" visible></eg-grid-field>
-
- </eg-grid>
</div>
- </div>
</div>
-
- </accordion-group>
-</accordion>
<eg-record-summary record-id="record_id" record="summaryRecord"></eg-record-summary>
<!-- tabbed copy data view -->
-<h1>[% l('Volume/Copy Editor') %]</h1>
-
-<div class="pad-vert"></div>
<ul class="nav nav-tabs">
<li ng-class="{active : tab == 'edit'}">
- <a ng-click="set_volcopy_tab('edit')" >[% l('Edit') %]</a>
+ <a ng-click="tab = 'edit'" >[% l('Edit') %]</a>
</li>
<li ng-class="{active : tab == 'templates'}">
- <a ng-click="set_volcopy_tab('templates')" >[% l('Templates') %]</a>
+ <a ng-click="tab = 'templates'" >[% l('Copy Templates') %]</a>
</li>
<li ng-class="{active : tab == 'defaults'}">
- <a ng-click="set_volcopy_tab('defaults')" >[% l('defaults') %]</a>
+ <a ng-click="tab = 'defaults'" >[% l('Defaults') %]</a>
</li>
</ul>
<div ng-show="tab == 'edit'">
<div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_edit'"></div>
</div>
-<!--
<div ng-show="tab == 'templates'">
- <div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_'+tab"></div>
+ <eg-vol-template></eg-vol-template>
</div>
+<!--
<div ng-show="tab == 'defaults'">
<div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_'+tab"></div>
</div>
replace: true,
template:
'<div class="row">'+
- '<div class="col-xs-6"><input type="text" ng-model="barcode" ng-change="updateBarcode()"/></div>'+
- '<div class="col-xs-2"><input type="number" ng-model="copy_number" ng-change="updateCopyNo()"/></div>'+
+ '<div class="col-xs-5">'+
+ '<input id="{{callNumber.id()}}.{{copy.id()}}"'+
+ ' eg-enter="nextBarcode()" class="form-control"'+
+ ' type="text" ng-model="barcode" ng-change="updateBarcode()"/>'+
+ '</div>'+
+ '<div class="col-xs-3"><input class="form-control" type="number" ng-model="copy_number" ng-change="updateCopyNo()"/></div>'+
'<div class="col-xs-4"><eg-basic-combo-box list="parts" selected="part"></eg-basic-combo-box></div>'+
'</div>',
- scope: { copy: "=", callNumber: "=" },
+ scope: { copy: "=", callNumber: "=", index: "@" },
controller : ['$scope','itemSvc',
function ( $scope , itemSvc ) {
$scope.new_part_id = 0;
+ $scope.nextBarcode = function (i) {
+ $scope.$parent.focusNextBarcode($scope.copy.id());
+ }
+
$scope.updateBarcode = function () { $scope.copy.barcode($scope.barcode); $scope.copy.ischanged(1); };
$scope.updateCopyNo = function () { $scope.copy.copy_number($scope.copy_number); $scope.copy.ischanged(1); };
$scope.updatePart = function () {
transclude: true,
template:
'<div class="row">'+
- '<div class="col-xs-1">'+
- '<select ng-model="classification" ng-options="cl.name() for cl in classification_list track by idTracker(cl)"/>'+
+ '<div class="col-xs-2">'+
+ '<select class="form-control" ng-model="classification" ng-options="cl.name() for cl in classification_list track by idTracker(cl)"/>'+
'</div>'+
'<div class="col-xs-1">'+
- '<select ng-model="prefix" ng-change="updatePrefix()" ng-options="p.label() for p in prefix_list track by idTracker(p)"/>'+
+ '<select class="form-control" ng-model="prefix" ng-change="updatePrefix()" ng-options="p.label() for p in prefix_list track by idTracker(p)"/>'+
'</div>'+
- '<div class="col-xs-3"><input type="text" ng-change="updateLabel()" ng-model="label"/></div>'+
+ '<div class="col-xs-2"><input class="form-control" type="text" ng-change="updateLabel()" ng-model="label"/></div>'+
'<div class="col-xs-1">'+
- '<select ng-model="suffix" ng-change="updateSuffix()" ng-options="s.label() for s in suffix_list track by idTracker(s)"/>'+
+ '<select class="form-control" ng-model="suffix" ng-change="updateSuffix()" ng-options="s.label() for s in suffix_list track by idTracker(s)"/>'+
'</div>'+
- '<div class="col-xs-1"><input type="number" ng-model="copy_count" min="{{orig_copy_count}}" ng-change="changeCPCount()"></div>'+
+ '<div class="col-xs-1"><input class="form-control" type="number" ng-model="copy_count" min="{{orig_copy_count}}" ng-change="changeCPCount()"></div>'+
'<div class="col-xs-5">'+
- '<div class="container-fluid">'+
- '<eg-vol-copy-edit ng-repeat="cp in copies track by idTracker(cp)" copy="cp" call-number="callNumber"></eg-vol-copy-edit>'+
- '</div>'+
+ '<eg-vol-copy-edit ng-repeat="cp in copies track by idTracker(cp)" copy="cp" call-number="callNumber"></eg-vol-copy-edit>'+
'</div>'+
'</div>',
$scope.idTracker = function (x) { if (x) return x.id() };
+ // XXX $() is not working! arg
+ $scope.focusNextBarcode = function (i) {
+ var n;
+ var yep = false;
+ angular.forEach($scope.copies, function (cp) {
+ if (n) return;
+
+ if (cp.id() == i) {
+ yep = true;
+ return;
+ }
+
+ if (yep) n = cp.id();
+ });
+
+ if (n) {
+ var next = '#' + $scope.callNumber.id() + '.' + n;
+ var el = $(next).get(0);
+ if (el) el.focus()
+ }
+ }
+
$scope.suffix_list = [];
itemSvc.get_suffixes($scope.callNumber.owning_lib()).then(function(list){
$scope.suffix_list = list;
template:
'<div class="row">'+
'<div class="col-xs-1"><eg-org-selector selected="owning_lib" disableTest="cant_have_vols"></eg-org-selector></div>'+
- '<div class="col-xs-1"><input type="number" min="{{orig_cn_count}}" ng-model="cn_count" ng-change="changeCNCount()"/></div>'+
+ '<div class="col-xs-1"><input class="form-control" type="number" min="{{orig_cn_count}}" ng-model="cn_count" ng-change="changeCNCount()"/></div>'+
'<div class="col-xs-10">'+
- '<div class="container-fluid">'+
- '<eg-vol-row ng-repeat="(cn,copies) in struct track by cn" copies="copies" allcopies="allcopies"></eg-vol-row>'+
- '</div>'+
+ '<eg-vol-row ng-repeat="(cn,copies) in struct track by cn" copies="copies" allcopies="allcopies"></eg-vol-row>'+
'</div>'+
'</div>',
['$scope','$q','$routeParams','$location','$timeout','egCore','egNet','egGridDataProvider','itemSvc',
function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , egGridDataProvider , itemSvc) {
+ $scope.dirty = false;
+
$scope.show_vols = true;
$scope.show_copies = true;
createSimpleUpdateWatcher = function (field) {
$scope.$watch('working.' + field, function () {
var newval = $scope.working[field];
- if (angular.isObject(newval)) { // we'll use the pkey
- if (newval.id) newval = newval.id();
- else if (newval.code) newval = newval.code();
- }
- if ($scope.workingGridControls && $scope.workingGridControls.selectedItems) {
- angular.forEach(
- $scope.workingGridControls.selectedItems(),
- function (cp) { cp[field](newval); cp.ischanged(1); }
- );
+ if (typeof newval != 'undefined') {
+ if (angular.isObject(newval)) { // we'll use the pkey
+ if (newval.id) newval = newval.id();
+ else if (newval.code) newval = newval.code();
+ }
+
+ if (newval == "") {
+ $scope.working[field] = undefined;
+ newval = null;
+ }
+
+ if ($scope.workingGridControls && $scope.workingGridControls.selectedItems) {
+ angular.forEach(
+ $scope.workingGridControls.selectedItems(),
+ function (cp) { cp[field](newval); cp.ischanged(1); }
+ );
+ }
}
});
}
- $timeout(function(){
+ $scope.applyTemplate = function (n) {
+ angular.forEach($scope.templates[n], function (v,k) {
+ $scope.working[k] = angular.copy(v);
+ });
+ }
var dataKey = $routeParams.dataKey;
console.debug('dataKey: ' + dataKey);
if (dataKey && dataKey.length > 0) {
+
+ $scope.templates = {};
+ $scope.template_name = '';
+ $scope.template_name_list = [];
+
+ $scope.fetchTemplates = function () {
+ egCore.hatch.getItem('cat.copy.templates').then(function(t) {
+ if (t) {
+ $scope.templates = t;
+ $scope.template_name_list = Object.keys(t);
+ }
+ });
+ }
+ $scope.fetchTemplates();
+
$scope.working = {};
$scope.copytab = 'working';
}
}
+ $scope.clearWorking = function () {
+ angular.forEach($scope.working, function (v,k,o) {
+ if (typeof v != 'undefined')
+ $scope.working[k] = undefined;
+ });
+ }
+
$scope.completedGridDataProvider = egGridDataProvider.instance({
get : function(offset, count) {
//return provider.arrayNotifier(itemSvc.copies, offset, count);
dataKey, 'edit-these-copies'
).then(function (data) {
- if (data.hide_vols) $scope.show_vols = false;
- if (data.hide_copies) $scope.show_copies = false;
+ if (data) {
+ if (data.hide_vols) $scope.show_vols = false;
+ if (data.hide_copies) $scope.show_copies = false;
- $scope.record_id = data.record_id;
+ $scope.record_id = data.record_id;
- if (data.copies && data.copies.length)
- return itemSvc.fetchIds(data.copies);
+ if (data.copies && data.copies.length)
+ return itemSvc.fetchIds(data.copies);
- if (data.raw && data.raw.length) {
+ if (data.raw && data.raw.length) {
- /* data.raw must be an array of copies with (at least)
- * the call number fleshed on each. For new copies
- * create from whole cloth, the id for each should
- * probably be negative and isnew() should return true.
- * Each /distinct/ call number must have a distinct id
- * as well, probably negative also if they're new. Clear?
- */
+ /* data.raw must be an array of copies with (at least)
+ * the call number fleshed on each. For new copies
+ * create from whole cloth, the id for each should
+ * probably be negative and isnew() should return true.
+ * Each /distinct/ call number must have a distinct id
+ * as well, probably negative also if they're new. Clear?
+ */
- angular.forEach(
- data.raw,
- function (cp) { itemSvc.addCopy(cp) }
- );
+ angular.forEach(
+ data.raw,
+ function (cp) { itemSvc.addCopy(cp) }
+ );
- return itemSvc.copies;
+ return itemSvc.copies;
+ }
}
}).then( function() {
});
createSimpleUpdateWatcher('status');
- $scope.circ_mod_list = [];
+ $scope.circ_modifier_list = [];
itemSvc.get_circ_mods().then(function(list){
- $scope.circ_mod_list = list;
+ $scope.circ_modifier_list = list;
});
createSimpleUpdateWatcher('circ_modifier');
});
createSimpleUpdateWatcher('age_protect');
+ createSimpleUpdateWatcher('circ_lib');
createSimpleUpdateWatcher('circulate');
createSimpleUpdateWatcher('holdable');
createSimpleUpdateWatcher('fine_level');
}
- });
-
}])
+.directive("egVolTemplate", function () {
+ return {
+ restrict: 'E',
+ replace: true,
+ template: '<div ng-include="'+"'/eg/staff/cat/volcopy/t_attr_edit'"+'"></div>',
+ scope: { },
+ controller : ['$scope','itemSvc','egCore',
+ function ( $scope , itemSvc , egCore ) {
+
+ $scope.dirty = false;
+ $scope.template_controls = true;
+
+ $scope.fetchTemplates = function () {
+ egCore.hatch.getItem('cat.copy.templates').then(function(t) {
+ if (t) {
+ $scope.templates = t;
+ $scope.template_name_list = Object.keys(t);
+ }
+ });
+ }
+ $scope.fetchTemplates();
+
+ $scope.applyTemplate = function (n) {
+ angular.forEach($scope.templates[n], function (v,k) {
+ $scope.working[k] = angular.copy(v);
+ });
+ }
+
+ $scope.deleteTemplate = function (n) {
+ if (n) {
+ delete $scope.templates[n]
+ $scope.template_name_list = Object.keys($scope.templates);
+ $scope.template_name = '';
+ egCore.hatch.setItem('cat.copy.templates', $scope.templates);
+ $scope.$parent.fetchTemplates();
+ }
+ }
+
+ $scope.saveTemplate = function (n) {
+ if (n) {
+ var tmpl = {};
+
+ angular.forEach($scope.working, function (v,k) {
+ if (angular.isObject(v)) { // we'll use the pkey
+ if (v.id) v = v.id();
+ else if (v.code) v = v.code();
+ }
+
+ tmpl[k] = v;
+ });
+
+ $scope.templates[n] = tmpl;
+ $scope.template_name_list = Object.keys($scope.templates);
+
+ egCore.hatch.setItem('cat.copy.templates', $scope.templates);
+ $scope.$parent.fetchTemplates();
+ }
+ }
+
+ $scope.templates = {};
+ $scope.template_name = '';
+ $scope.template_name_list = [];
+
+ $scope.tracker = function (x,f) { if (x) return x[f]() };
+ $scope.idTracker = function (x) { if (x) return $scope.tracker(x,'id') };
+ $scope.cant_have_vols = function (id) { return !egCore.org.CanHaveVolumes(id); };
+
+ $scope.orgById = function (id) { return egCore.org.get(id) }
+ $scope.statusById = function (id) {
+ return $scope.status_list.filter( function (s) { return s.id() == id } )[0];
+ }
+ $scope.locationById = function (id) {
+ return $scope.location_cache[''+id];
+ }
+
+ createSimpleUpdateWatcher = function (field) {
+ $scope.$watch('working.' + field, function () {
+ var newval = $scope.working[field];
+
+ if (typeof newval != 'undefined') {
+ $scope.dirty = true;
+ if (angular.isObject(newval)) { // we'll use the pkey
+ if (newval.id) $scope.working[field] = newval.id();
+ else if (newval.code) $scope.working[field] = newval.code();
+ }
+
+ if (newval == "") {
+ $scope.working[field] = undefined;
+ }
+
+ }
+ });
+ }
+
+ $scope.clearWorking = function () {
+ angular.forEach($scope.working, function (v,k) {
+ if (typeof v != 'undefined')
+ $scope.working[k] = undefined;
+ });
+ }
+
+ $scope.working = {};
+ $scope.location_orgs = [];
+ $scope.location_cache = {};
+
+ $scope.location_list = [];
+ itemSvc.get_locations(
+ egCore.org.fullPath( egCore.auth.user().ws_ou(), true )
+ ).then(function(list){
+ $scope.location_list = list;
+ });
+ createSimpleUpdateWatcher('location');
+
+ $scope.status_list = [];
+ itemSvc.get_statuses().then(function(list){
+ $scope.status_list = list;
+ });
+ createSimpleUpdateWatcher('status');
+
+ $scope.circ_modifier_list = [];
+ itemSvc.get_circ_mods().then(function(list){
+ $scope.circ_modifier_list = list;
+ });
+ createSimpleUpdateWatcher('circ_modifier');
+
+ $scope.circ_type_list = [];
+ itemSvc.get_circ_types().then(function(list){
+ $scope.circ_type_list = list;
+ });
+ createSimpleUpdateWatcher('circ_as_type');
+
+ $scope.age_protect_list = [];
+ itemSvc.get_age_protects().then(function(list){
+ $scope.age_protect_list = list;
+ });
+ createSimpleUpdateWatcher('age_protect');
+
+ createSimpleUpdateWatcher('circ_lib');
+ createSimpleUpdateWatcher('circulate');
+ createSimpleUpdateWatcher('holdable');
+ createSimpleUpdateWatcher('fine_level');
+ createSimpleUpdateWatcher('loan_duration');
+ createSimpleUpdateWatcher('cost');
+ createSimpleUpdateWatcher('deposit');
+ createSimpleUpdateWatcher('deposit_amount');
+ createSimpleUpdateWatcher('mint_condition');
+ createSimpleUpdateWatcher('opac_visible');
+ createSimpleUpdateWatcher('ref');
+ }
+ ]
+ }
+})
+