LP#626157 Ang2 experiments
authorBill Erickson <berickxx@gmail.com>
Sat, 9 Dec 2017 03:18:02 +0000 (22:18 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 11 Dec 2017 17:39:51 +0000 (12:39 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/webby-src/src/app/staff/catalog/record/copies.component.css
Open-ILS/webby-src/src/app/staff/catalog/record/copies.component.html
Open-ILS/webby-src/src/app/staff/catalog/record/copies.component.ts
Open-ILS/webby-src/src/app/staff/catalog/search-form.component.ts
Open-ILS/webby-src/src/app/staff/share/bib-summary.component.html
Open-ILS/webby-src/src/app/staff/share/bib-summary.component.ts
Open-ILS/webby-src/src/styles.css

index ea269a8..de8f322 100644 (file)
@@ -10,7 +10,7 @@
 <div class='eg-copies card w-100'>
   <div class="card-header font-weight-bold d-flex bg-info">
     <div class="flex-1" i18n>Location</div>
-    <div class="flex-2" i18n>Call Number / Copy Notes</div>
+    <div class="flex-1" i18n>Call Number / Copy Notes</div>
     <div class="flex-1" i18n>Barcode</div>
     <div class="flex-1" i18n>Shelving Location</div>
     <div class="flex-1" i18n>Circulation Modifier</div>
       <li class="list-group-item" *ngFor="let copy of copies">
         <div class="d-flex">
           <div class="flex-1" i18n>{{orgName(copy.circ_lib)}}</div>
-          <div class="flex-2" i18n>
+          <div class="flex-1" i18n>
             {{copy.call_number_prefix_label}}
             {{copy.call_number_label}}
             {{copy.call_number_suffix_label}}
           </div>
-          <div class="flex-1" i18n>{{copy.barcode}}</div>
-          <div class="flex-1" i18n>{{copy.location}}</div>
+          <div class="flex-1" i18n>
+            {{copy.barcode}}
+            <a class="pl-1" href="/eg/staff/cat/item/{{copy.id}}" i18n>View</a>
+            | 
+            <a class="pl-1" href="/eg/staff/cat/item/{{copy.id}}/edit" i18n>Edit</a>
+          </div>
+          <div class="flex-1" i18n>{{copy.copy_location}}</div>
           <div class="flex-1" i18n>{{copy.circ_modifier || ''}}</div>
           <div class="flex-1" i18n>{{copy.age_protect}}</div>
           <div class="flex-1" i18n>
index 3e80783..0af98a5 100644 (file)
@@ -26,7 +26,7 @@ export class CopiesComponent implements OnInit {
     ngOnInit() { 
         if (!this.recordId) return;
         this.pager = new Pager();
-        this.pager.limit = 50; // TODO
+        this.pager.limit = 10; // TODO
         this.fetchCopies();
     }
 
index 0d70807..aeb07ba 100644 (file)
@@ -28,6 +28,10 @@ export class SearchFormComponent implements OnInit {
         this.ccvmMap = this.cat.ccvmMap;
         this.cmfMap = this.cat.cmfMap;
         this.searchContext = this.staffCat.searchContext;
+
+        // Start with advanced search options open 
+        // if any filters are active.
+        this.showAdvancedSearch = this.hasAdvancedOptions();
     }
 
     /**
@@ -35,7 +39,7 @@ export class SearchFormComponent implements OnInit {
      * or if any advanced options are selected.
      */
     showAdvanced(): boolean {
-        return this.showAdvancedSearch || this.hasAdvancedOptions();
+        return this.showAdvancedSearch;
     }
 
     hasAdvancedOptions(): boolean {
@@ -44,7 +48,7 @@ export class SearchFormComponent implements OnInit {
         let show = false;
         Object.keys(this.searchContext.ccvmFilters).forEach(ccvm => {
             if (this.searchContext.ccvmFilters[ccvm][0] != '')
-                this.showAdvancedSearch = show = true;
+                show = true;
         });
 
         return show;
index 05737d8..8011524 100644 (file)
@@ -1,8 +1,22 @@
 
 <div class='eg-bib-summary card w-100' *ngIf="summary">
-  <div class="card-header font-weight-bold" i18n>
-    Record Summary
-    <!-- TODO expandy at right-->
+  <div class="card-header d-flex">
+    <div class="font-weight-bold">
+      Record Summary
+    </div>
+    <div class="flex-1"></div>
+    <div>
+      <a class="with-material-icon no-href text-primary" 
+        title="Show More" i18n-title
+        *ngIf="!expandDisplay" (click)="expandDisplay=true">
+        <span class="material-icons">expand_more</span>
+      </a>
+      <a class="with-material-icon no-href text-primary" 
+        title="Show Less" i18n-title
+        *ngIf="expandDisplay" (click)="expandDisplay=false">
+        <span class="material-icons">expand_less</span>
+      </a>
+    </div>
   </div>
   <div class="card-body">
     <ul class="list-group list-group-flush">
@@ -20,7 +34,7 @@
           </div>
         </div>
       </li>
-      <li class="list-group-item">
+      <li class="list-group-item" *ngIf="expandDisplay">
         <div class="d-flex">
           <div class="flex-1 font-weight-bold" i18n>Author:</div>
           <div class="flex-3">{{summary.author}}</div>
@@ -34,7 +48,7 @@
           </div>
         </div>
       </li>
-      <li class="list-group-item">
+      <li class="list-group-item" *ngIf="expandDisplay">
         <div class="d-flex">
           <div class="flex-1 font-weight-bold" i18n>Bib Call #:</div>
           <div class="flex-3">{{summary.callNumber}}</div>
index 41990af..1dbeff6 100644 (file)
@@ -22,6 +22,8 @@ export class EgBibSummaryComponent implements OnInit {
         }
     }
 
+    expandDisplay: boolean = true;
+
     constructor(
         private cat: EgCatalogService,
         private net: EgNetService,
index daa32c1..b8dd531 100644 (file)
@@ -18,6 +18,10 @@ h3 {font-size: 1.15rem}
 h4 {font-size: 1.05rem}
 h5 {font-size: .95rem}
 
+.no-href {
+  cursor: pointer;
+}
+
 
 /** BS has flex utility classes, but none for specifying flex widths */
 .flex-1 {flex: 1}