[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. a5ee0ed4d2d0fa029e86050fdb7a826363b109d9

Evergreen Git git at git.evergreen-ils.org
Fri May 25 13:38:14 EDT 2012


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, rel_2_2 has been updated
       via  a5ee0ed4d2d0fa029e86050fdb7a826363b109d9 (commit)
      from  7fbf365a628ce6da7debd46b853371e478d118bb (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 a5ee0ed4d2d0fa029e86050fdb7a826363b109d9
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue May 8 14:20:24 2012 -0400

    Acq: Use scope to constrain choice of lineitem alerts
    
    This commit addresses this launchpad bug:
    https://bugs.launchpad.net/evergreen/+bug/996033
    
    The controlled vocabulary of acq lineitem alert text is set up in an
    interface labeled "Line Item Alerts" in the staff client admin menu. In
    the PO and selection list interfaces (where alerts can be applied), we
    will limit the user to selecting alerts from those owned at the user's
    workstation org unit (or its ancestors).
    
    When we display applied alerts, we can also display the shortname of the
    org unit at which the alert text is defined (the owning_lib column).
    This should help clarify what's going on with alerts that have already
    been applied using alert text from another org unit.
    
    [Amended since original reference on Launchpad to also show the
    owning_lib's shortname when confirming alerts at receive time.]
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index 9e3e350..8215946 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -691,7 +691,11 @@ function AcqLiTable() {
             {
                 "data": acqliat.toStoreData(
                     this.pcrud.search(
-                        "acqliat", {"id": {"!=": null}}
+                        "acqliat", {
+                            "owning_lib": aou.orgNodeTrail(
+                                aou.findOrgUnit(openils.User.user.ws_ou())
+                            ).map(function(o) { return o.id(); })
+                        }
                     )
                 )
             }
@@ -771,7 +775,12 @@ function AcqLiTable() {
         nodeByName("value", row).innerHTML = note.value();
         var alert_node = nodeByName("alert_code", row);
         if (note.alert_text()) {
-            alert_node.innerHTML = note.alert_text().code();
+            alert_node.innerHTML = dojo.string.substitute(
+                "[${0}] ${1}", [
+                    aou.findOrgUnit(note.alert_text().owning_lib()).shortname(),
+                    note.alert_text().code()
+                ]
+            );
             if (note.alert_text().description()) {
                 new dijit.Tooltip(
                     {
@@ -1868,8 +1877,17 @@ function AcqLiTable() {
                 localeStrings.CONFIRM_LI_ALERT, [
                     (new openils.acq.Lineitem({"lineitem": li})).findAttr(
                         "title", "lineitem_marc_attr_definition"
+                    ), (
+                        /* XXX it's really better add a parameter and to adjust
+                         * the format string rather than do this concatenation
+                         * here, but if someone wants this for 2.2 in a hurry,
+                         * we can sidestep the problem of updating the strings
+                         * while the translators are working. */
+                        "[" +
+                        aou.findOrgUnit(lin.alert_text().owning_lib()).shortname() +
+                        "] " +
+                        lin.alert_text().code()
                     ),
-                    lin.alert_text().code(),
                     lin.alert_text().description() || "",
                     lin.value()
                 ]

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

Summary of changes:
 Open-ILS/web/js/ui/default/acq/common/li_table.js |   24 ++++++++++++++++++--
 1 files changed, 21 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list