From c11fa9243d46986f253f3b9001292379dce0153c Mon Sep 17 00:00:00 2001 From: Samuel Date: Mon, 6 Jan 2014 15:56:06 +1100 Subject: [PATCH 2/2] Bug 11325 - Focus not on "Add Item" in Lists Potential fix. Moved the enter barcode interface to the top of the page. This will allow for faster entry. Test instructions: 1. Create a list 2. Make sure you have an object with an assigned barcode 3. Go to the list 4. The barcode entry interface should be at the top, and it should work as normal --- ...nsure-cataloging-search-finds-results-for.patch | 49 ++ ...de-receive-option-if-there-is-nothing-to-.patch | 231 +++++++ .../prog/en/modules/virtualshelves/shelves.tt | 38 +- .../prog/en/modules/virtualshelves/shelves.tt~ | 643 ++++++++++++++++++++ 4 files changed, 943 insertions(+), 18 deletions(-) create mode 100644 0001-Bug-11410-ensure-cataloging-search-finds-results-for.patch create mode 100644 0002-Bug-6820-hide-receive-option-if-there-is-nothing-to-.patch create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt~ diff --git a/0001-Bug-11410-ensure-cataloging-search-finds-results-for.patch b/0001-Bug-11410-ensure-cataloging-search-finds-results-for.patch new file mode 100644 index 0000000..bf9a7d1 --- /dev/null +++ b/0001-Bug-11410-ensure-cataloging-search-finds-results-for.patch @@ -0,0 +1,49 @@ +From 2a4e193c242372f488892591a72752dfd4ffb138 Mon Sep 17 00:00:00 2001 +From: Kyle M Hall +Date: Tue, 17 Dec 2013 16:04:10 -0500 +Subject: [PATCH 1/2] Bug 11410: ensure cataloging search finds results for + searches with ampersands + +When QueryParser is off, the cataloging search is passing the incorrect +variable to SimpleSearch. I'm sure this is causing other issues, but +the one I have identified is that any searches with an "&" in them +return no results. This patch corrects the bug. + +Test Plan: +1) Catalog a new record titled "Cats & Dogs" +2) Rebuild your zebra index so this record is indexed +3) Browse to cataloguing/addbooks.pl +4) Search for "Cats & Dogs" +5) Notice you get no results +6) Apply this patch +7) Repeat the search +8) Notice your result now shows up! + +Signed-off-by: Heather Braum +Signed-off-by: Suzanne Fayle +Signed-off-by: Katrin Fischer +This works as described, passes all tests and QA script. +Note: Because $query = $builtquery when the QueryParser is used, +this problem is only visible when UseQueryParser is set to "Don't try". + +Signed-off-by: Galen Charlton +--- + cataloguing/addbooks.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl +index b22a646..35cfa2c 100755 +--- a/cataloguing/addbooks.pl ++++ b/cataloguing/addbooks.pl +@@ -82,7 +82,7 @@ if ($query) { + } + + # find results +- my ( $error, $marcresults, $total_hits ) = SimpleSearch($query, $results_per_page * ($page - 1), $results_per_page); ++ my ( $error, $marcresults, $total_hits ) = SimpleSearch($builtquery, $results_per_page * ($page - 1), $results_per_page); + + if ( defined $error ) { + $template->param( error => $error ); +-- +1.7.9.5 + diff --git a/0002-Bug-6820-hide-receive-option-if-there-is-nothing-to-.patch b/0002-Bug-6820-hide-receive-option-if-there-is-nothing-to-.patch new file mode 100644 index 0000000..48eb00a --- /dev/null +++ b/0002-Bug-6820-hide-receive-option-if-there-is-nothing-to-.patch @@ -0,0 +1,231 @@ +From cf9c1816a0c17329da1df96354f2340509d382fa Mon Sep 17 00:00:00 2001 +From: Samuel +Date: Mon, 6 Jan 2014 15:25:37 +1100 +Subject: [PATCH 2/2] Bug 6820 - hide receive option if there is nothing to + receive + +The "receive shipment" button appears even if there are no orders to receive. +This patch hides the button if there are no orders. + +To test the patch: +1. Go to "aquisitions" +2. Create a vendor +3. As the newly created vendor has no orders, there will now be no "receive shipment" button +4. Create a basket +5. Go back to the vendor search +6. The button should now appear for that vendor + +I've also tested it with a mix of vendors with and without baskets in the same search. +--- + .../prog/en/modules/acqui/booksellers.tt | 2 + + .../prog/en/modules/acqui/booksellers.tt~ | 184 ++++++++++++++++++++ + 2 files changed, 186 insertions(+) + create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ + +diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +index 3fa12e2..470fd74 100644 +--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt ++++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +@@ -88,7 +88,9 @@ $(document).ready(function() { + (inactive) + [% END %] + [% END %] ++ [% IF ( supplier.loop_basket.size ) %] + Receive shipment ++ [% END %] + +
+ [% IF ( supplier.loop_basket.size ) %] +diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ +new file mode 100644 +index 0000000..944a4d5 +--- /dev/null ++++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ +@@ -0,0 +1,184 @@ ++[% USE KohaDates %] ++[% INCLUDE 'doc-head-open.inc' %] ++Koha › Search for vendor [% supplier %] ++[% INCLUDE 'doc-head-close.inc' %] ++ ++ ++[% INCLUDE 'datatables.inc' %] ++ ++ ++ ++ ++[% INCLUDE 'header.inc' %] ++[% INCLUDE 'acquisitions-search.inc' %] ++ ++ ++ ++
++ ++
++
++
++ ++[% INCLUDE 'acquisitions-toolbar.inc' %] ++[% UNLESS ( count == 1 ) %] ++

