Spotted at line 183 (older Koha version).
Test plan:
You need a NULL in the tab column of marc_subfield_structure. Hit this
page and check the logs.
This might convince you easier:
my $tabloop=0; my $x; print "Empty string - True\n" if ( $x // q{} ) ne $tabloop;
print "Zero - True\n" if ( $x // '0' ) ne $tabloop;
You should only see: Empty string - True proving that defaulting to '0'
would be a game changer.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Includes:
Bug 29697: (follow-up) Use flag embed_items
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
We not longer need to pass holdfor_cardnumber distinctly, we can just
refer to holdfor_patron.cardnumber instead. This patch does that ;P
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch update the catalogue search results page to use the
patron-title include to display patron titles for the 'Holds for' line
in results and dropdown list.
Test plan
1) Load patron account
2) Press search to hold
3) Perform a search which brings back 2+ items (e.g. 'street')
4) Note that on the search results it says: Place hold for 'firstname
(othername) surname (cardnumber)'
5) Press the Place hold button and note that the dropdown includes
"Place hold for 'firstname (othername) surname'" and "Forget
'firstname (othername) surname'"
6) Click through to an item from the results, press the 'Place hold'
button and note the dropdown includes "Place hold for 'firstname
(othername) surname'"
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
On bug 17591 we discovered that there was something weird going on with
the way we export and use subroutines/modules.
This patch tries to standardize our EXPORT to use EXPORT_OK only.
That way we will need to explicitely define the subroutine we want to
use from a module.
This patch is a squashed version of:
Bug 17600: After export.pl
Bug 17600: After perlimport
Bug 17600: Manual changes
Bug 17600: Other manual changes after second perlimports run
Bug 17600: Fix tests
And a lot of other manual changes.
export.pl is a dirty script that can be found on bug 17600.
"perlimport" is:
git clone https://github.com/oalders/App-perlimports.git
cd App-perlimports/
cpanm --installdeps .
export PERL5LIB="$PERL5LIB:/kohadevbox/koha/App-perlimports/lib"
find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \;
The ideas of this patch are to:
* use EXPORT_OK instead of EXPORT
* perltidy the EXPORT_OK list
* remove '&' before the subroutine names
* remove some uneeded use statements
* explicitely import the subroutines we need within the controllers or
modules
Note that the private subroutines (starting with _) should not be
exported (and not used from outside of the module except from tests).
EXPORT vs EXPORT_OK (from
https://www.thegeekstuff.com/2010/06/perl-exporter-examples/)
"""
Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members.
@EXPORT and @EXPORT_OK are the two main variables used during export operation.
@EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace.
@EXPORT_OK does export of symbols on demand basis.
"""
If this patch caused a conflict with a patch you wrote prior to its
push:
* Make sure you are not reintroducing a "use" statement that has been
removed
* "$subroutine" is not exported by the C4::$MODULE module
means that you need to add the subroutine to the @EXPORT_OK list
* Bareword "$subroutine" not allowed while "strict subs"
means that you didn't imported the subroutine from the module:
- use $MODULE qw( $subroutine list );
You can also use the fully qualified namespace: C4::$MODULE::$subroutine
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There is a "debug" parameter we are passing from the controller scripts
to C4::Auth::get_template_and_user, but it's not actually used!
Test plan:
Confirm the assumption
Review the changes from this patch
Generated with:
perl -p -i -e 's#\s*debug\s*=\>\s*(0|1),?\s*##gms' **/*.pl
git checkout misc/devel/update_dbix_class_files.pl # Wrong catch
+ Manual fix in acqui/neworderempty.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch modifies the toolbar shown on bibliographic detail pages so
that the "Add to cart" and "Add to lists" buttons are separate. The "Add
to cart" will now reflect whether the title is in the cart. The "Add to
lists" button will now be a menu of list choices like it is on the
search results page.
To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Search for a title in the staff client and view the detail page for one
of the results.
Testing the cart button:
- In the toolbar you should see an "Add to cart" button and an "Add to
lists" menu button.
- Clicking the "Add to cart" button should show the cart message
associated with cart link in the header.
- The label showing the number of items in the cart should be
incremented.
- The button should change to a "Remove from cart" button.
- Clicking the "Remove from cart" button should correctly remove the
item from the cart:
- The label showing the number of items in the cart should be
decremented.
- The button should change to "Add to cart."
- Add a title to the cart and click the cart link in the header to open
the cart pop-up window.
- Click the "Empty and close" button in the cart window.
- After you confirm the cart window should close. The "Remove from
cart" button should now be an "Add to cart" button.
- Add a title to the cart and navigate between each of the other views
of that title: Normal, MARC, Labeled MARC, and ISBD. On each page you
should see a "Remove from cart" button.
- Test the add and remove functions from each of the other bibliographic
detail views.
Testing the lists button:
- On the normal bibliographic detail page you should see an "Add to
list" menu button. Clicking it should reveal the same kind of lists
menu you see on the catalog search results page, with recent public
and private lists and options for "More lists" and "New list."
- Test that each of these options works correctly to trigger the
expected pop-up window.
- Confrim that the correct title is added to the correct list.
- Perform this test from each of the bibliographic detail pages: Normal,
MARC, Labeled MARC, and ISBD.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It defaults to 0 in get_template_and_user
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There is a "norequest" boolean passed to the include cat-toolbar.inc, to
display or not the "Pace hold" button.
This flag was not calculated in some place (ISBDdetail and moredetail
for instance)
Here we centralize the code to make it more robust and less regression
prone.
Note that the same problem appears at the OPAC (opac-MARCdetail is
always display the button). That will have to be fixed separately
Test plan:
Create biblio A with 0 item, B and C with 1 item and D with 2 items
item for B is not for loan, C is for loan and D has 1 of each
Go to the bibliographic detail page of each record and confirm that the
"Place hold" button appears appropriately.
Test the different tabs of the catalogue module
QA note: This patch is only centralizing the existing code, but it is
still too naive. To manage the visibility of this button we certainly
want to copy what is done in C4::Search::searchResults:
# can place a hold on a item if
# not lost nor withdrawn
# not damaged unless AllowHoldsOnDamagedItems is true
# item is either for loan or on order (notforloan < 0)
$can_place_holds = 1
if (
!$item->{itemlost}
&& !$item->{withdrawn}
&& ( !$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems') )
&& ( !$item->{notforloan} || $item->{notforloan} < 0 )
);
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This is never used.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This is never used.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch fixes the formatting of dates on the following pages:
- catalogue/MARCdetail.pl (staff)
- cataloguing/additem.pl (staff)
- opac-MARCdetail.pl (opac)
To test:
1) Ensure that the following fields are visible in the opac, intranet
and editor. You may need to edit the subfields in your default
bibliographic framework
952$d date accessioned
952$q date due/on loan
952$r date last seen
952$s date last borrowed
952$w replacement price date
Also ensure you have dateformat system preference set
2) Go to cataloguing/additem.pl for a biblio. Fill in the fields above
if required. Save
3) Remain on cataloguing/additem.pl. Notice the items table at the top
of the page, the dates are in the generic yyyy-mm-dd format
4) Go to catalogue/MARCdetail.pl for that biblio. Notice dates in wrong
format
5) View this biblio in the opac opac-MARCdetail.pl. Scroll to bottom to
items table. Notice dates in wrong format.
6) Apply patch, restart memcached and plack and refresh pages
7) Dates should now be formatted according to dateformat preference
8) Confirm that changing the preference changes the format of the dates
Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We certainly faced 3 similar bugs due to this syntax: bug 23006, bug
22941 and bug 17526.
To prevent other issues related to this syntax this patch suggests to
replace them all in one go.
Test plan:
Confirm that the 2 syntaxes are similar
Eyeball the patch and confirm that there is no typo!
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Applies to OPAC and staff: opac-MARCdetail and catalogue/MARCdetail.
Test plan:
[1] Pick an item. Pick two fields say URI and copy number, and fill these
with a value like A | B. (The pipe char is important.)
[2] Verify that the display of the item block on opac-MARCdetail shows
both A and B in those columns. (Previously only B was shown.)
[3] Verify the same on catalogue MARC detail, items tab.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifes the process of searching for an existing record
to add to a basket. Now the search is performed as a keyword search in
the regular catalog rather than via a custom search script. Options are
added to the search results and detail pages to add results to an order.
This process follows the same pattern as the "Search to hold" feature:
When the search is initiated, a cookie is set with the requisite
information--in this case vendor id and basket number.
If the search results or bibliographic detail pages detect that a
"searchToOrder" cookie is present, the correct "Add order" link will be
shown. Like with the "search to hold" feature, the cookie expires in 10
minutes.
To test, apply the patch and log into the staff client as a user who has
permission to add to a basket in acquisitions.
- Go to Acquisitions -> Vendor -> Basket -> Add to basket.
- Using the "From an existing record" option, perform a search.
- On the search results page, test the "Add order" link which appears
with each result. Clicking the link should take you to the "New
order" page for the correct vendor and basket. The catalog
details section of the form should include the correct information.
- From the search results page view the bibliographic details page for
any record. There should be a new toolbar button, "Add order." Verify
that it works correctly.
- Test the same thing from all bibliographic detail pages: Normal,
MARC, Labeled MARC, ISBD, as well as the items page
(moredetail.pl).
- Test this process for both the locations in acquisitions where one
can add to an existing basket: Vendor search results and the basket
detail page
- Test the cookie timeout: Wait 10 minutes and perform another catalog
search. The "Add order" link should no longer be present.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1) Ensure the COinS span tag is still included on this pages. You need
to look into html source and search for span tag with class 'Z3988',
which has COinS string in title.
Staff client:
catalogue -> ISBDdetail
catalogue -> MARCdetail
catalogue -> detail
virtualshelves -> shelves
OPAC (you should have COinSinOPACResults system preference enabled):
opac detail
opac search
opac shelves
2) Run tests:
prove t/Biblio.t t/db_dependent/Biblio.t t/db_dependent/Koha/Biblio.t
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested with all 9 current patches. Works as advertised, including
OPACURLOpenInNewWindow. If a record has no items, no OpenURL link
is displayed. All the suggested tests pass. I did not test with
XSLT turned off.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Easily removed switching the two conditions.
Test plan:
Hit catalogue/MARCdetail.pl?biblionumber=1
=> Without this patch you will see in the log warnings like
Argument "ddc" isn't numeric in numeric eq (==) at /home/vagrant/kohaclone/catalogue/MARCdetail.pl line 277.
=> With this patch applied the warnings do no longer appear
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
- Create a record in any framework that is not default
- Search for the record in your catalog
- Switch to the MARC tab
- Change framework pull down to default on top
- Note the page reloads and the framework stay default
- Verify it works for other frameworks
Also test the "labeled MARC" view (you will need the pref viewLabeledMARC turned on)
Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Looking up a nonexistent record in the MARC details -page causes
the COinS to carp. The fix is trivial, just move the COinS call
couple lines, after the record existence check.
TEST PLAN
---------
1) reset_all for kohadevbox
2) log in to staff client - admin/admin
3) search catalogue for green
4) tweak the top URL to have a bad biblionumber (eg. 9999)
5) cat /var/log/koha/kohadev/plack-err.log
-- floody! with errors.
6) echo | sudo tee /var/log/koha/kohadev/plack-err.log
7) restart_all
8) repeat steps 2 through 5.
-- just nice starting messages, not floody.
9) run koha qa test tools
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test Plan:
- Check that it now says 'use Modern::Perl;' and not 'use strict; use
warnings;' in the following catalogue perl scripts.
MARCdetail.pl
export.pl
image.pl
imageviewer.pl
issuehistory.pl
labeledMARCdetail.pl
moredetail.pl
search.pl
showmarc.pl
updateitem.pl
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Change parameters to a hashref.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks good to me.
Two calls in migration_tools/22_to_30 still in old style.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
GetMember returned a patron given a borrowernumber, cardnumber or
userid.
All of these 3 attributes are defined as a unique key at the DB level
and so we can use Koha::Patrons->find to replace this subroutine.
Additionaly GetMember set category_type and description.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The C4::Reserve::GetReservesFromBiblionumber took 3 parameters, the
biblionumber, an optional itemnumber and a "all_dates" flag.
If set, the subroutine returned all the holds placed on a given bibliographic
record, even the ones placed in the future. Almost all of the calls had this
flag set, they will be replaced with a call to Koha::Biblio->holds.
But 5 did not have it:
- C4::Biblio::DelBiblio
-tools/batch_delete_records.pl
=> These 2 were wrong, we want to retrieve the holds to cancel them
before deleting the record. We need to get all the holds, even the ones
placed in the future /!\ CHANGE IN THE BEHAVIOR
- acqui/parcel.pl
=> 1 call per item were made to this subroutine. They have been replaced
with only 1 call to the new method Koha::Biblios->holds_placed_before_today
Then we filter on the itemnumbers.
I think this is wrong: we need the number of holds to know if the record
can be deleted, so even if future holds exist, the deletion should not
be possible.
- serials/routing-preview.pl
- C4::ILSDI::Services::GetRecords
- C4::SIP::ILS::Item->new
=> Seems ok, we just one to display holds placed before today
Test plan:
I would suggest to test this patch with patches from bug 17737 and bug 17738,
to place different kind of holds (biblio and item level, future and
past).
Then do a whole workflow to detect bug, view a record, delete record,
order, place a hold on an item which has been ordered, etc.
The hold's informations should always be the same without or without
these patches.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count
Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.
=> You should not be able to delete it.
Remove the items and then try again to delete the record
=> Now you must be able to delete it.
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4::Koha::getframeworks returned a hashref of biblio frameworks.
It was mainly used to generate the dropdown list of frameworks.
The scripts modified in this patch did not necessary order the element
by description (frameworktext), the displays were not consistent from
one screen to another.
Using the same search method everywhere:
Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
We will know always get the framework in the same order.
Test plan:
Following the different pages modified by this patch, and make sure the
frameworks are displayed correctly in the dropdown list:
1/ acqui/z3950_search.pl - Create an order from an external source.
2/ admin/fieldmapping.pl - Define some mappings keyword / MARC field
3/ admin/marctagstructure.pl - On the MARC frameworks admin page, select
another framework than the default one and click on the 'Search' button
4/ catalogue/MARCdetail.pl - On the MARC defail page, change the
framework you want to use to display the record
5/ cataloguing/addbiblio.pl - Add or edit a biblio record, change its
framework. When editing, the framework of the record should be selected
by default
6/ cataloguing/addbooks.pl - Go on the cataloguing home page and click
on the "New record" button. You should see all the frameworks
7/ cataloguing/merge.pl - Select 2 biblio records to merge. On the first
step (select the merge reference), you should be allowed to select the
framework to use.
8/ tools/inventory.pl - On the inventory page, the "Item statuses" part
should be populated as before this patch
9/ tools/manage-marc-import.pl - Stage records for import. Before
importing them into the catalog, you should see the framework dropdown
list.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works Ok.
No errors
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Hit
/cgi-bin/koha/catalogue/detail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
=> Without this patch you will see the alert
=> With this patch, no more alert
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
On the MARC detail page, the columns are displayed in a random order.
This means that you can open 2 different records and see the columns
displayed in a different order.
Test plan:
Go on different MARC detail view and confirm that 1/ all fields are
present and 2/ they always are displayed in the same order
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
1/ & 2/ correct
No errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.
This patch changes the occurences of '.tmpl' in favour of '.tt'.
To test:
- Apply the patch
- Install koha, and verify that every page can be accesed
Regards
To+
P.S. a followup will remove the glue code.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
In Catalog > MARC Details, the HTML in the different tabs is slightly
inconsistent and doesn't differentiate different elements, making CSS
styling complicated or impossible:
* tab 0 has <p class="subfield_line"> whereas all the other tabs
have just <p>
* all other tabs wrap the subfield character in <b> tags, except
for tab 0
* the MARC tag title is a single div with the tag, the indicators
and the field description.
Attached patch folds all the tab outputs into a single TT BLOCK,
which is then reused. It also marks the separate parts of the tag
title in their own spans.
The output should be nearly identical to previous behaviour, minus
a dash from the tag title descriptions - it was used to separate
the tag from the description. The description can now be styled
separately from the tag itself, so the dash can be added with CSS,
if necessary.
Revised test:
1) Find a biblio
2) Edit the record so that there is something in every tab (0-9).
3) Save and then click 'MARC' in the left pane to view the
MARC details.
4) Note the contents of each tab.
5) Apply patch
6) Compare the MARC details output to what was noted. Should
be the same, minus a dash in each of the tag title descriptions.
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The JavaScript included in cat-toolbar.inc expects several variables to
be passed to the template for use in calculations. Several scripts
do not pass the required variables to the template, leading to a JS
error.
This patch re-adds (See Bug 9823) hold count calculation to the required
scripts and copies the acquisitions-related count calculation from
detail.pl into related bibliographic detail scripts so that the
commonly-included cat-toolbar.inc can receive correct values.
To test, locate a bibliographic record which has no holds and is not
used in a current or deleted order, but which has a local cover image
attached. Check the following views to confirm there is no JavaScript
error:
- Normal
- MARC
- Labeled MARC
- ISBD
- Items
- Images (from the Images tab on the "Normal" detail page)
Next, locate a bibliographic record with no items attached which is used
in an Acquisitions order. On each of the pages listed above, choose
"Delete record" from the Edit menu. This should trigger a warning that
the record is used in an order. Cancel the deletion.
Finally, delete the order which references the bibliographic record. On
each of the pages listed above, choose "Delete record" again. This
should trigger a warning that the record is used in a deleted order.
Cancel the deletion.
I went through the test plan, everything works OK.
It resolves Bug 11831 as well.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Printing from MARC and ISBD view works again
- No more Javascript errors found
- Deleting a record with attached order gives the correct warning,
both for ordered and cancelled.
Passes all tests and QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The template params holds and holdcount are not used in the ISBD template.
Removed the associated code from catalogue/ISBDdetail.pl.
Same applies for catalogue/MARCdetail.pl and labeledMARCdetail.pl.
Same applies also for catalogue/imageviewer.pl.
Same applies also for catalogue/moredetail.pl.
In catalogue detail.tt only the number of holds is used. Removed the code
that passed the holds array to the template.
For consistency opac-detail should also incorporate future holds into its
holds count; added the all_dates parameter for that reason.
The Reserves module is no longer needed in moredetail. Removed it. Checked
the other scripts also.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The return from GetReservesFromBiblionumber contains an unnecessary
extra variable. In scalar context an array returns its element count.
Maintaining a separate count can lead to unforeseen bugs
and imposes ugly constructions on the subroutine's users.
Remove the useless count variable from the return
This patch also changes the parameters: now the routine takes a hashref.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Placed biblio holds, future holds and item holds. Works as expected.
Tested Holds.t and Reserves.t. Pass.
Tested /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=999 with two holds on
one item. Fine.
C4/SIP/ILS/Item.pm: Looked for "whatever" and "arrayref" and could not find
them anymore. Looks good.
Handled a few unneeded calls in QA follow-up.
Left only one point to-do for serials/routing-preview.pl. See Bugzilla.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Although previous/next browsing was added for searches in the OPAC
in 2011, the staff client has been without any sort of search browsing.
Until now. This patch is an all-singing, all-dancing, all-compatible
implementation of search browsing that will work across multiple
browser tabs and on any browser since IE7 (though the staff client
layout is broken on IE7).
To test:
1) Perform a search that will bring up multiple results.
2) View one of the results.
3) Use the Previous and Next links to browse along the search results.
4) Use the "Return to results" button to check that you end up at the
correct page of results, even if you page through more than 20
records.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Test Plan:
1) Apply patch
2) Create a record
3) Create an item for the record
3) Place a hold on the bib
4) Attempt to 'Delete all items', you should recieve
an error message stating to delete all holds before
deleting all items.
Also, it is possible to get into a situation where a record has
holds but no items. In this situation, it is not possible to
view/delete the holds without adding an item back to the record.
In this case, attempting to delete the bib causes a warning, but
does not prevent deletion.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Passes tests - do note that it was a design decision to leave the delete links clickable even though they are grey.
The reasoning is that librarians will want to be able to know *why* they cannot delete a given item or bib - I like this.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch adds CoinS support to biblio displays in staff interface.
librarians can now use zotero on the staff interface
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Modified by: Ian Walls <ian.walls@bywatersolutions.com>
GetCOinSBiblio has changed interface, requiring a $record object instead
of looking one up by biblionumber. Calls in ISBDdetail.pl, MARCdetail.pl
and detail.pl updated.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Patch reworked for master using Template::Toolkit.
To+
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>