lp1739292 merge UI displays record summary
authorMike Risher <mrisher@catalyte.io>
Wed, 10 Jul 2019 19:52:58 +0000 (19:52 +0000)
committerBill Erickson <berickxx@gmail.com>
Mon, 19 Aug 2019 18:09:31 +0000 (14:09 -0400)
Add the record summary to the record merge UI.  Note that when one clicks
on "use as lead record" or "remove from consieration" the order of the
records changes.  The record summary also will change order to match.

Signed-off-by: Mike Risher <mrisher@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/src/templates/staff/cat/bucket/record/t_merge_records.tt2
new file:   Open-ILS/src/templates/staff/cat/share/t_record_summary_slim.tt2
modified:   Open-ILS/web/js/ui/default/staff/cat/services/record.js

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/cat/bucket/record/t_merge_records.tt2
Open-ILS/src/templates/staff/cat/share/t_record_summary_slim.tt2 [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/cat/services/record.js

index f449e7f..b2bcbc5 100644 (file)
@@ -6,6 +6,16 @@
   </div>
   <div class="modal-body">
       <div class="row pad-all-min">
   </div>
   <div class="modal-body">
       <div class="row pad-all-min">
+        <div class="col-xs-12 flex-row">
+          <div ng-if="lead_id" class="flex-2">
+            <eg-record-summary record-id="lead_id" record="summaryRecord" mode="slim"></eg-record-summary>
+          </div>
+          <div ng-repeat="rec in records" class="flex-2">
+            <eg-record-summary record-id="rec.id" record="summaryRecord" mode="slim"></eg-record-summary>
+          </div>
+        </div>
+      </div>
+      <div class="row pad-all-min">
         <div class="col-xs-3">
           <label for="merge_profile_selector">[% l('Choose merge profile') %]</label>
           <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>
         <div class="col-xs-3">
           <label for="merge_profile_selector">[% l('Choose merge profile') %]</label>
           <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>
diff --git a/Open-ILS/src/templates/staff/cat/share/t_record_summary_slim.tt2 b/Open-ILS/src/templates/staff/cat/share/t_record_summary_slim.tt2
new file mode 100644 (file)
index 0000000..7095c5d
--- /dev/null
@@ -0,0 +1,124 @@
+<div class="strong-text-2">
+  <div class="flex-row">
+    <div class="flex-cell">
+        [% l('Record Summary') %]
+        <span ng-if="record.deleted() == 't'" class="record-summary-alert">
+            [% l('(Deleted)') %]
+        </span>
+    </div>
+    <div ng-if="!noMarcLink" class="flex-cell flex-2">
+      <a target="_self" 
+        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}/marc_html">
+        (MARC)
+      </a>
+    </div>
+    <div class="flex-cell">
+      <a class="pull-right" href ng-click="toggle_expand_summary()"
+        title="[% l('Collapse Record Summary Display') %]"
+        ng-hide="collapse_summary()">
+        <span class="glyphicon glyphicon-resize-small"></span>
+      </a>
+      <a class="pull-right" href ng-click="toggle_expand_summary()"
+        title="[% l('Expand Record Summary Display') %]"
+        ng-show="collapse_summary()">
+        <span class="glyphicon glyphicon-resize-full"></span>
+      </a>
+    </div>
+  </div>
+</div>
+<div ng-if="record.merged_to()" class="row alert alert-warning">
+  <a href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.merged_to()}}">
+    [% l('Record merged to #[_1] on [_2]', 
+         '{{record.merged_to()}}',
+         '{{record.merge_date() | date:$root.egDateAndTimeFormat}}') 
+    %]
+  </a>
+</div>
+<div class="flex-container-striped flex-container-bordered" ng-show="collapse_summary()" style="line-height: 16px">
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Title:') %]</div>
+    <div class="flex-cell flex-3">
+      <a target="_self" 
+        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
+        {{rec_display.title}}
+      </a>
+    </div>
+  </div>
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Author:') %]</div>
+    <div class="flex-cell flex-3">{{rec_display.author}}</div>
+  </div>
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Pub Date:') %]</div>
+    <div class="flex-cell flex-3">
+      {{rec_display.pubdate}}
+    </div>
+  </div>
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Database ID:') %]</div>
+    <div class="flex-cell flex-3">{{record.id()}}</div>
+  </div>
+</div>
+
+<div class="flex-container-striped flex-container-bordered" ng-hide="collapse_summary()" style="line-height: 16px">
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Title:') %]</div>
+    <div class="flex-cell flex-3">
+      <a target="_self" 
+        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
+        {{rec_display.title}}
+      </a>
+    </div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Edition:') %]</div>
+    <div class="flex-cell flex-3">{{rec_display.edition}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('TCN:') %]</div>
+    <div class="flex-cell flex-3">{{record.tcn_value()}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Created By:') %]</div>
+    <div class="flex-cell flex-3">{{record.creator().usrname()}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Author:') %]</div>
+    <div class="flex-cell flex-3">{{rec_display.author}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Pub Date:') %]</div>
+    <div class="flex-cell flex-3">{{rec_display.pubdate}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Database ID:') %]</div>
+    <div class="flex-cell flex-3">{{record.id()}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Last Edited By:') %]</div>
+    <div class="flex-cell flex-3">{{record.editor().usrname()}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Bib Call #:') %]</div>
+    <div class="flex-cell flex-3"><span tooltip-html-unsafe="{{bib_cn_tooltip}}">{{bib_cn}}<span></div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Record Owner:') %]</div>
+    <div class="flex-cell flex-3">{{record.owner().shortname()}}</div>
+  </div><!-- flex-row -->
+
+  <div class="flex-row">
+    <div class="flex-cell strong-text">[% l('Last Edited On:') %]</div>
+    <div class="flex-cell flex-3">{{record.edit_date() | date:$root.egDateAndTimeFormat}}</div>
+  </div><!-- flex-row -->
+</div>
+
index 100f97c..9c88137 100644 (file)
@@ -139,9 +139,15 @@ angular.module('egCoreMod')
         scope : {
             recordId : '=',
             record : '=',
         scope : {
             recordId : '=',
             record : '=',
-            noMarcLink : '@'
+            noMarcLink : '@',
+            mode: '<'
+        },
+        templateUrl : function(element, attrs) {
+            if (attrs.mode == "slim") {
+                return  './cat/share/t_record_summary_slim';
+            }
+            return './cat/share/t_record_summary';
         },
         },
-        templateUrl : './cat/share/t_record_summary',
         controller : 
                    ['$scope','egCore','$sce','egBibDisplay',
             function($scope , egCore , $sce , egBibDisplay) {
         controller : 
                    ['$scope','egCore','$sce','egBibDisplay',
             function($scope , egCore , $sce , egBibDisplay) {