lp1739292 merge UI displays record summary
[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               <eg-marc-edit-record dirty-flag="dirty_flag" marc-xml="lead.marc_xml"
55                  in-place-mode="true" record-type="bre" embedded="true" 
56                  ng-show="editing_inplace" on-save="post_edit_inplace">
57               </eg-marc-edit-record>
58               <eg-record-breaker record-id="lead_id" marc-xml="lead.marc_xml" 
59                 ng-show="!editing_inplace"></eg-record-breaker>
60               <eg-volume-list ng-if="showHoldings" record-id="lead_id" 
61                 edit-copies="true" edit-volumes="true"></eg-volume-list>
62             </tab>
63           </tabset>
64         </div>
65         <div class="record-merge-container" ng-repeat="rec in records">
66           <button class="btn btn-default btn-sm" 
67             ng-click="use_as_lead(rec)">[% l('Use as lead record') %]</button>
68           <button class="btn btn-default btn-sm" 
69             ng-click="drop(rec)">[% l('Remove from consideration') %]</button>
70           <eg-record-breaker record-id="rec.id"></eg-record-breaker>
71           <eg-volume-list ng-if="showHoldings" record-id="rec.id" 
72             edit-copies="true" edit-volumes="true"></eg-volume-list>
73         </div>
74       </div>
75   </div>
76   <div class="modal-footer">
77     <input type="submit" ng-click="ok()"
78         ng-class="{disabled : !lead_id || records.length < 1 }"
79         class="btn btn-primary" value="[% l('Merge') %]"/>
80     <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
81   </div>
82 </div>