LP#1656036 Webstaff dynamic page titles user/jboyer/lp1656036-webstaff-tab-titles-signoff
authorBill Erickson <berickxx@gmail.com>
Thu, 12 Oct 2017 15:27:27 +0000 (11:27 -0400)
committerJason Boyer <jboyer@library.in.gov>
Fri, 13 Oct 2017 20:20:37 +0000 (16:20 -0400)
commitb308e08c032f76351022e804362ef8ca0e4f6b38
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>
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
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