webstaff: add print template and action for in-house uses list
[working/Evergreen.git] / Open-ILS / src / templates / staff / circ / in_house_use / index.tt2
1 [%
2   WRAPPER "staff/base.tt2";
3   ctx.page_title = l("In-House Use"); 
4   ctx.page_app = "egInHouseUseApp";
5   ctx.page_ctrl = "InHouseUseCtrl";
6 %]
7
8 [% BLOCK APP_JS %]
9 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/grid.js"></script>
10 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
11 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/in_house_use/app.js"></script>
12 [% END %]
13
14 <style>
15   /* FIXME: MOVE ME */
16   #in-house-use-barcode {width: 16em;}
17   #in-house-use-form { margin-bottom: 20px }
18 </style>
19
20 <form id="in-house-use-form" ng-submit="checkout(args)" role="form">
21   <div class="row">
22
23     <div class="col-md-2">
24       <div class="input-group">
25         <label class="input-group-addon" for="in-house-num-uses">
26           [% l('# of Uses:') %]
27         </label>
28         <input type="number" min="1" max="{{countMax}}"
29           class="form-control" focus-me="useFocus"
30            id="in-house-num-uses" ng-model="args.num_uses"/>
31       </div>
32     </div>
33
34     <div class="col-md-6">
35       <div class="input-group">
36         <div class="input-group-btn" uib-dropdown>
37           <button type="button" class="btn btn-default" uib-dropdown-toggle>
38             {{selectedNcType() || "[% l('Barcode') %]"}}
39             <span class="caret"></span>
40           </button>
41           <ul uib-dropdown-menu>
42             <li><a href
43               ng-click="args.noncat_type='barcode';bcFocus=true">
44               [% l('Barcode') %]</a>
45             </li>
46             <li class="divider"></li>
47             <li><a href
48               ng-repeat='type in nonCatTypes'
49               ng-click="args.noncat_type=type.id()">{{type.name()}}</a>
50             </li>
51           </ul>
52         </div>
53
54         <input type="text" id="in-house-use-barcode" focus-me="bcFocus"
55           class="form-control" ng-model="args.barcode"
56           ng-disabled="args.noncat_type != 'barcode'"/>
57         <input class="btn btn-default" type="submit" value="[% l('Submit') %]"/>
58       </div><!-- input group -->
59     </div><!-- col -->
60   </div><!-- row -->
61 </form>
62
63 <div clas="row" ng-if="copyNotFound">
64   <div class="col-md-6 alert alert-danger">[% l('Copy Not Found') %]</div>
65 </div>
66
67 <eg-grid
68   id-field="index"
69   features="-display,-sort,-multisort"
70   main-label="[% l('In-House Use') %]"
71   items-provider="gridDataProvider"
72   persist-key="circ.in_house_use">
73
74   <eg-grid-menu-item handler="print_list" label="[% l('Print List') %]"></eg-grid-menu-item>
75
76   <eg-grid-field label="[% l('# of Uses') %]"   path='num_uses' visible></eg-grid-field>
77   <eg-grid-field label="[% l('Barcode') %]"     path='copy.barcode' visible></eg-grid-field>
78   <eg-grid-field label="[% l('Call Number') %]" path="copy.call_number.label" visible></eg-grid-field>
79   <eg-grid-field label="[% l('Location') %]"    path="copy.location.name" visible></eg-grid-field>
80   <eg-grid-field label="[% l('Title') %]"       path="title" visible></eg-grid-field>
81 </eg-grid>
82  
83
84 [% END %]