LP#1656036 Webstaff dynamic page titles user/berick/lp1656036-webstaff-tab-titles
authorBill Erickson <berickxx@gmail.com>
Thu, 12 Oct 2017 15:27:27 +0000 (11:27 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 13 Oct 2017 16:00:19 +0000 (12:00 -0400)
commit85a2b1117433fec96bab65b2fd4d86d435b9ba54
treec8fd1ca9203288997937e73dc486ec0b83af12b1
parent791613c5d92f50ff126949bbdc4d70f086397429
LP#1656036 Webstaff dynamic page titles

Support page/tab titles applied by page controllers.  Each title is
composed of 2 optional components, a dynamic component and a context
component.

The dynamic component may be interpolated with real-time data (e.g. a
patron's name) and the context is generally a page or tab-level value
(e.g. Checkout).

For example:  "Smith, Jane - Checkout"

Apply a title within a controller like so:

egCore.strings.setPageTitle(
    egCore.strings.MY_DYNAMIC_TEMPLATE,
    egCore.strings.MY_CONTEXT_STRING,
    {foo : 'foo', bar : 'bar'}
);

If no values are set, the default template-level title is applied.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/base.tt2
Open-ILS/src/templates/staff/base_js.tt2
Open-ILS/src/templates/staff/cat/catalog/index.tt2
Open-ILS/src/templates/staff/circ/patron/index.tt2
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
Open-ILS/web/js/ui/default/staff/services/strings.js