You searched on vendor [% supplier %], [% count %] results found

++[% END %] ++[% IF ( loop_suppliers.size ) %] ++ [% UNLESS (count == 1) %] ++

Choose a vendor in the list to jump directly to the right place. ++ ++

++ [% END %] ++ [% IF ( allbaskets ) %] ++

Show active baskets only

++ [% ELSE %] ++

Show all baskets

++ [% END %] ++
++ [% FOREACH supplier IN loop_suppliers %] ++
++ ++ [% IF (supplier.name) %] ++ [% supplier.name %] ++ [% ELSE %] ++ NO NAME ++ [% END %] ++ ++ ++ [% IF ( CAN_user_acquisition_order_manage ) %] ++ [% IF ( supplier.active ) %] ++ New basket ++ [% ELSE %] ++ (inactive) ++ [% END %] ++ [% END %] ++ [% IF ( supplier.loop_basket.size ) %] ++ Receive shipment ++ [% END %] ++ ++
++ [% IF ( supplier.loop_basket.size ) %] ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ [% FOREACH basket IN supplier.loop_basket %] ++ [% IF ( basket.uncertainprices ) %] ++ ++ [% ELSE %] ++ ++ [% END %] ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ [% END %][%# FOREACH basket IN supplier.loop_basket %] ++ ++
No.NameItem countBiblio countItems expectedCreated byDateBasket groupClosed 
[% basket.basketno %][% basket.basketname %][% basket.total_items %][% basket.total_biblios %][% basket.expected_items %] ++ [% basket.authorisedby_firstname %] ++ [% basket.authorisedby_surname %] ++ [% basket.creationdate | $KohaDates %] ++ [% IF basket.basketgroup %] ++ [% basketgroup = basket.basketgroup %] ++ [% IF basketgroup.closed %] ++ [% basketgroup.name %] (closed) ++ [% ELSE %] ++ [% basketgroup.name %] ++ [% END %] ++ [% END %] ++ ++ [% IF ( basket.closedate ) %] ++ [% basket.closedate | $KohaDates %] ++ [% ELSE %] ++ ++ [% END %] ++ ++ View ++ ++ [% UNLESS ( basket.closedate ) %] ++ | Add to basket ++ ++ ++ [% END %] ++
++ ++ [% ELSE %] ++

No pending baskets

++ [% END %][%# IF ( supplier.loop_basket.size ) %] ++
++
++ [% END %][%# FOREACH supplier IN loop_suppliers %] ++
++[% END %][%# IF ( loop_suppliers.size ) %] ++
++
++
++[% IF ( booksellerid ) %] ++[% INCLUDE 'vendor-menu.inc' %] ++[% END %] ++[% INCLUDE 'acquisitions-menu.inc' %] ++
++
++[% INCLUDE 'intranet-bottom.inc' %] +-- +1.7.9.5 + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index aac163f..3f62d51 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -279,6 +279,25 @@ function placeHold () { [% END %] [% END %] +[% IF ( allowaddingitem ) %] +
+
+
+ Add an item to [% shelfname | html %] +
    +
  1. + + + + + +
  2. +
+
+
+
+[% END %] + [% IF ( viewshelf ) %]
[% IF ( itemsloop ) %] @@ -413,24 +432,7 @@ function placeHold () {
[% END %] -[% IF ( allowaddingitem ) %] -
-
-
- Add an item to [% shelfname | html %] -
    -
  1. - - - - - -
  2. -
-
-
-
-[% END %] + [% IF ( debug ) %] [% IF ( edit ) %]
Edit is on ([% shelfname | html %])
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt~ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt~ new file mode 100644 index 0000000..aac163f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt~ @@ -0,0 +1,643 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › [% IF ( viewshelf ) %]Lists › Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list [% shelfname | html %][% END %] +[% INCLUDE 'doc-head-close.inc' %] +[% IF ( viewshelf ) %] + + +[% END %] + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + +[% BLOCK list_permissions %] +
  • + + +  anyone else to add entries. +
  • +
  • + + +  anyone to remove his own contributed entries. +
  • +
  • + + +  anyone to remove other contributed entries. +
  • +[% END %] + + +
    +
    +
    +
    [% INCLUDE 'virtualshelves-toolbar.inc' %] +
    +[% IF ( paramsloop ) %] +[% FOREACH paramsloo IN paramsloop %] +
    +
    + [% IF ( paramsloo.already ) %]
    A List named [% paramsloo.already %] already exists!
    [% END %] + [% IF ( paramsloo.status ) %]
    [% paramsloo.string %]
    [% END %] + [% IF ( paramsloo.nobarcode ) %]
    ERROR: No barcode given.
    [% END %] + [% IF ( paramsloo.noshelfnumber ) %]
    ERROR: No shelfnumber given.
    [% END %] + [% IF ( paramsloo.need_confirm ) %] +
    The list [% paramsloo.need_confirm %] is not empty. +
    It has [% paramsloo.count %] entries. +
    Use the "Confirm" button below to confirm deletion. +
    + [% END %] + [% IF ( paramsloo.nopermission ) %] +
    ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].
    + [% END %] + [% IF ( paramsloo.failgetitem ) %] +
    ERROR: No item found with barcode [% paramsloo.failgetitem %].
    + [% END %] + [% IF ( paramsloo.duplicatebiblio ) %] +
    A record matching barcode [% paramsloo.duplicatebiblio %] has already been added.
    + [% END %] + [% IF ( paramsloo.nothingdeleted) %] +
    Warning: You could not delete any selected items from this shelf.
    + [% END %] + [% IF ( paramsloo.somedeleted) %] +
    Warning: You could not delete all selected items from this shelf.
    + [% END %] + [% IF ( paramsloo.modifyfailure) %] +
    ERROR: List could not be modified.
    + [% END %] +
    +
    +[% END %] +[% END %] + +[% IF ( viewshelf ) %] +
    + [% IF ( itemsloop ) %] + +

    Contents of [% shelfname | html %]

    +
    [% pagination_bar %]
    +
    + + + +[% IF direction == 'asc' %] + [% SET new_direction = 'desc' %] +[% ELSE %] + [% SET direction = 'desc' %] + [% SET new_direction = 'asc' %] +[% END %] + +
    + [% IF ( itemsloop ) %] +
    | + + + | +   + [% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %] +
    + [% END %] + [% IF ( allowremovingitems ) %] +
    + [% END %] + [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
    [% END %] +
    + [% END %] +
    + + + + [% IF ( itemsloop ) %][% END %] + + [% UNLESS ( item_level_itypes ) %][% END %] + + + + + + [% FOREACH itemsloo IN itemsloop %] + [% UNLESS ( loop.odd ) %] + + [% ELSE %] + + [% END %] + [% IF ( itemsloop ) %] + + [% END %] + [% UNLESS ( item_level_itypes ) %][% END %] + + + + + + [% END %] +
     Item type + Title + [% IF sort == 'title' %] + [% direction %] sort + [% ELSE %] + + [% END %] + + Author + [% IF sort == 'author' %] + [% direction %] sort + [% ELSE %] + + [% END %] + Date added + Call number + [% IF sort == 'itemcallnumber' %] + [% direction %] sort + [% ELSE %] + + [% END %] +
    + [% IF ( itemsloo.confirm ) %] + + + [% ELSE %] + + [% END %] + + [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %][% itemsloo.description %][% END %][% itemsloo.description %] + + [% IF ( itemsloo.XSLTBloc ) %] + [% itemsloo.XSLTBloc %] + [% ELSE %] + [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %] + [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %] + [% END %] +

    + [% IF ( itemsloo.notforloan ) %] + No holds allowed + [% ELSE %] + [% IF ( itemsloo.ITEM_RESULTS.size ) %] + Holds + [% IF ( holdfor ) %] | Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])[% END %] + [% ELSE %] + No holds allowed + [% END %] + [% END %] + [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] + | Edit record + [% END %] + [% IF ( CAN_user_editcatalogue_edit_items ) %] + | Edit items + [% END %] +

    +
    [% itemsloo.author %][% itemsloo.dateadded %] +
      + [% FOREACH result IN itemsloo.ITEM_RESULTS %] +
    • [% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %] + [% IF ( result.itemcallnumber ) %] + [[% result.itemcallnumber %]] + [% END %] +
    • + [% END %] +
    +
    +
    [% pagination_bar %]
    +
    + + [% END %] +
    +[% END %] + +[% IF ( allowaddingitem ) %] +
    +
    +
    + Add an item to [% shelfname | html %] +
      +
    1. + + + + + +
    2. +
    +
    +
    +
    +[% END %] + +[% IF ( debug ) %] + [% IF ( edit ) %]
    Edit is on ([% shelfname | html %])
    [% END %] + [% IF ( seflag ) %]
    seflag is on ([% seflag %])
    [% END %] +[% END %] + +[% IF ( seflag ) %] +
    +
    +
    +
    + + [% IF ( shelves ) %] + + Create a new list +
      +
    1. +
    2. Owner: [% loggedinusername %]
    3. +
    4. +
    5. +
    6. +
    7. + [% INCLUDE list_permissions %] +
    + [% END %] + + [% IF ( edit ) %] + + [% IF ( showprivateshelves ) %][% END %] + + Edit list [% shelfname | html %] +
      +
    1. +
    2. [% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]
    3. +
    4. +
    5. +
    6. +
    7. + [% INCLUDE list_permissions %] +
    + [% END %] + +
    +
    + [% IF ( showprivateshelves ) %]Cancel[% ELSE %]Cancel[% END %] +
    +
    +
    +
    +
      +
    • A Private list is managed by you and can be seen only by you.
    • +
    • A Public list can be seen by everybody, but managed only by you.
    • +
      +
    • The owner of a list is always allowed to add entries, but needs permission to remove.
    • +
    +
    +
    +
    +[% END %] + +[% UNLESS ( vseflag ) %] +

    Lists

    +
    + + [% IF ( showprivateshelves ) %] +
    + [% ELSE %] + + + [% IF ( showpublicshelves ) %] +
    + [% ELSE %] + +
    +[% END %] + +
    + + + +
    + +
    +
    +[% INCLUDE 'intranet-bottom.inc' %] -- 1.7.9.5