[open-ils-commits] [GIT] Evergreen ILS branch master updated. a472eb53bf3119c4af1a90683a5c213da4f8dd22

Evergreen Git git at git.evergreen-ils.org
Wed Feb 20 10:37:18 EST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  a472eb53bf3119c4af1a90683a5c213da4f8dd22 (commit)
       via  5433deb76cd42e7adbae4319cd008413f827fe07 (commit)
      from  c9c9c2c3413e6640222556dfa20d9afbbb5dac57 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a472eb53bf3119c4af1a90683a5c213da4f8dd22
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Jan 29 13:01:18 2019 -0500

    LP1813647 Titles for Angular admin and splash page
    
    Add page titles for auto-generated admin pages, workstation admin, and
    the root splash page.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/admin-acq-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/acq/admin-acq-splash.component.html
index 58fcbf6aa5..c6d73076d4 100644
--- a/Open-ILS/src/eg2/src/app/staff/admin/acq/admin-acq-splash.component.html
+++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/admin-acq-splash.component.html
@@ -1,6 +1,8 @@
 <eg-staff-banner bannerText="Acquisitions Administration" i18n-bannerText>
 </eg-staff-banner>
 
+<eg-title i18n-prefix prefix="Acquisitions Administration"></eg-title>
+
 <div class="container">
   <eg-link-table columnCount="3">
     <eg-link-table-link i18n-label label="Cancel Reasons"
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts
index d47d92a94c..d0b9224cf6 100644
--- a/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts
+++ b/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts
@@ -8,9 +8,12 @@ import {IdlService} from '@eg/core/idl.service';
 
 @Component({
     template: `
+      <eg-title i18n-prefix prefix="{{classLabel}} Administration">
+      </eg-title>
       <eg-staff-banner bannerText="{{classLabel}} Configuration" i18n-bannerText>
       </eg-staff-banner>
-      <eg-admin-page persistKeyPfx="{{persistKeyPfx}}" idlClass="{{idlClass}}" readonlyFields="{{readonlyFields}}"></eg-admin-page>
+      <eg-admin-page persistKeyPfx="{{persistKeyPfx}}" idlClass="{{idlClass}}" 
+        readonlyFields="{{readonlyFields}}"></eg-admin-page>
     `
 })
 
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/booking/admin-booking-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/booking/admin-booking-splash.component.html
index e33da8e6a3..5cfd4548a3 100644
--- a/Open-ILS/src/eg2/src/app/staff/admin/booking/admin-booking-splash.component.html
+++ b/Open-ILS/src/eg2/src/app/staff/admin/booking/admin-booking-splash.component.html
@@ -1,6 +1,8 @@
 <eg-staff-banner bannerText="Booking Administration" i18n-bannerText>
 </eg-staff-banner>
 
+<eg-title i18n-prefix prefix="Booking Administration"></eg-title>
+
 <div class="container">
   <eg-link-table columnCount="3">
     <eg-link-table-link i18n-label label="Resources"
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html b/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html
index a2358d25bf..0ff3ce599d 100644
--- a/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html
+++ b/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html
@@ -1,6 +1,8 @@
 <eg-staff-banner bannerText="Workstation Administration" i18n-bannerText>
 </eg-staff-banner>
 
+<eg-title i18n-prefix prefix="Manage Workstations"></eg-title>
+
 <!-- this will remain hidden until opened -->
 <eg-confirm-dialog 
   #workstationExistsDialog 
diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.html b/Open-ILS/src/eg2/src/app/staff/splash.component.html
index 4b5baa20e1..6622235c84 100644
--- a/Open-ILS/src/eg2/src/app/staff/splash.component.html
+++ b/Open-ILS/src/eg2/src/app/staff/splash.component.html
@@ -16,6 +16,8 @@
     }
 </style>
 
+<eg-title i18n-prefix prefix="Evergreen Staff Client"></eg-title>
+
 <div class="container">
 
   <!-- header icon -->
