LP#1832897: add miscellaneous carousels functionality to staff interface
[working/Evergreen.git] / Open-ILS / src / templates / staff / cat / bucket / record / t_merge_records.tt2
1 <div>
2   <div class="modal-header">
3     <button type="button" class="close"
4       ng-click="cancel()" aria-hidden="true">&times;</button>
5     <h4 class="modal-title">[% l('Merge records?') %]</h4>
6   </div>
7   <div class="modal-body">
8       <div class="row pad-all-min">
9         <div class="col-xs-12 flex-row">
10           <div ng-if="lead_id" class="flex-2">
11             <eg-record-summary record-id="lead_id" record="summaryRecord" mode="slim"></eg-record-summary>
12           </div>
13           <div ng-repeat="rec in records" class="flex-2">
14             <eg-record-summary record-id="rec.id" record="summaryRecord" mode="slim"></eg-record-summary>
15           </div>
16         </div>
17       </div>
18       <div class="row pad-all-min">
19         <div class="col-xs-3">
20           <label for="merge_profile_selector">[% l('Choose merge profile') %]</label>
21           <eg-fm-value-selector id="merge_profile_selector" ng-model="merge_profile" idl-class="vmp" ou-setting="cat.default_merge_profile" filter="{'preserve_spec':{'=':null}}" sticky-setting="eg.cat.record_bucket.default_merge_profile"></eg-fm-value-selector>
22         </div>
23         <div class="col-xs-2">
24           <button class="btn btn-default" ng-click="showHoldings=!showHoldings">
25               [% l('Toggle Holdings Display') %]</button>
26         </div>
27         <div class="col-xs-3">
28           <div ng-if="!lead_id" class="alert alert-info">
29             [% l('Please select a lead record') %]
30           </div>
31         </div>
32         <div class="col-xs-4 flex-row">
33           <!-- pull-right not working, push the action buttons to 
34                 the right via flex -->
35           <div class="flex-2"></div>
36           <div>
37             <input type="submit" ng-click="ok()"
38               ng-class="{disabled : !lead_id || records.length < 1 }"
39               class="btn btn-primary" value="[% l('Merge') %]"/>
40             <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
41           </div>
42         </div>
43       </div>
44
45       <div class="flex-row" style="overflow:scroll">
46         <div ng-if="lead_id" 
47           ng-class="{'record-merge-container': !editing_inplace, 'record-edit-container': editing_inplace}">
48           <tabset>
49             <tab heading="[% l('Bib [_1]', '{{lead_id}}') %]">
50               <button class="btn btn-default btn-sm" ng-disabled="editing_inplace"
51                 ng-click="edit_lead_inplace()">[% l('Edit') %]</button>
52               <button class="btn btn-default btn-sm" ng-disabled="editing_inplace"
53                 ng-click="edit_lead()">[% l('Edit using full editor') %]</button>
54               <button class="btn btn-default btn-sm" ng-show="editing_inplace"
55                 ng-click="cancel_edit_lead_inplace()">[% l('Cancel Edit') %]</button>
56               <eg-marc-edit-record dirty-flag="dirty_flag" marc-xml="lead.marc_xml"
57                  in-place-mode="true" record-type="bre" embedded="true" 
58                  ng-show="editing_inplace" on-save="post_edit_inplace">
59               </eg-marc-edit-record>
60               <eg-record-breaker record-id="lead_id" marc-xml="lead.marc_xml" 
61                 ng-show="!editing_inplace"></eg-record-breaker>
62               <eg-volume-list ng-if="showHoldings" record-id="lead_id" 
63                 edit-copies="true" edit-volumes="true"></eg-volume-list>
64             </tab>
65           </tabset>
66         </div>
67         <div class="record-merge-container" ng-repeat="rec in records">
68           <button class="btn btn-default btn-sm" 
69             ng-click="use_as_lead(rec)">[% l('Use as lead record') %]</button>
70           <button class="btn btn-default btn-sm" 
71             ng-click="drop(rec)">[% l('Remove from consideration') %]</button>
72           <eg-record-breaker record-id="rec.id"></eg-record-breaker>
73           <eg-volume-list ng-if="showHoldings" record-id="rec.id" 
74             edit-copies="true" edit-volumes="true"></eg-volume-list>
75         </div>
76       </div>
77   </div>
78   <div class="modal-footer">
79     <input type="submit" ng-click="ok()"
80         ng-class="{disabled : !lead_id || records.length < 1 }"
81         class="btn btn-primary" value="[% l('Merge') %]"/>
82     <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
83   </div>
84 </div>