LP1739293 Record merge fits container
[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-3">
10           <label for="merge_profile_selector">[% l('Choose merge profile') %]</label>
11           <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>
12         </div>
13         <div class="col-xs-2">
14           <button class="btn btn-default" ng-click="showHoldings=!showHoldings">
15               [% l('Toggle Holdings Display') %]</button>
16         </div>
17         <div class="col-xs-3">
18           <div ng-if="!lead_id" class="alert alert-info">
19             [% l('Please select a lead record') %]
20           </div>
21         </div>
22         <div class="col-xs-4 flex-row">
23           <!-- pull-right not working, push the action buttons to 
24                 the right via flex -->
25           <div class="flex-2"></div>
26           <div>
27             <input type="submit" ng-click="ok()"
28               ng-class="{disabled : !lead_id || records.length < 1 }"
29               class="btn btn-primary" value="[% l('Merge') %]"/>
30             <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
31           </div>
32         </div>
33       </div>
34
35       <div class="flex-row" style="overflow:scroll">
36         <div ng-if="lead_id" class="flex-1">
37           <tabset>
38             <tab heading="[% l('Bib [_1]', '{{lead_id}}') %]">
39               <button class="btn btn-default btn-sm" ng-class="{disabled : editing_inplace}" 
40                 ng-click="edit_lead_inplace()">[% l('Edit') %]</button>
41               <button class="btn btn-default btn-sm" ng-class="{disabled : editing_inplace}" 
42                 ng-click="edit_lead()">[% l('Edit using full editor') %]</button>
43               <eg-marc-edit-record dirty-flag="dirty_flag" marc-xml="lead.marc_xml"
44                  in-place-mode="true"
45                  record-type="bre" flat-only="true" embedded="true" 
46                  ng-show="editing_inplace" on-save="post_edit_inplace">
47               </eg-marc-edit-record>
48               <eg-record-breaker record-id="lead_id" marc-xml="lead.marc_xml" 
49                 ng-show="!editing_inplace"></eg-record-breaker>
50               <eg-volume-list ng-if="showHoldings" record-id="lead_id" 
51                 edit-copies="true" edit-volumes="true"></eg-volume-list>
52             </tab>
53           </tabset>
54         </div>
55         <div class="record-merge-container" ng-repeat="rec in records">
56           <button class="btn btn-default btn-sm" 
57             ng-click="use_as_lead(rec)">[% l('Use as lead record') %]</button>
58           <button class="btn btn-default btn-sm" 
59             ng-click="drop(rec)">[% l('Remove from consideration') %]</button>
60           <eg-record-breaker record-id="rec.id"></eg-record-breaker>
61           <eg-volume-list ng-if="showHoldings" record-id="rec.id" 
62             edit-copies="true" edit-volumes="true"></eg-volume-list>
63         </div>
64       </div>
65   </div>
66   <div class="modal-footer">
67     <input type="submit" ng-click="ok()"
68         ng-class="{disabled : !lead_id || records.length < 1 }"
69         class="btn btn-primary" value="[% l('Merge') %]"/>
70     <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
71   </div>
72 </div>