diff --git a/Open-ILS/src/eg2/src/index.html b/Open-ILS/src/eg2/src/index.html
index aee6bf8f59..f705dba34e 100644
--- a/Open-ILS/src/eg2/src/index.html
+++ b/Open-ILS/src/eg2/src/index.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
   <meta charset="utf-8">
-  <title i18n="Page Title">AngEG</title>
+  <title i18n="Page Title">Evergreen</title>
   <base href="/eg2">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="icon" type="image/x-icon" href="favicon.ico">

commit 5433deb76cd42e7adbae4319cd008413f827fe07
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Jan 29 11:15:38 2019 -0500

    LP1813647 Angular page title component & sandbox example
    
    Adds a new component <eg-title /> which may be used to pass strings to
    the native Angular Title service.
    
    Each title may have a prefix and/or a suffix.  If both are defined, they
    are separated by a "-" (by default / en-US) and the prefix is tructed to
    12 characters, consistent with AngularJS strings.setPageTitle()
    function.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/eg2/src/app/share/title/title.component.html b/Open-ILS/src/eg2/src/app/share/title/title.component.html
new file mode 100644
index 0000000000..a72eef7024
--- /dev/null
+++ b/Open-ILS/src/eg2/src/app/share/title/title.component.html
@@ -0,0 +1,19 @@
+
+<ng-template #titleStringTmpl let-pfx="pfx" let-sfx="sfx">
+
+  <ng-container *ngIf="pfx">
+    <ng-container *ngIf="sfx">
+      <!-- trim prefix value when it competes with a suffix and add a seperator -->
+      <ng-container>{{pfx | slice:0:12}} - </ng-container>
+    </ng-container>
+    <ng-container *ngIf="!sfx">{{pfx}}</ng-container>
+  </ng-container>
+
+  <ng-container *ngIf="sfx">{{sfx}}</ng-container>
+
+  <!-- if no values are defined, use a generic default -->
+  <ng-container *ngIf="!pfx && !sfx">Evergreen</ng-container>
+
+</ng-template>
+<eg-string #titleString [template]="titleStringTmpl"></eg-string>
+
diff --git a/Open-ILS/src/eg2/src/app/share/title/title.component.ts b/Open-ILS/src/eg2/src/app/share/title/title.component.ts
new file mode 100644
index 0000000000..8dc18718e9
--- /dev/null
+++ b/Open-ILS/src/eg2/src/app/share/title/title.component.ts
@@ -0,0 +1,55 @@
+import {Component, Input, AfterViewInit, ViewChild} from '@angular/core';
+import {Title} from '@angular/platform-browser';
+import {StringComponent} from '@eg/share/string/string.component';
+
+/*
+    <eg-title i18n-prefix i18n-suffix
+        prefix="Patron #{{patronId}}
+        suffix="Staff Client">
+    </eg-title>
+
+    Tab title shows (in en-US):  "Patron #123 - Staff Client"
+*/
+
+ at Component({
+  selector: 'eg-title',
+  templateUrl: 'title.component.html'
+})
+
+export class TitleComponent implements AfterViewInit {
+
+    initDone: boolean;
+
+    pfx: string;
+    @Input() set prefix(p: string) {
+        this.pfx = p;
+        this.setTitle();
+    }
+
+    sfx: string;
+    @Input() set suffix(s: string) {
+        this.sfx = s;
+        this.setTitle();
+    }
+
+    @ViewChild('titleString') titleString: StringComponent;
+
+    constructor(private title: Title) {}
+
+    ngAfterViewInit() {
+        this.initDone = true;
+        this.setTitle();
+    }
+
+    setTitle() {
+
+        // Avoid setting the title while the page is still loading
+        if (!this.initDone) { return; }
+
+        setTimeout(() => {
+            this.titleString.current({pfx: this.pfx, sfx: this.sfx})
+            .then(txt => this.title.setTitle(txt));
+        });
+    }
+}
+
diff --git a/Open-ILS/src/eg2/src/app/staff/common.module.ts b/Open-ILS/src/eg2/src/app/staff/common.module.ts
index e83143c9a3..5a83f8ac29 100644
--- a/Open-ILS/src/eg2/src/app/staff/common.module.ts
+++ b/Open-ILS/src/eg2/src/app/staff/common.module.ts
@@ -14,6 +14,7 @@ import {ToastService} from '@eg/share/toast/toast.service';
 import {ToastComponent} from '@eg/share/toast/toast.component';
 import {StringComponent} from '@eg/share/string/string.component';
 import {StringService} from '@eg/share/string/string.service';
