There is no special need to format the date in the perl script.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This bug removes deprecated C4::Dates from catalogue/detail.pl
To test:
Apply patch
Go to Home > Catalog > Details for [some biblio with items and holdings]
Make sure that biblio and Holdings and Acquisition details display as appropriate
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 14879 - Remove C4::Dates from catalogue/detail.pl
Remove forbidden patterns (tab) to pass QA tools
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
If IdependentBranches is ON, to edit/delete items from other branches
you need to be superlibrarian.
Currently a "simple" staff user cannot edit them from the edit item page
but from the catalogue detail page.
The edit links should not be displayed on this table.
Test plan:
O/ Set IndependentBranches to "Prevent".
Create a record and add 2 items:
Set homebranch to L1 for item I1.
Set homebranch to L2 for item I2.
1/ With a superlibrarian user, you should be able to edit both items.
2/ With a "simple" user attached to L1, you should only be able to edit
I1. The edit links should not be displayed for I2.
Note that the checkbox is displayed on the catalogue detail page (item
list), but on the batch tools, it won't be possible to select non-modifiable
items.
TODO: Add a server-side check. Indeed it is still possible to edit an
item if the user know the url.
Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
First, it is strongly recommended to set the OPACBaseURL. But
this patch allows the inclusion of the protocol and not just
a site.
Next, C4/Auth now puts OPACBaseURL into the template parameters
regardless of OPAC or Staff clients. t/db_dependent/Auth.t was
tweaked to add a check for confirming that get_template_and_user
adds OPACBaseURL to both OPAC and Staff templates.
In the staff client, once the OPACBaseURL is set, you get a nice
OPAC View link when viewing a biblio's detail. It should reflect
the protocol used now.
Hard coded 'http://' strings were removed from the
sample_notices.sql files. This is what required also updating
the letters table in the updatedatabase.pl script.
The explanation text in the sysprefs.sql needed updating too to
reflect the inclusion of the protocol. And this was the other
update done in the updatedatabase.pl script. The opac.pref file
was similarly changed as well.
catalogue/detail.pl had no need to pass a custom OpacUrl value,
since C4/Auth passes the required OPACBaseURL, so it and the
corresponding template were modified.
Both the MARC21 and NORMARC intranet details files had 'http://'
hard coded in them. This was removed.
Both the bootstrap and prog theme opac-detail template had a
protocol parameter that was used. The logic for the parameter
was not removed, because it is used extensively in one template.
Perhaps it should be used to simplify the other. However, the
calculated current_url parameter had references to the protocol
removed, because of the changes to OPACBaseURL.
opac/opac-shareshelf.pl had a hard coded 'http://' which was
removed.
t/db_dependent/Auth_with_cas.t had 'http://' added to the value
set for OPACBaseURL.
In virtualshelves/sendshelf.pl explicit code which sent the
OPACBaseURL preference was removed, since C4/Auth sends it all
the time now.
C4::Context::set_preference was tweaked to ensure that
OPACBaseURL would always start with http.
t/db_dependent/Context.t was tweaked to specifically test this.
The Shibboleth authentication needs OPACBaseURL set, and that
it be https protocol. The _get_uri routine was tweaked to always
pass back https:// as the protocol on the OPACBaseURL.
t/Auth_with_shibboleth.t was tweaked to specifically test the
changes.
TEST PLAN
---------
This is not an easy patch to test. Difficulties include:
- configuring Koha to run under https
(tweaking apache2 isn't so hard, just tricky)
- configuring Koha to run OPAC and Staff with Plak
(since code with comments about plak were sliced out)
- configuring Koha to use CAS
(may be requires for the CAS test)
1) Apply patch
2) Make sure OPACBaseURL is set without the protocol included.
UPDATEDATABASE
3) back up your DB
4) ./installer/data/mysql/updatedatabase.pl
-- It should run without errors.
5) Look up the OPACBaseURL system preference in the staff
client
-- It should have http:// prepended.
6) Run the mysqlclient from your koha git directory
USE koha_library;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
-- There should be no prepended http:// on the
<<OPACBaseURL>>.
7) restore your DB
8) Make sure OPACBaseURL is set with the protocol included,
preferably https.
-- Using https requires a bunch of apache2 tweaks.
AUTH
9) Call up staff client.
10) Call up OPAC.
-- C4/Auth.pm doesn't barf.
11) Call up Plack staff client
12) Call up Plack OPAC.
-- C4/Auth.pm doesn't barf.
13) prove -v t/db_dependent/Auth.t
CONTEXT
14) Home -> Koha administration -> Global System Preferences
-> OPAC
15) Modify and save OPACBaseURL to not have http:// or https://
on it.
-- It should be modified to include http://
16) Modify and save another system preference.
-- It should save normally
17) prove -v t/db_dependent/Context.t
CATALOGUE/DETAIL (tt & pl)
18) Confirm the OPACBaseURL is set
19) Navigate to any biblio details in the staff client
-- There should be a "OPAC view" link which has the
correct http:// or https:// in it.
SQL (sample notices and sysprefs)
20) Run the mysqlclient from your koha git directory
USE koha_library;
DELETE FROM letter;
source installer/data/mysql/de-DE/mandatory/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/en/mandatory/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/es-ES/mandatory/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/it-IT/necessari/notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/pl-PL/mandatory/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/ru-RU/mandatory/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
DELETE FROM letter;
source installer/data/mysql/uk-UA/mandatory/sample_notices.sql;
SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
-- Each of the selects should should lines that have
<<OPACBaseURL>> starting them, but no hard-coded http://
DELETE FROM systempreferences;
source installer/data/mysql/sysprefs.sql;
SELECT * FROM systempreferences WHERE variable='OPACBaseURL';
-- The explanation should reflect the new explanation.
QUIT
21) restore your DB
22) Make sure OPACBaseURL is set with the protocol included,
preferably https.
-- Using https requires a bunch of apache2 tweaks.
SLIM2INTRANETDETAIL
23) Set 'XSLTDetailsDisplay' system preference to default.
24) Set 'marcflavour' system preference to MARC21.
25) View any biblio's details.
-- the URL beside 'OPAC View' should have the appropriate
http:// or https://
26) Set 'marcflavour' system preference to NORMARC.
27) View any biblio's details.
-- the URL beside 'OPAC View' should have the appropriate
http:// or https://
OPAC-DETAIL
28) Set 'opacthemes' to bootstrap.
29) Set 'SocialNetworks' to enabled.
30) In OPAC, view any biblio's details.
-- the Share links should have the appropriate protocol on
the OPACBaseURL.
31) Set 'opacthemes' to prog.
32) In OPAC, view any biblio's details.
-- the Share links should have the appropriate protocol on
the OPACBaseURL.
AUTH_WITH_CAS
33) prove -v t/db_dependent/Auth_with_cas.t
OPAC-SHARESHELF
34) Set 'OpacAllowSharingPrivateLists' to allow.
35) In OPAC, 'Save to Lists' a search result.
36) Save it to a new private list.
37) Click the Lists button, and select the new list.
38) Click the Share button.
AUTH_WITH_SHIBBOLETH
39) prove -v t/Auth_with_shibboleth.t
-- needs to be tests on Debian, because I can't get
the Test::DBIx::Class installed in Ubuntu. :(
Rebased again on kohadevbox...
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds stocknumber (named Inventory number in interface)
to details table and items display if it exists.
Test scenario:
1. find item(s) which have inventory number assigned
2. verify that you don't see inventory number in items display
3. apply this patch
4. verify that inventory number is now available
Signed-off-by: Nicole <nicole@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Since SearchSubscriptions is the way to search subscriptions, each call
to GetSubscriptions could be replaced by a call to SearchSubscriptions.
Test plan:
Verify following pages display the same thing as before this patch:
- catalogue/detail.pl
- opac/opac-ISBDdetail.pl
- opac/opac-detail.pl
Verify the following page returns correct results:
- serials/checkexpiration.pl
Verify the Serials UT file still passes:
- prove t/db_dependent/Serials.t
Note: The title filter on checkexpiration now only searches on the title
DB field. I don't think it is a regression, it should be the way to use
this field. Maybe should we add new search fields on this form.
Bug 5337 reintroduces a bug fixed by bug 5864, this patch restore the
right way to search subscription (based on biblionumber).
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
GetHistory iterated on the orders to calculate the quantity and price.
These values are never used by the called.
It can be removed.
Test plan:
Verify there is no regression on acqui/histsearch.pl and
catalogue/detail.pl
Actually you just have to check that the total quantity and price are
not displayed on these views.
QA: note that 'count' and 'toggle' are never used in the template.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
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>
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>
The list of links to items from the acquisitions tab can be
unwieldy if an order was used to purchase a lot of them, and the
availability of AcqItemSetSubfieldsWhenReceived and filters on the
holdings table provide alternative ways to do things like turn
off on-order statuses.
Test plan:
- verify this patch does not introduce regression on the enhancement
introduced by bug 8230.
- verify the itemnumber list does not appears anymore.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
The acquisitions details tab on the holdings table in the staff
client no longer shows the links to the items. Tests pass.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
In my tests the itemnumbers didn't show up on the acquisition
detail tab before the patch. So the patch visually only changed
the column header for me. All other acquisition related information
showed up ok.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
1/ CURRENT_DATE() is a MySQLism and should be replaced with CAST(now() AS
DATE).
2/ The date formatting should be done in the template (using the TT
plugin).
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.
But a closer look revealed that we do not really need it.
The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.
This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.
Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.
Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:
[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
Transfers to receive.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes GetReservesFromItemnumber also returns the waiting
date and removes some repeated code.
Improves item status display on catalogue detail, when placing a hold at
opac-reserve and in staff, and on transfers to receive form.
This patch builds on work from reports 9367 and 9761.
Test plan:
Place a future next-av. hold (enable future holds prefs), say 2 days ahead.
Check item status on catalogue detail. Nothing to see.
Enable ConfirmFutureHolds by inserting a number of days, say 2.
Confirm earlier hold by checking it in. Look at item status again on detail.
Switch to other opac user. Try to place a hold again. Check item status with
item level hold info. Try to place hold in staff, check item level status.
Make a transfer for that item. Switch branch. Look at transfers to receive.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds a new tab "Acquitition details" on the catalogue detail
page. It provides a list of order made for this biblio.
New system preference:
AcquisitionDetails: Hide/Show the new tab. The default for
new and upgraded installations is to display the new tab.
Test plan:
1/ Apply the patch.
2/ Select the "placing an order" value for the AcqCreateItem pref.
3/ Create a new order with X items.
4/ Go on the catalogue detail page for the selected biblio.
5/ Click on the "Acquisition details" tab and check that your order is
displayed. Itemnumbers are present in the last column. Check that links
are not broken.
6/ Close your basket.
7/ Status become "Ordered"
8/ Receive X-1 items.
9/ Come back on the catalogue detail page. There are 2 orders: 1
complete and 1 partial. The complete one has a receive date.
10/ Receive the last item.
11/ Now you have 2 orders with a complete status.
12/ Cancel the last receipt.
13/ You have 1 ordered and 1 complete (2 items).
14/ Cancel the first receipt.
15/ You have 1 ordered (3 items).
16/ Delete your order
17/ You have 1 deleted order.
18/ Switch the AcqCreateItem pref to "receiving an order"
19/ Do again steps 3 to 17.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Currently, anyone can delete a record used in an order.
With this patch, only librarians with managing order permission
can delete it if it is used in an active or a deleted order.
This patch also add a specific warning informing that deleting a record
used in an active order is dangerous.
To test :
A. test what can do and see a librarian with order managing rights
0) Connect to Koha with a borrower with order managing rights
1) in a basket, create 2 orders A & B from new records
2) delete order B
3) in the catalogue, try to delete
- record used for order A : you should see a specific warning
informing you the record is used in 1 order, and that deleting it
is dangerous
- record used for order B : you should see a specific warning informing
you the record is used in 1 deleted order
- a record not used in any order : you should see no specific warning
B. test what can do and see a librarian without order managing rights
4) Connect to Koha with a borrower without order managing rights
5) in a basket, create 2 orders A & B from new records
6) delete order B
7) in the catalogue, try to delete
- record used for order A : you should see a specific warning informing you that
you need specific rights to delete the record
- record used for order B : idem
- a record not used in any order : you should see no specific warning
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch add a column in the items table of catalogue/detail.pl that
contains checkboxes for item selection and a drop-down list of actions
that can be executed for the selection of items.
Currently available actions are:
- Delete selected items: redirect to batch items deletion
- Modify selected items: redirect to batch items modification
Item selection is only enabled if the new syspref
StaffDetailItemSelection is ON.
Actions are not displayed if user doesn't have the right permissions.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Further testing notes on last patch.
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>
Renamed that routine to GetItemCourseReservesInfo in
order to avoid any potential confusion with reserves
qua hold requests.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
New modules should not export any symbols by default
without a very good reason.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Adds a course reserves system for academic libraries.
The course reserves system allows libraries to create courses
and put items on reserves for those courses.
Each item with at least one reserve can have some of its attributes
modified while it is on reserve for at least one active course.
These attributes include item type, collection code, shelving location,
and holding library. If there are no active courses with this item
on reserve, it's attributes will revert to the original attributes
it had before going on reserve.
Test Plan:
1) Create new authorised value categories DEPARTMENT and TERM
2) Create a new course, add instructors to that course.
3) Reserve items for that course, verify item attributes have changed.
4) Disable course, verify item attributes have reverted.
5) Enable course again, verify item attributes again.
6) Delete course, verify item attributes again.
7) Create two new courses, add the same item(s) to both courses.
8) Disable one course, verify item attributes have not reverted.
9) Disable both courses, verify item attributes have reverted.
10) Enable one course, verify item attributes are again set to the
new values.
11) Edit reserve item attributes, verify.
12) Disable all courses, edit reserve item attributes, verify
the item itself still has its original attributes, verify
the reserve item attributes have been updated.
13) Verify the ability to remove instructors from a course.
14) Verify new permissions, top level coursereserves, with
subpermissions add_reserves and delete_reserves.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
http://bugs.koha-community.org/show_bug.cgi?id=8125
The two holdings tabs displayed whether
or not there is anything to go in them.
Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
If one item list is empty, no empty tab is shown.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.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 removes the superflous code related to 'publictype' which
is a key set for item hashes in some perl files. This key is never
used or stored.
Test Plan:
1) Apply patch
2) Test catalogue/detail.pl, opac/opac-detail.pl and opac/opac-user.pl
3) You should not see any changes in behavior
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
1/ It's better to set style of the video marked in a css file.
2/ Replace some
for my $i in (0..#$array)
with
for my $element in (@array)
3/ the routine in a pm returns a hash not the $template variable
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This enhancement uses information from MARC field 856 to generate the appropriate HTML5 code to embed am media player for the file(s) in a tab in the OPAC and staff client detail view. This patch supports the HTML5 <audio> and <video> element. Additionally it gives basic support for the <track> element. This element is not supported very well by recent browsers. Please consider the patch working when you get working video or audio.
Rebased to Master 22.11.2012
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and perlcritic pass.
Tests:
Database update
- OK, system preferences were added correctly
- Version number of updatedatabase was only XXX, changed to 3.11.00.XX
OPAC
1) Detail page
- OK, no visible change when OpacSeparateHoldings is turned off
- OK, switching OpacSeparateHoldingsBranch works correctly
- OK, shelf browser opens in correct tab
- OK, only one tab shows when logged out
INTRANET
2) Detail page
- OK, no visible change when SeparateHoldings is turned off
- Number of items is missing on top of the tabs
Notes:
- database update doesn't include bug number
- other holdings tab does show when there are 0 items at other branches,
it could be hidden in those cases
- if there are over 50 items in the holdings or Other holdings tab, the
warning and link 'This record has many physical items. Click here
to view them all.' is only shown for the first tab.
- closing the shelf browser on the second tab goes back to first tab
- number ofitems is missing on top of the tabs
- there are lots of indentation changes in the second patch,
this makes it very hard to see the changes, please provide separate
patches in the future
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
The 2 sysprefs are SeparateHoldingsBranch and OpacSeparateHoldingsBranch
and permit to chose between home branch and holding branch.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Two tabs: "<branch> holdings" / "Other holdings"
"<branch> holdings" tab contains items whose homebranch is the current branch.
"Other holdings" tab contains all other items.
If current branch is not set (connected with mysql user or not logged in
(opac)), the display is unchanged (1 tab "Holdings")
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
If a subscription is no longer enough published (or we are not waiting
for a new periodical) we are allowed to close it.
If a subscription is closed, we are not able to receive or generate a
new serial.
On the serial module, we can now
- close a subscriptionn
- reopen a closed subscription
On serial search 2 tabs is displayed (opened and closed subscriptions).
This patch adds:
- a new field subscription.closed in DB
- a new status for serials (8 = stopped)
Test plan:
- search subscriptions
- close a subscription and check that you cannot receive or generate a
new serial
- launch another search and check that the closed serial is into the "closed"
tab.
- You are allowed to reopen a subscription on the subscription detail
page and on the subscription result page. A javascript alert ask you
if are certain to do this operation.
- Check the serial status "stopped" everywhere the status is
displayed (catalogue/detail.pl, serials/claims.pl,
serials/serial-issues-full.pl, serials/serials-collection.pl,
serials/serials-edit.pl, serials/serials-recieve.pl,
serials/subscription-detail.pl and opac-full-serial-issues.pl)
- The report statistics does not include the closed subscriptions if you
don't check the "Include expired subscriptions" checkbox.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 8782: Followup: add some minor modifications
- Show 'closed' information in biblio detail page
- Add a column in serials report table
- Search subscriptions on title words instead of string
- Prevent serials editing when subscription is closed
- Don't change status of "disabled" serials
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 8782 - Close a subscription - Followup - Fix updatedatabase.pl
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Changed "$item->{'materials'} ne ''" to
"defined($item->{'materials'}) && $item->{'materials'} =~ /\S/"
in if condition to prevent error when it is NULL, and to
properly capture the intent of printing if there is something
visible.
Cases tested include NULL, '0', '', ' ', and 'blah' by using
UPDATE items SET materials=NULL where biblionumber=19158;
where the biblionumber was chosen randomly, because only NULL
was in the items.materials field. The NULL case triggers an
error, but it does display correctly.
The ' ' case displays an apparently empty column, which does not
seem to be the intent of the flag that is being set. This is why
a simple $var check is not sufficient.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Adds librariannote (staff subscription history note) and missing list to the normal catalogue detail view in staff client.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Changes the subscription note from the opac "notes" to the proper staff client "internalnotes" field.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch removes the AmazonReviews and AmazonSimilarItems
features from the OPAC and staff client. With on Amazon
feature remaining, cover images, the *AmazonEnabled preference
is also removed in favor of checking the *AmazonCoverImages
preference. Two other system preferences, AWSAccessKeyID and
AWSPrivateKey are removed as they were required only by the
removed features.
Handling of book cover images from Amazon is unchanged.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Turned on amazon covers in opac and staff client and all
worked as expected. Then tested to make sure other cover image
services still worked and they do.
Signing off.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
The biblio/items detail pages (staff and OPAC) display
the copynumber description if an authorized value
is configured accordingly.
Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
- in various acquisition pages and serials home
- in database : biblioitems.ean
- adds ean and its mapping in default english bibliographic framework
- adds ean mapping in default french bibliographic framework
- ean search is not enabled for MARC21
The required mapping between the ean marc field and the biblioitems.ean
database field will be automatically added on an existing unimarc installation.
However, if you already have records with ean, you will have to
run misc/batchRebuildBiblioTables.pl to populate biblioitems.ean
Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA at second run. Removed a merge marker only.
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
I am signing it off because it doesn't break anything and I will report
another bug for language issues described in my previous comment.
Removed MySQLism backquotes
- Adds a new page to the tags moderation section for viewing all the
titles tagged with a particular term.
- Adds display of approved tags to the catalog detail page matching the opac
view. Adding tags from the detail view not implemented.
Follow-up adds tags display to XSLT detail view
Areas for improvement:
- I think it would be better to show "Also tagged with:" and exclude
the current tag from the list of titles tagged with a particular tag.
- It would be nice to be able to show unapproved tags (and some idication of
their status) along with approved tags on the detail page if the user had
TagsModeration permission.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch adds display of local cover images in the following places:
1. OPAC Results page
2. OPAC Details page
3. Separate image viewer page for the OPAC
4. Intranet Details page
5. Separate image viewer page for the Intranet
Display in the Details and (OPAC) Results pages is handled via Javascript
rather than via direct embedding, to better handle the situation where most
records have local cover images, but a few do not.
Local cover images do not currently display in the Intranet Results page
How to use/test :
Assign user permission to the user Tools > (upload_local_cover_images Upload
local cover images). In order to upload local images, login to the staff
client. Go to Home > Tools > Upload Cover Images. Here you can upload cover
images either singly or in bulk in the form of a zip file. If uploading
singly, click on image file, browse the image from your local disk, type in
the biblio number of the catalogue entry and press upload. If uploading in
bulk as a zip file, the zip file must contain (in addition to cover images)
one text file named either datalink.txt OR idlink.txt. This file should
have mapping of biblionumber to image file name in the zip one per line
with comma or tab as delimiters. For example:
1, scanned_cover_image_of_bib_no_1.jpg
2, scanned_cover_image_of_bib_no_1.jpg
Cover images will be resized to a large image of 800x600 and a thumbnail of
200x140. Depending on the setting of AllowMultipleCovers, it is possible to
upload multiple images for a single bibliographic record. However, even if
multiple covers are permitted, you have the option of replacing the existing
covers by checking the "Replace existing covers" option on the upload screen.
1. The patch adds a menu link in Tools from where you can upload local cover
images
2. It adds a user permission to enable access control to this menu item under
Tools
3. It adds a system preference OPACLocalCoverImages under Enhanced Content.
This needs to be turned on to show local cover images in OPAC.
Once you have uploaded local images, if you search for the biblio, the local
cover should show up in search as well as search detail pages in the OPAC, and
the details view in the Intranet.
Koustubha Kale is working on another patch which will allow us to set a cover
image source priority in system preferences, and which will then gracefully
fail over to the next source if image is not available from the first choice
source.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Rebased the patch because it was failing with koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css due to changes pushed in master.
Applies cleanly now.
This first page makes the database change, and displays the field on
the detail.pl and moredetail.pl pages in the staff client
How to Test:
* Add a note to the materials specified page in cataloguing (952
subfield 3 for MARC21, but it shouldn't matter as long as you have a
field mapped to items.materials
* Check it displays at catalogue/detail.pl
* Check it displays at catalogue/moredetail.pl
Patch to follow to have the note display at checkin/checkout
http://bugs.koha-community.org/show_bug.cgi?id=7278
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts in updatedatabase.pl and kohastructure.sql
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>
Display links to parent biblios, show linked items in holdings, allow holds on
linked items. This uses MARC to maintain relationships.
Sponsored by the Mississippi Department of Archives and History and RapidRadio
Solution. Originally developed by Savitra Sirohi and Amit Gupta at OSSLabs, with
UNIMARC support added by Zeno Tajoli. Commits squashed and merge conflicts
resolved by Chris Cormack from Catalyst. Respect for NORMARC and some small
framework portability fixes made by Jared Camins-Esakov of C & P Bibliography
Services.
IMPORTANT NOTE: A bug in the 773 coding for MARC21 was corrected from the
original OSS Labs code. The 773s generated by the pre-release code did not have
the first indicator set to '0', which means that they were not supposed to
display. Going forward, the first indicator will be set correctly, but existing
records created with this code will no longer appear (they appeared before only
due to another bug). To correct this, you could globally (or, to make sure you
only modify records created with the Analytics tool, for records with 773$0)
change the first indicator of the 773 from blank to '0'.
== Background ==
An analytic record for an item is a more detailed, monographic biblio for an
item attached to a serial record . This is often used for special issues of a
journal that are released as books on their own (assigned an ISBN, as well as an
ISSN/volume/issue). It is important for researchers to be able to search for
these items both as issues of the serial, and as monographs. It is equally
important for the library to not have duplicate item records for the item in
question to have to keep synchronized.
== Establishing relationships ==
Analytical records are connected to items belonging to parent or host
bibliographic records. This can be accomplished by:
* From an analytical bibliographic record linking to an host item by providing
the item barcode as input
* From a host item by using option "analyze", this creates a new empty
bibliographic record with field 773 (MARC21) populated
* Running a new CLI script that establishes a relationship between the
analytical record and the host item identified by the barcode in the
analytical record's 773$o (MARC21)
== Connecting Records ==
The relationships are maintained in the MARC records, we have not used database
tables at all.
== MARC Representation ==
In MARC21/NORMARC we have used:
* 773$9 to store the Koha item number of the host item
* 773$0 to store the Koha biblio number of the host bibliographic record
The above fields are used to display the relationships in various screens in the
OPAC and the staff interface. Additionally, when populating field 773 with host
item's details, we have used following MARC 21 mapping:
* 'a' <= 100/110/111 $a (author main)
* 'b' <= 250$a (edition)
* 'd' <= 260$a, 260$b, 260$c (place, publisher, year)
* 'o' <= barcode
* 't' <= 245$a (title)
* 'w' <= (003)001 --> if no 001 is available, we can populate biblionumber
* 'x' <= 022$a (issn)
* 'z' <= 020$a (isbn)
In UNIMARC, this code uses:
* 461$9 to store the Koha item number of the host item
* 461$0 to store the Koha biblio number of the host bibliographic record
When populating field 461 in UNIMARC, the following mapping is used:
* 't' <= 200$a (title)
== Treatment of Holds ==
A key requirement was to allow holds to be placed on host items from the
analytical record. We have accomplished this by allowing holds on specific
copies only. Biblio level holds are not allowed. This ensures that holds are
placed on specific items that are relevant to the analytical record.
== Deleting host items with linked analytical records ==
As we have not used database tables to maintain relationships, we had to use
search to find out if any linked analytical records are present. If 1 or more
analytical are present, we do not allow deletion of items. This is similar to
what we see when we try to delete authority records.
== Importing analytical records ==
Analytical records can be imported using bulkmarcimport or the GUI tools. The
new CLI script can be executed after the import to establish relationships with
host items. The script will establish relationships using the host item's
barcode, the barcode must be present in 773$o of the analytical record.
== What if there are two or more copies of the host item? ==
The current design will require that there be two host (773) fields, one for
each copy.
== What if there is no barcode available for the host item? ==
It is still possible to establish a relationship, by populating 773$9 with the
host's item number. However the CLI script uses barcode in 773$o to establish
relationships so it won't work where barcodes are unavailable. Also from an
analytical record, it is possible to establish a relationship to a host item by
providing the barcode as input, this option will not be available as well.
Commits that added the following features were squashed by Chris Cormack (this
is not a list of every commit):
* Display links to host records from biblio detail screens
* Support for UNIMARC, respecting the system preference 'marcflavor'
* Support holds from the OPAC
* Ability to link to items belong to host records from a analytical record
* Display items belonging to host records in the moredetail page
* Ability to edit items belonging to host records, also ability to delink from
them
* Move get host items code into a C4 routine, also calling the new routine in
related perl scripts
* Move host field population to a C4 routine, all changes in pl files to call
new routine
* Allow only specific copy holds for analytical records plus changes to use new
C4 routines
* Support for holds on items linked via host records
* Storing bibnumber and itemnumber in subfields 0 and 9, plus other mapping
changes
* New command line script that establishes relationships between analytical
records and host items and bibs. The script looks for host field (MARC21 773)
in records, and based on barcode in subfield 'o' populates host bibnumber in
subfield '0' and host itemnumber in subfield '9'. The script can be run after
an import of analytical records, it can also be run in the crontab to maintain
the relationships
* Ability to create analytical records from items, to view linked analytics, and
prevent deletion of items that have linked analytics
* New template for catalogue/detail.pl (NOTE: not a new template file, just a
new way of displaying analytics), template displays linked analytics and
allows creation of analytical records
* New zebra index for item number in host fields. This index will be used to
display links to analytical records from host records
* Display title of host record instead of the phrase host record
* Using detail.tmpl for analytics tab instead of a new template file
* Improved qualification info prepration in Prephostmarcfield
* Check for linked analytics before deleting item
* Display link to host record and more meaningful anchor text for edit item link
* Analytical record: Unimarc index in record.abs and help in
create_analytical_rel.pl
* Adding a sys pref that controls display of options to create analytical
relationships
* Add host entry in XSLT stylesheet in staff item detail
* Added host record support to OPAC detail XSLT
* Adding 773$0 and 773$9 to all frameworks
* Adding 773 subfields 0 and 9 to default marc framework via updatedatabase.pl
* Display create analytics and used in links in catalog detail
* Fixed problem where analytical records not showing in OPAC search results
because GetMarcBiblio now needs a flag to add item records
* Fixed problem where analytics count was set to 1 for all records, not just
those with analytics
* Fixed catalogue detail page not to show analytics counts if count is 0
Conflicts:
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
kohaversion.pl
Co-author: Savitra Sirohi <savitra.sirohi@osslabs.biz>
Co-author: Zeno Tajoli <tajoli@cilea.it>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Do not misleadingly document or pass an unused second parameter
makes all calls use the single parameter call as the C4
routines already did
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
This patch adds the ability to specify a field with alternate holdings
information for display when a biblio has no items associated with it.
Two sysprefs are added:
* AlternateHoldingsField specifies what field/subfields contain the alternate
holdings information. When blank, the alternate holdings information is not
displayed. The default is blank, as this is a new feature.
* AlternateHoldingsSeparator specifies the string to be used to separate
multiple subfields in the alternate holdings display. The default is ' '.
Example use case:
A library which does not have a 1-1 relationship between uncontrolled 852 fields
from a legacy system and actual physical items on the shelf wishes to display
holdings information from the 852, but does not want to create item records
which are almost certain to be inaccurate. By enabling the alternate holdings
feature (AlternateHoldingsField = '852abcdhi' and AlternateHoldingsSeparator =
' -- '), the library is able to gradually add item records as they locate the
physical items, without losing the holdings information presently stored in the
uncontrolled 852 fields.
To test:
1) Set AlternateHoldingsField to '852abcdhi'
2) Set AlternateHoldingsSeparator to ' -- '
3) Change the hidden value of subfields 'a', 'b', 'c', 'd', 'h', and/or 'i' of
field 852 to 0 so that they display
4) Create a record which has data in the 852, but no item record
5) Look at holdings tab, where the data you entered should be displayed
Proof-of-concept initially developed for the American Numismatic Society.
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Adds a button on patron-related pages, "Search to hold"
Clicking search to hold sets a cookie with the patron's
borrowernumber and sends the user to the search page.
On subsequent search results pages the user will have
the option to place holds specifically for the remembered
patron. This works on the search results page (single
and multiple hold) and on the detail page.
The saved cookie will time out after 10 minutes or
be erased when a new patron is loaded by circulation.pl
New jQuery plugin added: jquery.cookie.min.js
Revision fixes some markup and corrects an error that would lead
to the hold being initiated for the remembered patron when this
was not intended.
Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Adds a button on patron-related pages, "Search to hold"
Clicking search to hold sets a cookie with the patron's
borrowernumber and sends the user to the search page.
On subsequent search results pages the user will have
the option to place holds specifically for the remembered
patron. This works on the search results page (single
and multiple hold) and on the detail page.
The saved cookie will time out after 10 minutes or
be erased when a new patron is loaded by circulation.pl
New jQuery plugin added: jquery.cookie.min.js
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Fixed by doing a pretty dumb copy of GetMarcNotes. Functional,
but it could be there is a more efficient way to do it given
we want one repeating tag rather than a range of tags?
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- fixed small typo in opac-detail
- corrected isbd punctuation in opac-detail
- tested with 0, 1, 2, 3 isbns in 020, MARC21
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Revised version of Liz Rea's fix adding homebranch by default. This
revision displays the homebranch name instead of branchcode.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Showing "on hold" in the holdings list (as we used to do) is misleading
if it is a bibilo-level hold. However seeing that a title has holds
is important information for this view. This patch adds a line to the
biblio-level information display with a count of the title's outstanding
holds.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This fix adds only public notes. A div is added as a hook for styling
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Removing check for "is this a serial record" when displaying enumchron
information. This check evaluates as true for all biblio records which
have a series title, so it's an inaccurate determiner of whether
enumchron information should be displayed. The script already
checks for the presence of enumchron data, so that will display
anyway if it exists.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Turn on the system preference SpineLabelShowPrintOnBibDetails and a link for the spinelabel printer will appear for each item on catalogue/detail.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
- the XSLTParse4Display sub now has a new parameter : the interface (intranet or opac)
- the XSLTdisplay sysprefs is common to staff & opac (Auth.pm)
- added UNIMARC xslt in intranet templates (modified to deal with staff/opac differences)
This patch, is the first use of GetRecordValue, that use the Field mapping.
It retrieve the subtitle in Intranet using it, instead of the use an old function that doesn't work anymore.
This is a way to made koha more generic with each framework.
This patch adds links to all public lists that a bib
record belongs to to the detail page in the OPAC and
the Inranet. If the item is not in any lists nothing
shows on the detail page. The same goes if virtualshelves
is turned OFF.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Squashed commit of the following:
commit e9dd6e1dee03fe3503f7995b57510f9edfe6b333
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Wed Aug 19 08:14:53 2009 +0000
Version number
commit df3ee5473e79b760a91c62b96d7ce19229e0fd27
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Wed Aug 19 08:08:11 2009 +0000
French systempref
commit c4b036e4e43947d7d1fb9f2e18e460788cb4e1ec
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Wed Aug 19 00:25:33 2009 +0000
Code to update the database, and updating the sysprefs.sql
commit f74b942c24d5e9c33a4ec0e5ac706a0e347eb1a7
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Tue Aug 18 02:07:22 2009 +0000
Now hides the name on the detail screen too
commit 53c80dbef88e360a4bbb78ecff3a6ca6ec401398
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Tue Aug 18 01:35:19 2009 +0000
Allowing the librarians to choose to hide the borrowers name on holds
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch adds a link to the OPAC view for a bib
record from the staff client so catalogers can
preview changes as the patrons see them.
This patch only shows the link is the OPACBaseURL
system preference has a value.
[RM note re bug 2152: this is probably enough to keep
OPACBaseURL after all - the staff interface has
no other way of reliably knowing where the OPAC
is.]
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Coding by Rick Welykochy <rick@praxis.com.au>
[1] Three new system preferences to enable particular
bib record views in the staff interface:
viewMARC
viewLabeledMARC
viewISBD
Implements enhancement 2642.
[2] New button in the regular and cataloging search results
pages in the staff interface to allow the operator to redo
the search against Z39.50 targets instead of the Koha database.
[3] Added copyright date and edition to cataloging and Z39.50 search results.
Implements enhancement 2640.
Feature sponsored by MassCat.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
An Amazon ItemLookup response can sometimes have
more than one Item element, where the ones after
the first appear to be cross references to items
that have the same ISBN. Changed parsing so that
those responses are no longer treated like pseudohashes.
This fixes the following crash:
[error] detail.pl: Pseudo-hashes are deprecated at /catalogue/detail.pl line
213., referer: /cgi-bin/koha/catalogue/detail.pl
Which may lead to a nasty:
[error] Out of memory!, referer: /cgi-bin/koha/catalogue/detail.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch fixes Amazon content use in pro interface :
* Control Amazon Editorial Review by a new syspref:
AmazonReviews.
* /catalogue/detail.tmpl doesn't display Amazon reader reviews.
It displays only Editorial review in Description tab.
This patch disable request for AWS reader reviews.
* Use Amazon TLD for linking book cover to local
Amazon Search Inside.
* Minor clean up on C4::External::Amazon.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch modifies how AWS is called. AWS is now called
depending on syspref. It works completly for OPAC; it
has to be refined for intranet.
For OPAC:
* If OPACAmazonReviews is set, AWS EditorialReview and
Reviews (users) are grabed.
* If OPACAmazonSimilarItems is set, AWS Similarities info
are grabed.
* If nothing is asked, AWS is not called anymore,
sparing server bandwidth.
For intranet:
It works as it used to work. AWS is called if AmazonEnabled
is set whatever how other syspref are set.
TODO:
* Add a AmazonReviews syspref
* Request Amazon content depending on AmazonSimilarities
and AmazonReviews syspref
DOCUMENTATION:
It should be explained that Amazon services related syspref
have two levels:
* AmazonEnable / OPACAmazonEnable
* Other: OPACAmazonReviews (new), OPACAmazonSimilarProduct,
OPACAmazonCover
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
If Amazon doesn't have an avg. rating number defined, then we cannot multiply it
by 20 without the following warning:
detail.pl: Use of uninitialized value in multiplication (*)
at /home/user/kohaclone/catalogue/detail.pl line 228.
So the important part of this patch is || 0 on the $average_rating assignment.
[RM note: applying for whitespace cleanup]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
* Use of uninitialized value in pattern match (m//) at C4/Biblio.pm line 1305
(displaying MARC21 856s that don't have $3)
* Use of uninitialized value in multiplication (*) at catalogue/detail.pl line 243.
(attemping to calculate average Amazon rating if no Amazon info
is available)
* opac-detail.pl: Use of uninitialized value in length at C4/External/Amazon.pm line 90
(attempting to calculate length of $isbn if it happens to be undef)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Allows specification of how many issues of a subscription to display
at a global and subscription-specific level. Also adds a link to the
detail page to a specific subscription.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch resolves a number of problems related to Enhanced Content:
1. Previously, there was no syspref for controlling whether or not to display
Amazon.com cover images apart from other content. This had the side effect
of preventing use of amazon.com content alongside use of another provider's
images. This patch introduces AmazonCoverImages and OPACAmazonCoverImages,
and changes the name of AmazonContent to AmazonEnabled.
So, for instance, you can now enable OPACAmazonSimilarItems yet utilize
SyndeticsCoverImages for displaying those similar items.
NOTE TO DOCUMENTATION TEAM: please update references to AmazonContent
and OPACAmazonContent to comply with the above.
2. Fixes some semantically incorrect uses of AmazonContent (now OPACAmazonEnabled)
on the OPAC side.
3. Resolves once and for all, the normalization of ISBN,UPC,EAN and OCLC numbers
for all enhanced content elements; These elements can be normalized using the
new functions in C4::Koha; I've replaced use of the various previously used
variables $xisbn,$norm_isbn,$clean_isbn, etc with $isbn, and the template
variable normalized_isbn.
We finally have a single, consistant place to retrieve normalize values for
these fields given a particular record.
4. Adds Syndetics attribution statements to display of all Syndetics content
'enhanced content provide by Syndetics' or 'Enhanced Description from Syndetics'
5. Adds an option to view the large cover image on the detail page on the OPAC
when using SyndeticsCoverImages; this option is controlled by a new system
preference: SyndeticsCoverImageSize which has two values: MC (medium) LC (large)
6. Adds UPC and OCLC numbers for Syndetics enhanced content queries especially
helpful for finding enhanced content for DVD and Music materials
7. Adds capability to display Syndetics images to opac-user for checkouts and overdues
8. Updates to systempreferences.sql, and updatedatabase.pl database revision 015
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
despite the same values being supplied each time. Then
the conditional assignments would repeat the same calls again!
That means execution was liable to query the DB at least once
and as many as four times per item. With a large number of items
this is an unnecessary burden. By moving the calls outside
the loop, we can guarantee that we never have to call the DB for
that info more than twice (once for lost, once for damaged).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
By adding support for UPC,EAN and 13-digit ISBN we are able to pull much more content from Amazon, especially on most music and dvd content which
does not have an ISBN.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Most Perl scripts (as opposed to modules) do
not need to require Exporter.
No user-visible or documentation changes.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds a new function, getitemtypeimagelocation, that returns the image
unmodified for absolute urls and returns the proper intranet or opac path
otherwise. It also updates all of the relevant files to use that function.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This change helps the staff side catch up w/ the OPAC display and be
more useful to librarians dealing with serials.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When displaying details of bib in staff interface, check
that bib actually exists and display 404 page if not. Avoids
following fatal error:
Can't call method "field" on an undefined value at /home/gmc/koha/dev/C4/Biblio.pm line 944.
This situtation can arise when running Zebra; if a bib is deleted,
Zebra will not necessarily be reindexed instantly, allowing a link
from a search result list to point to a missing record.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Including the subtitle in search results and OPAC and staff
details templates. The subtitle is expected to be in the
MARC subfield that is mapped to the (now nonexistant) column
bibliosubtitle.subtitle.
This is a fairly hackish patch that is meant to be minimally
disruptive while allowing subtitles to be displayed for those
not using the experimental XSLT bib display feature. It
does *not* cover all cases where you have a MARC
record and want to display its subtitle.
UNIMARC notes: at the moment, none of the fr-FR UNIMARC
frameworks appear to be map any subfields to bibliosubtitle.subtitle.
This could be changed, but caveat programmer: the UNIMARC 200$e
is repeatable (meaning that get_koha_field_from_marc will put in ' | '
between multiple subtitles) and one may want to also include the
200$d (parallel title). A GetMarcSubtitle routine may be in order
if absolutely necessary.
This points to a long-term need to make display of MARC (and later, hopefully,
non-MARC) bib records more flexible - the XSLT feature is one approach;
there may be others.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
As announced this past February, Amazon.com will no longer be
accepting web services requests to Amazon E-Commerce Service
(Amazon ECS) version 3.0 beginning on March 31, 2008.
This patch upgrades to Amazon.com's Associates Web Service 4.0
for the following components:
1. Amazon.com Locale support for: Canada, Germany, France, Japan,
UK, and US (see the new syspref called AmazonLocale)
2. Jacket Covers
3. Editorial Reviews
4. Customer Reviews
5. Amazon.com Similar Items
The following changes MUST be made to continue using Amazon.com
content:
1. Delete the system preference: AmazonDevKey (AmazonDevKeys used
with AmazonECS 3.0 are no longer valid)
2. Add the system preferences: AmazonLocale, AWSAccessKeyID
NOTE: steps 1, 2 are done by the web installer
3. Verify your AWSAccessKeyID:
You may already have an Access Key ID. You can access your Access
Key ID by going to http://aws.amazon.com, pointing to Your Web
Services Account, then clicking View Access Key Identifiers.
Depending on when you signed up for ECS 3.0, you may need to
re-register for an AWS account, which includes an Access Key ID.
4. Enter your AWSAccessKeyID in the Koha syspref called
AWSAccessKeyID
For complete details on the changes in Amazon.com Associates Web
Service 4.0, and the migration process, please see: http://tinyurl.com/ysorqy
Other changes with this patch:
* added $tabsysprefs{PatronsPerPage}="Patrons";
* Moved OPAC Features to OPAC in sysprefs
* removed experimental OPACXISBNAmazonSimilarItems and XISBNAmazonSimilarItems features
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:
* borrowernumber and biblionumber in old_reserves can be
NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
set the child column to NULL if the parent row is deleted
instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
a branch to be deleted without changing archived requests.
Some miscellaneous cleanup was done as part of this patch:
* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Moved following functions from C4::Biblio to
C4::Items:
GetItemStatus
GetItemLocation
GetLostItems
GetItemsForInventory
GetItemsCount
GetItemInfosOf
GetItemsByBiblioitemnumber
GetItemsInfo
get_itemnumbers_of
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
670 is primarily about the status of a biblio or item that's got a
hold on it ... specifically the 'in transit' and 'waiting' status.
It applies to the following pages.
* request.pl - tested
* detail.pl - tested
* circulation.pl - tested
* moremember.pl - tested
* opac-user.pl - doesn't show transit status, but only shows waiting
when item has arrived at the pickup library
* opac-detail.pl - doesn't show hold statuses
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Major bugfixes:
* Circulation status in moredetail.pl now correctly displays On loan
status and Date due
* Bugfixes on Status column in detail.pl
* Removed hard-coded English strings from status column in detail.pl
* Added missing auth values for lost and damaged statuses, sane
defaults if those auth
values don't exist
* Added missing 'On hold' status and 'Hold waiting' status
display
Medium bugfixes:
* Now correctly shows itemtype at level specified in systempreference
* Uses itemtypeimage for display, image title is full itemtype
description
* Fixed Location column concatenation between branchname location and
itemcallnumber
* broke out Location (branch), Collection (items.location)
Call Number (itemcallnumber) into their own columns
* Added auth value display for items.location
Minor fixes:
* detail.pl didn't show dates correctly
* nomenclature s/Checked out/On loan/ in opac-detail.tmpl
* s/Book/Item/ in my $desc="Item Returned
".$iteminfo->{'barcode'}; in Circulation.pm
* request.tmpl: s/date_due/onloan/ to display date due
* Fixed SimilarItems, XISBNSimilarItems
NOTE: Needs to be ported to OPAC
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.