LP 1507807: Show Alert dialogs in browser staff client.
[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 [% INCLUDE 'staff/circ/share/circ_strings.tt2' %]
12 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/in_house_use/app.js"></script>
13 [% END %]
14
15 <style>
16   /* FIXME: MOVE ME */
17   #in-house-use-barcode {width: 16em;}
18   #in-house-use-form { margin-bottom: 20px }
19 </style>
20
21 <form id="in-house-use-form" ng-submit="checkout(args)" role="form">
22   <div class="row">
23
24     <div class="col-md-2">
25       <div class="input-group">
26         <label class="input-group-addon" for="in-house-num-uses">
27           [% l('# of Uses:') %]
28         </label>
29         <input type="number" min="1" max="{{countMax}}"
30           class="form-control" focus-me="useFocus"
31            id="in-house-num-uses" ng-model="args.num_uses"/>
32       </div>
33     </div>
34
35     <div class="col-md-6">
36       <div class="input-group">
37         <div class="input-group-btn" uib-dropdown>
38           <button type="button" class="btn btn-default" uib-dropdown-toggle>
39             {{selectedNcType() || "[% l('Barcode') %]"}}
40             <span class="caret"></span>
41           </button>
42           <ul uib-dropdown-menu>
43             <li><a href
44               ng-click="args.noncat_type='barcode';bcFocus=true">
45               [% l('Barcode') %]</a>
46             </li>
47             <li class="divider"></li>
48             <li><a href
49               ng-repeat="type in nonCatTypes | orderBy:'name()'"
50               ng-click="args.noncat_type=type.id()">{{type.name()}}</a>
51             </li>
52           </ul>
53         </div>
54
55         <input type="text" id="in-house-use-barcode" focus-me="bcFocus"
56           class="form-control" ng-model="args.barcode"
57           ng-disabled="args.noncat_type != 'barcode'"/>
58         <input class="btn btn-default" type="submit" value="[% l('Submit') %]"/>
59       </div><!-- input group -->
60     </div><!-- col -->
61   </div><!-- row -->
62 </form>
63
64 <div clas="row" ng-if="copyNotFound">
65   <div class="col-md-6 alert alert-danger">[% l('Copy Not Found') %]</div>
66 </div>
67
68 <eg-grid
69   id-field="index"
70   features="-display,-sort,-multisort"
71   main-label="[% l('In-House Use') %]"
72   items-provider="gridDataProvider"
73   persist-key="circ.in_house_use">
74
75   <eg-grid-field label="[% l('# of Uses') %]"   path='num_uses' visible></eg-grid-field>
76   <eg-grid-field label="[% l('Barcode') %]"     path='copy.barcode' visible></eg-grid-field>
77   <eg-grid-field label="[% l('Call Number') %]" path="copy.call_number.label" visible></eg-grid-field>
78   <eg-grid-field label="[% l('Location') %]"    path="copy.location.name" visible></eg-grid-field>
79   <eg-grid-field label="[% l('Title') %]"       path="title" visible></eg-grid-field>
80 </eg-grid>
81
82 <div class="flex-row pad-vert">
83   <div class="flex-cell"></div>
84   <div class="pad-horiz">
85     <button class="btn btn-default"
86       ng-click="print_list()">[% l('Print List') %]</button>
87   </div>
88 </div>
89
90 [% END %]