+import {TitleComponent} from '@eg/share/title/title.component';
 import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
 import {DateSelectComponent} from '@eg/share/date-select/date-select.component';
 import {RecordBucketDialogComponent} from '@eg/staff/share/buckets/record-bucket-dialog.component';
@@ -35,6 +36,7 @@ import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.componen
     AccessKeyInfoComponent,
     ToastComponent,
     StringComponent,
+    TitleComponent,
     OpChangeComponent,
     FmRecordEditorComponent,
     DateSelectComponent,
@@ -58,6 +60,7 @@ import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.componen
     AccessKeyInfoComponent,
     ToastComponent,
     StringComponent,
+    TitleComponent,
     OpChangeComponent,
     FmRecordEditorComponent,
     DateSelectComponent,
diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html
index 8249335155..00c2ee7397 100644
--- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html
+++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html
@@ -2,6 +2,19 @@
 <eg-staff-banner bannerText="Sandbox" i18n-bannerText>
 </eg-staff-banner>
 
+<eg-title 
+  i18n-prefix i18n-suffix
+  prefix=":) {{dynamicTitleText}}"
+  suffix="Sandbox">
+</eg-title>
+
+<div class="row flex pt-2">
+  <div i18n> Modify Page Title: </div>
+  <div class="col-lg-2">
+    <input type="text" [(ngModel)]="dynamicTitleText" class="form-control"/>
+  </div>
+</div>
+
 <!-- FM Editor Experiments ----------------------------- -->
 <div class="row mb-3">
   <ng-template #descriptionTemplate 
@@ -100,7 +113,6 @@
 <ng-template #printTemplate let-context>Hello, {{context.world}}!</ng-template>
 
 <br/><br/>
-HERasdfE
 <div class="row">
   <div class="col-lg-3">
     <eg-translate #translate [idlObject]="oneBtype" fieldName="name"></eg-translate>
diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
index a36af85f8a..ed2c496257 100644
--- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
+++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
@@ -53,6 +53,8 @@ export class SandboxComponent implements OnInit {
 
     name = 'Jane';
 
+    dynamicTitleText: string;
+
     complimentEvergreen: (rows: IdlObject[]) => void;
     notOneSelectedRow: (rows: IdlObject[]) => boolean;
 
@@ -112,7 +114,6 @@ export class SandboxComponent implements OnInit {
 
         this.complimentEvergreen = (rows: IdlObject[]) => alert('Evergreen is great!');
         this.notOneSelectedRow = (rows: IdlObject[]) => (rows.length !== 1);
-
     }
 
     btGridRowClassCallback(row: any): string {

-----------------------------------------------------------------------

Summary of changes:
 .../eg2/src/app/share/title/title.component.html   | 19 ++++++++
 .../src/eg2/src/app/share/title/title.component.ts | 55 ++++++++++++++++++++++
 .../admin/acq/admin-acq-splash.component.html      |  2 +
 .../app/staff/admin/basic-admin-page.component.ts  |  5 +-
 .../booking/admin-booking-splash.component.html    |  2 +
 .../workstations/workstations.component.html       |  2 +
 Open-ILS/src/eg2/src/app/staff/common.module.ts    |  3 ++
 .../src/app/staff/sandbox/sandbox.component.html   | 14 +++++-
 .../eg2/src/app/staff/sandbox/sandbox.component.ts |  3 +-
 .../src/eg2/src/app/staff/splash.component.html    |  2 +
 Open-ILS/src/eg2/src/index.html                    |  2 +-
 11 files changed, 105 insertions(+), 4 deletions(-)
 create mode 100644 Open-ILS/src/eg2/src/app/share/title/title.component.html
 create mode 100644 Open-ILS/src/eg2/src/app/share/title/title.component.ts


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list