Commit graph

447 commits

Author SHA1 Message Date
a1e9e3d8d9 Bug 9292 - Remove dead code related to 'publictype'
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>
2013-01-13 08:38:47 -05:00
Jonathan Druart
4dbcd077f6 Bug 8377: Followup move style in a css file and do not pass template to a pm
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>
2012-12-27 09:28:00 -05:00
Mirko Tietgen
33aa6ec2fd Bug 8377 [ENH] Show HTML5 video/ audio for media files in OPAC and staff client
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>
2012-12-27 09:28:00 -05:00
63ec7a4fce Bug 7674 - Followup - Add missing right-hand curly bracket
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>
2012-12-17 09:41:20 -05:00
Julian Maurice
b39c762dde Bug 7674: Add 2 sysprefs to indicate the branch we want to separate on
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>
2012-12-17 09:41:16 -05:00
Paul Poulain
5a14940f80 Bug 7674: Separate items in two tabs on biblio detail page (staff+opac)
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>
2012-12-17 09:41:04 -05:00
df7e36e8fb Bug 8893 - show more information on printout
My proposed solution eliminates the special print view
page altogether and has the Print button trigger the
browser's print function. I've tweaked the print stylesheet
to improve the output.

Normally I don't think print buttons in the interface
are necessary, since a user could be expected to be able
to print the page using browser controls. But I think it's
best not to remove the button when people are used to seeing
it.

The behavior people will find now is different when clicking
the button from different catalogue pages. A user on the MARC
detail page, instead of getting the generic print view will
get a print of the page they're on. Overall I think this
is more in line with what a user would expect.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-03 06:31:05 -05:00
Jonathan Druart
c39380ed4e Bug 8782: Close a subscription
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>
2012-11-30 08:14:24 -05:00
Mathieu Saby
8718629c5c Bug 8954: Make languages list in advanced search translatable (revision 1)
In opac-search.pl and search.pl, this patch moves the $lang variable from the end to the begining of the script, and use it as a parameter for getAllLanguages.
In Languages.pm, getAllLanguages function is modified :
- if no parameter is passed to the function, it returns english languages names
- if a $lang parameter conforming to RFC4646 syntax is passed :
-- the function returns languages names translated in $lang if possible
-- if a language name is not translated in $lang in database, the function returns english language name
To test, set your opac and staff interface in english and in other languages and check search.pl and opac-search.pl :
- If language names in your languages_description table are translated in the same language you use for your GUI, the language names in dropdown list will be translated in this language (+native name).
- If your GUI is in english, or in a language into whitch languages names are not translated in languages_description, the dropdown list will stay in english (+native name).

Signed-off-by: Marc Veron <veron@veron.ch>

Patch behaves as expected.

With Opac language set to French I got all languages with French language name.
With German (de-DE), I got only a few with German language names (and all other with English ones),
this was due to missing entries for de-DE in table language_descriptions.
This behaviour is consistent with the description above.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Tested language list in OPAC and staff advanced search is translated
properly after applying the patch. Checked that language switcher still
works like it should.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Fixed typo in POD.
2012-11-20 14:39:56 -05:00
ff38060039 Bug 8872: Changes for intranet showmarc
Simplifies template (eliminating intranet-bottom include).
Makes encoding for card view more consistent with approach in Templates module.
Rearranges a few lines in script for consistency and performance.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Passed-QA-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-06 07:29:07 -05:00
Mark Tompsett
b8f4b1fa14 Bug 8175 - check logs error or displays incorrectly in details.pl
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>
2012-10-12 21:25:45 +02:00
63145eb3d2 Bug 8718 - Normal catalogue detail view in staff client doesn't show missing serials or subscription history note
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>
2012-10-12 16:35:58 +02:00
Fridolyn SOMERS
f941dc341a Bug 8481: Items table is showing in opac-MARCdetail.pl but not in MARCdetail.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-05 17:40:22 +02:00
Julian Maurice
bf803c521f Bug 5339: Invoices management improvement
- New pages:
  - invoices.pl: allow to search in invoices on several criteria
  - invoice.pl: permit to view and modify invoice details
    - shipment date
    - billing date
    - shipment cost and budget used for shipment cost

Invoice informations are now stored in their own sql table and aqorders
have a link to it

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-09-18 22:42:15 +02:00
Jonathan Druart
82dc7b55a8 Bug 4321: clean C4::Biblio::GetBiblio and uses
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-18 12:11:54 +02:00
Fridolyn SOMERS
1291734a0a Bug 8709: Subfield 0 does not show in MARC detail in intranet
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-18 11:36:07 +02:00
a51aa4f546 Bug 8717 - Wrong subscription notes are showing in catalogue detail view of serials in staff client
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>
2012-09-18 11:35:02 +02:00
Jonathan Druart
0048c94b32 Bug 4491: fix weird code in search scripts
This change some code a bit strange, that generate strange effetcs.
Now we use $cgi->param to get the values.

Test: search at the opac and intranet using limit, etc.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-09-17 18:19:48 +02:00
Jared Camins-Esakov
33113e69c0 Bug 8622: Fix theme fallback
This patch does the following:
1) Enables fallback for includes between different themes and different
   languages (with the exact same precedence as for .tt files)
2) Enable fallback for XSLT files between different themes and different
   languages (again, same precedence)
3) Change the semantics of the TT [% themelang %] variable so that it always
   refers to the preferred theme and language, rather than the fallback
   theme/language. As a result, all themes must include all javascript,
   css and image resources they use.

Note that these changes actually have no impact whatsoever on an
installation where the default (prog) themes are in use.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-05 11:39:14 +02:00
ff7417fa91 Bug 8679 [REVISED] Remove usage of Amazon API
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>
2012-08-29 16:05:29 +02:00
Jared Camins-Esakov
4afe8b00a1 Bug 8255: allow local cover images to be cached
At the moment, local cover images cannot be cached by the web browser
or any intermediate reverse proxies. This results in an unnecessary
load on the server, and is entirely unnecessary.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-25 18:12:29 +02:00
Adrien Saurat
b9f6122ec6 Bug 7379: display of copy number description (AV)
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>
2012-06-25 16:34:44 +02:00
Meenakshi.R
8bd8aba577 Bug 4255 - Add item type to facet list
This is for MARC 21 only.

Made following changed:

- In getFacets in C4/Koha.pm added item type facet for 952y and 942c
- In getRecords in C4:Search.pm added code to get description of itemtype codes
- facets.inc in both staff and opac to show item types related label in the facets block

To test:

Add records such that a certain itype (say BK) is present in both 942c and 952y in two DIFFERENT records.

Run a search where both test records are present. Test to see if itype types are presented in the facets block (both OPAC and staff).

Click on the itype (say BK), both the test records should appear in the refined results. This shows that the feature works for both 942c and 952y.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Ian Walls <koha.sekjal@gmail.com>

QA Comment: fixed capitalization in template includes according to HTML4 coding
guideline ("Item types" instead of "ItemTypes")

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 22:27:21 +02:00
Matthias Meusburger
7f957077dd Bug 5337: EAN management : Adds ean for various searches
- 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.
2012-06-09 18:26:34 +02:00
Julian Maurice
2338d02e9e Bug 7175: Allow to choose which items to receive
If AcqCreateItem=ordering, when you receive an order, you now have a
list of all created items and checkboxes that permit you to choose which
items you want to receive.
A 'Edit' link open additem.pl page in a popup to allow you edit the
items before receiving them (popup is automatically closed after
modification, and items table is automatically updated)
If quantity is set manually in the text box, the appropriate number of
checkbox are checked from top to bottom and a warning shows up if
quantity is greater than order quantity

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-21 17:46:07 +02:00
Katrin Fischer
36b7239f40 Bug 7733 - HidePatronName not working on moredetail
Patch implements HidePatronName system preference for 'Checkout status'
on moredetail (tab items from staff detail page).

Also adds some new 'if' statements, so 'Serial enumeration' and 'Paid for?' are
only shown when they are not empty.

Silences warns in the logs.

To test:
- Toggle system preference for an issued item and check name/cardnumber
are displayed correctly.
- Check serial enumeration and Paid for? show when not empty.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-19 11:05:09 +02:00
Stéphane Delaune
df0a6a71d7 Bug 4032 XSLT systempreference takes a path to file rather than YesNo
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
2012-03-29 16:58:55 +02:00
Chris Cormack
0c40ff9f98 Merge remote-tracking branch 'kc/master' into merged_5549
Fixed conflicts

Conflicts:
	catalogue/moredetail.pl
	installer/data/mysql/updatedatabase.pl
	koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2012-03-22 09:36:55 +13:00
c4d21bcbfe Bug 7310: Code changes for Improving list permissions
This lays the foundation for further changes for report 7310.
Implements following points from the wiki page List permissions:
1) Preference that controls if users may create public lists in opac.
2) New add/delete own/delete other permissions per list.

Code has been changed (in some cases refactored). New permissions are not yet visible; with this patch current functionality is kept as much as possible while resolving several issues, improving permissions and extending the code for further developments (using the new permissions and sharing lists).

Feb 23, 2012 (revision): Changed defaults for new lists. Could also remove routine GetRecentShelves by using GetSomeShelfNames in catalogue/search.pl just as opac-search.pl already did. (More consistent.)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Feb 29, 2012: Automerge version.
March 5, 2012: Rebase for pushed 4912 patch.
March 21, 2012: Rebased. Resolving some conflicts in relation to pushed report 7719.
2012-03-21 16:46:40 +01:00
Jared Camins-Esakov
d7fe2f24db Bug 7600: Return a single-pixel GIF when no local cover image exists
Signed-off-by: Kristina D.C. Hoeppner <kristina@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-20 16:54:31 +01:00
Katrin Fischer
f371b749af Bug 7235: Add order date and checks for permissions
- Adds order date above vendor
- Reordered fields to reflect history of the item
- Order information (order date, vendor) is only shown, when an order exists
- Accession date is only linked, when item was received in acquisition
- Links to basket and invoice are only shown when user has the correct permission
  - order date: manage_order
  - accession date: receive_shipment for invoice
- Changes all dates to use the KohaDates TT plugin
- Corrects display of rental price, removing additional zeros

To test:
1) Create a record with
- 1 item created in cataloguing
- 1 item ordered
- 1 item ordered and received
- 1 item checked out
2) Verify the correct information is shown for each
3) Verify links on the dates work correctly
4) Toggle permissions for the user

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Followed the test plan and all tests pass.

Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>

changed supplierid to booksellerid

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-20 16:11:44 +01:00
Srdjan Jankovic
dcca450944 Bug 7235: Adding invoice number and vendor name to the moredetail page
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2012-03-20 16:11:41 +01:00
Colin Campbell
4913d3a1d7 Bug 5549 : Fix a couple of date issues from testing 2012-03-20 13:22:12 +13:00
Colin Campbell
d63691d3f1 Bug 5549: Formatting duedates in catalogue scripts 2012-03-20 12:35:57 +13:00
Robin Sheat
4cbeeedbe8 Bug 6296: allow users to be authenticated by SSL client certs
This adds a new syspref: AllowPKIAuth. It can have one of three states:
* None
* Common Name
* emailAddress

If a) this is set to something that's not "None", and b) the webserver
is passing SSL client cert details on to Koha, then the relevant field
in the user's certificate will be matched up against the field in the
database and they will be automatically logged in. This is used as a
secure form of single sign-on in some organisations.

The "Common Name" field is matched up against the userid, while
"emailAddress" is matched against the primary email.

This is an example of what might go in the Apache configuration for the
virtual host:

    #SSLVerifyClient require # only allow PKI authentication
    SSLVerifyClient optional
    SSLVerifyDepth 2
    SSLCACertificateFile /etc/apache2/ssl/test/ca.crt
    SSLOptions +StdEnvVars

The last line ensures that the required details are
passed to Koha.

To test the PKI authentication, use the following curl command:
    curl -k --cert client.crt --key client.key  https://URL/
(look through the output to find the "Welcome," line to indicate that a user
has been authenticated or the "Log in to Your Account" to indicate that a
user has not been authenticated)

To create the certificates needed for the above command, the following series
of commands will work:
    # Create the CA Key and Certificate for signing Client Certs
    openssl genrsa -des3 -out ca.key 4096
    openssl req -new -x509 -days 365 -key ca.key -out ca.crt
    # This is the ca.crt file that the Apache config needs to know about,
    # so put the file at /etc/apache2/ssl/test/ca.crt

    # Create the Server Key, CSR, and Certificate
    openssl genrsa -des3 -out server.key 1024
    openssl req -new -key server.key -out server.csr

    # We're self signing our own server cert here.  This is a no-no in
    # production.
    openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key \
        -set_serial 01 -out server.crt

    # Create the Client Key and CSR
    openssl genrsa -des3 -out client.key 1024
    openssl req -new -key client.key -out client.csr

    # Sign the client certificate with our CA cert. Unlike signing our own
    # server cert, this is what we want to do.
    openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key \
        -set_serial 02 -out client.crt
    openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12
    # In theory we can install this client.p12 file in Firefox or Chrome, but
    # the exact steps for doing so are unclear, and outside the scope of this
    # patch

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested with Common Name and E-mail authentication, as well as with PKI
authentication disabled. Regular logins continue to work in all cases when
SSL authentication is set to optional on the server.

Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
QA comment: synchronized updatedatabase.pl version of syspref with sysprefs.sql
version, to avoid divergent databases between new and upgrading users.
2012-03-19 17:02:44 +01:00
52848003e3 7031 Followup: typo
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2012-03-14 14:35:30 +01:00
ae737fcde6 Bug 7031 Follow-up: Staff search displays OPAC description instead of the normal description for the authorized values
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-03-14 14:35:29 +01:00
Ian Walls
c04404c2fb Enh 7031: More options for Advanced Search
Adds the ability to perform advanced searches in both the OPAC and staff client on more than
a single AdvancedSearchType at a time.  Support included for Itemtype, Collection Code and Shelving Location.

AdvancedSearchTypes syspref preference is repurposed; no longer a single value, it can now take
multiple item code fields separated by "|".  The order of these fields will determine the order
of the tabs in the OPAC and staff client advanced search screens.  Values within the search type
are OR'ed together, while each different search type is AND'ed together in the query limits.  The
current stored values are supported without any required modification.

Each set of advanced search fields are displayed in tabs in both the OPAC and staff client.  The
first value in the AdvancedSearchTypes syspref is the selected tab; if no values are present, "itemtypes"
is used.  For non-itemtype values, the value in AdvancedSearchTypes must match the Authorised Value name, and
must be indexed with 'mc-' prefixing that name.

<li> elements in tab are assigned unique IDs, so the text of the tab can be altered to match the
library's needs (using JQuery)

The logic to handle the 5 element row limit has been moved from the Perl to the templates, since Template::Toolkit
has a simple method for extracting the count of an element in a loop and performing 'modulus' on it.

2011-12-21: Incorporated changes recommend by Owen Leonard on bug report.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-03-14 14:35:27 +01:00
Jared Camins-Esakov
6378436089 Bug 7345: Enable exporting records sans private fields
Add an option for marcstd to the opac-export.pl and catalogue/export.pl
scripts. This new format removes all 9XX, X9X, XX9 fields and subfield $9
(with the exception of 490 in flavours of MARC other than UNIMARC). The work is
done in C4::Record::marc2marc.

This patch adds the new export option 'marcstd' for exporting MARC
records without 9xx, x9x and xx9 fields and subfields to the staff
detail page.

Testing plan:
1. Export a record in "MARC (Unicode/UTF-8)" format as a control
2. In the OPAC, run the following jQuery to add the marcstd option to the UI:
> $("#export #format").append("<option value='marcstd'>MARC (no 9xx)</option>");
3. Export the same record in "MARC (no 9xx)" format
4. Compare the two, noticing that any subfield $9 or fields including 9 (other
   than 490 in flavours of MARC other than UNIMARC) have been removed

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised now.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch squashes both the original patch and Katrin's follow-up adding
marcstd as an export option on the staff client.

Feb 13, 2012 (marcel): Amended this patch to resolved two definitions of $error in catalogue/export script.
2012-02-13 11:32:18 +01:00
a526f2936e Bug 6933 [REVISED] Add a view of titles with a particular tag to the staff client
- 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>
2012-02-02 09:46:01 +01:00
Srdjan Jankovic
706712dd1e bug_6488: Take in account opachiddenitems when searching in opac
Changed searchResults() interface
Added trailing \n when parsing OpacHiddenItems to make YAML happy
XSLTParse4Display() and buildKohaItemsNamespace() take hidden
items as input param
Removed numbering from the search results, looks wrong with
hidden items

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-01 16:00:20 +01:00
Jared Camins-Esakov
587e2e920e Bug 1633: QA follow-up
* Show the "Upload images" button when OPACLocalCoverImages is enabled but
LocalCoverImages (i.e. local cover images on the staff client) is not
* Correct copyright and license comments in new files
* perltidy and replace tabs by four spaces

Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-24 11:16:10 +01:00
e901c4f24c Bug 1633 - Interface revisions for the staff client
This patch revises the image viewer page to match other
biblio detail pages: a toolbar, a sidebar menu, etc.

Additional data is now pulled by imageviewer.pl in order
to provide information necessary for the proper functioning
of the toolbar and menus: item counts, hold availability,
biblio view options.

Other changes have been made to match the changes in the
OPAC interface like styling of the images and no-javascript
compatibility

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>

Patch failed to apply because of multiple Content-Type lines in the patch.
Corrected the same with this new patch.

http://bugs.koha-community.org/show_bug.cgi?id=6473
2012-01-24 11:16:09 +01:00
Jared Camins-Esakov
57288e020d Bug 1633: [SIGNED-OFF] Don't show image tab when inappropriate
This patch corrects the bug spotted by Owen Leonard where the Images tab was
showing up even for records that didn't have local cover images attached to
them. The tab is now hidden on the OPAC for records that don't have any
images. In the Intranet, an Images tab will show for staff with permission
to upload images, suggesting that they do so. For staff without that
permission, the tab is not shown.

This permission also disables returning images via the opac-image.pl and
catalogue/image.pl scripts when local cover images have been disabled.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
2012-01-24 11:16:07 +01:00
Koustubha Kale
585a0024a1 Bug 1633: [SIGNED-OFF] Display local cover images
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.
2012-01-24 11:16:04 +01:00
Ian Walls
5fde469429 Bug 7097: HidePatronName not hiding on issue history
HidePatronName wasn't being respected on a titles Checkout History tab.  This patch
exports the preference to the template (if set), and then toggles the display between
patron cardnumber (if 'on') or the name (if 'off')

To test:

Enable HidePatronName
Go to the Checkout History tab of an item that has been checked out before
You should see the patron's cardnumber instead of their surname, firstname

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-17 18:02:00 +01:00
Chris Cormack
67c6c95396 Bug 7728 : Materials Specified field made larger and displayed
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
2012-01-10 22:41:48 +01:00
Adrien Saurat
74506e52de Bug 6374: default value for Size in result pages
When no size info is available, an empty string is
sent to the TT (if nothing is sent, the TT engine
will display another information, irrelevant for Koha).

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Works beautifully!

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-06 16:01:48 +01:00
1730e180cd Bug 7328 Expanded options in advanced search
In OPAC and intra advanced search, more search options are displayed
depending on expandedSearchOption syspres and user choice. This doesn't
work anymore in HEAD.

This patch restore this functionnality.

To test:

  - enable/disable expandedSearchOption.
  - Load advanced search page. Limited seach options version is always
    displayed
  - Apply this patch and see how it works...

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The problem only appeared in the staff client for me.
Tested both OPAC and staff with patch applied.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-30 12:00:51 +01:00
Paul Poulain
c96a52a4a0 Bug 5729 - Add CoinS to intranet
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>
2011-12-27 18:37:20 +01:00
Frère Sébastien Marie
0ad7e76cb7 Bug 7282 - invalid language selection
- ensure that without cookie, language selection is based on browser
  preferences
- refactor function to obtain langugage for stem in search (opac + intranet)

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

To reproduce the bug:

- Activate en and fr-FR for OPAC
- Clear your browser cookies
- Select your language preference in your browser: fr, fr-fr, en
- Load OPAC main page
- OPAC is displayed in English, rather than French as asked by browser
  preferences

  Apply the patch and test:

  - Clear your browser cookies
  - Load OPAC main page
  - Pages are displayed in French

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-16 14:20:11 +01:00
e65dc43af7 Fix for Bug 7121 - remove comma on items info
Because I can't just take out one comma, I reworked
the way moredetail.pl fetches and outputs biblio
data based on the way it does in detail.pl. This
allows for simpler output in the template.  In the
process I've added subtitle information to the
template.

Revision adds line break for readability

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-13 17:16:10 +01:00
Paul Poulain
b9d743a928 Merge remote-tracking branch 'origin/master' into new/bug_6679
Conflicts:
	catalogue/showmarc.pl
2011-12-08 10:08:44 +01:00
Chris Cormack
4a14e7dbe6 Bug 6679: catalogue/ now passing perl critic tests
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-08 10:05:48 +01:00
2177562ecf Bug 3385 - Add checkout date and renewal date to display list of checked out items
This patch doesn't fix the origial request to add the renewal date
to the list of checked out items, but follows the other bug commenter's
suggestion that the information be added to the item details page
(moredetail.pl).

The other part of this request, to add the checkout date, has already
been fixed by another patch.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 19:22:01 +01:00
Paul Poulain
7267ea91ac Merge remote-tracking branch 'origin/new/bug_5211' 2011-12-06 11:36:57 +01:00
Srdjan Jankovic
1713133fdd bug_5211: LostItem() - added charge_fee param to control fee charging
Pass charge_fee = yes wherever is LostItem() called, which effectively
means tha there's no change.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:36:34 +01:00
Ian Walls
c70ff88205 Bug 2616: Remove unnecessary 'use HTML::Template' calls
Removes deprecated calls to HTML::Template or HTML::Template::Pro from:
C4/Output.pm
catalogue/export.pl
reports/issues_by_borrower_category.plugin
reports/itemtypes.plugin

Only remaining calls are in misc/cronjobs/rss/rss.pl, misc/cronjobs/smsoverdues.pl,
and t/test_template.pl.  These scripts still legitimately depend on H:T:P

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:34:05 +01:00
Robin Sheat
e7251f73a2 Bug 6916 - item's acq date now takes you to its invoice
When viewing an item's details, selecting the accession date for it now
takes you to the invoice for that item.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as advertised.
1) Order and receive an item in acquisition
2) Search for it in staff and go to the 'items' tab
3) Click on the 'receive date' link

Fixed conflict in moredetail.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
QA. This patch does only work when AcqCreateItem==placing an order. This is caused by an existing bug. See Bugzilla for more details.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-17 17:05:17 +01:00
Chris Cormack
d50de1f040 Bug 6972 : Followup fixing bad indentation 2011-10-20 01:52:52 +13:00
Maxime Pelletier
030fe0570f Bug 6972: Hardcoded template paths to en in showmarc
Couldn't help but reformat the indentation a bit.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Card view works correctly in cataloguing search.
Plain view/labelled show correctly in OPAC.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Fixing merge conflict.
2011-10-20 01:48:52 +13:00
Chris Cormack
16f1fffdd1 Merge remote-tracking branch 'kc/new/bug_5616' into kcmaster 2011-10-19 16:45:41 +13:00
980d8fbed4 Bug 5616: UTF-8 problem in Card View / Follow up
Decode data only if needed.
Add instruction to use UTF8 in html header.
Force utf8 on output handle.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Umlauts and other diacritics in card view of z39.50 search are now
correctly displayed.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
  removed 2 commented lines

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-19 16:45:17 +13:00
Srdjan Jankovic
4770555855 bug_5533: Slightly improved marking items as lost
Call LostItem() whenever item is lost.
LostItem() new arg - mark returned.
Disabled Lost Status on catalogue item edit.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

For follow up we need to explain how to hide the 952$1 (lost) from
the framework by putting it in the 'ignore' tab.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-18 09:01:39 +13:00
Paul Poulain
37902b25a7 Bug 6840 warning in logs
In staff interface, in search (catalogue/search.pl), there is a warning saying:
[Fri Sep  2 18:20:24 2011] search.pl: Use of uninitialized value $key in hash
element at /home/paul/koha.dev/koha-community/C4/Templates.pm line 227.

The problem happens when searching from the quick search toolbar, not when you
search from advanced search.
Investigating, it seems it's because the sort_by is not defined in this case.

This patch
* fixes the problem in Search.pl by setting the parameter only if there is a sort_by field
* modify te Template->param sub to get a better error message. Instead of having just "use of uninitia..." get the value you try to set to an empty key. Much easier to understand which line causes the problem

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-13 16:17:33 +13:00
Jared Camins-Esakov
f09e2ca27e Bug 5528: Analytic records support
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>
2011-10-13 10:03:39 +13:00
6b8be20497 Bug 6755 Problems with switching languages
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.

It fixes also a bug related to language preselection based on web
browser prefered language.

September 9: Adjusted with input of Frederic Demians.

Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:47:09 +12:00
Chris Cormack
5a2fc683d8 Bug 6656 : Fix for advanced search not respecting default sort order
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-01 21:06:12 +12:00
Liz Rea
7ad49e0cae Bug 6641 -- Specially crafted URL can allow unauthorized download of MARC files from staff client
Making sure permissions are checked on download of MARC files from staff client

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-01 21:13:11 +12:00
Colin Campbell
129d97df97 Bug 5453: Move declarations from within conditionals in catalogue/search.pl
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:21 +12:00
Magnus Enger
9efdfa1ba2 Bug 6510 - [REVISED] Sort by in intranet search alters search and number of hits
This patch uses .*? instead of .*

To test:
- In advanced search in the intranet choose Author as the search index
- Do a search for an author, check the number of hits
- Choose another value than the default from Sort by
- Check that the number of hits is the same as for the original search, once
  the hits have been re-ordered

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-26 08:23:21 +12:00
Colin Campbell
2ab00242d0 Bug 6050 Make calls to GetItemsInfo consistent
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>
2011-06-14 14:12:02 +12:00
Fridolyn SOMERS
a8f5bf93f9 BUG6091 Remove undeclared syspref OPACAdvSearchInputCount
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-28 19:03:33 +12:00
Chris Cormack
b4d6ad26dc Merge branch 'new/enh/bug_5579' into kcmaster
Conflicts:
	C4/Biblio.pm
2011-04-21 11:48:11 +12:00
36e3bed7b1 Bug 5791 - Robust handling of deleted/non-existent biblios and authority records
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>
2011-04-20 12:03:59 +12:00
Matthias Meusburger
a3ff0bb5cb bug 5579 : Fixes several exports to embed items
- The following export pages used to embed items when exporting,
    this was no longer the case, so they were fixed :
      Intranet :
        - basket/downloadcart.pl,
        - virtualshelves/downloadshelf.pl
        - catalogue/export.pl
      Opac :
        - opac/opac-downloadcart.pl
        - opac/opac-downloadshelf.pl
        - opac/opac-export.pl

  - Notes :
     - GetMarcBiblio used to embed items data, this was no longer the case,
       so an optional parameter was added to choose if items should be embedded or not.
       This way, previous work on this bug is not broken, and this is a pretty usefull
       feature, imho.
     - An optional parameter has been added to SetUTF8Flag, to be able to use NFD during
       normalization. This was required to make Unicode/UTF-8 export work again.

Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:35:15 +12:00
Chris Cormack
1e7c5166aa Merge remote branch 'kc/master' into new/enh/bug_5917 2011-04-08 14:29:21 +12:00
Colin Campbell
0cf2eccfe9 Bug 5529 Absence or Presence of lists not being reliably returned
C4::VirtualShelves::GetRecentShelves contained some rather confused
code The contents of the requested list are returned in an arrayref
which was in its turn being wrapped needlessly in an array
As a result the returned array always consisted of a single element
irrespective of the number of lists.
Made the routine return the arrayref, which can now be tested directly
Unfortunately rather than fixing this we had previously coded around it
assuming it to be a "design" decision. Have amended other calls of
the subroutine resulting in some hopefully less obscure code

Fixed logic error in the results template which displayed new list
within a test for the presence of lists

Removed the offset parameter from the sql in the routine as it was hardcoded
to 0 i.e. the default value

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 10:51:47 +12:00
Chris Cormack
fe331a0209 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/updatedatabase.pl
2011-04-08 07:12:06 +12:00
Henri-Damien LAURENT
700de9664d (Bug 4049) Searching itemtypes returning noise
Fix the problem of searching on partial itemtypes strings
for instance, itemtype="ARTICLE DE PERIODIQUE", itemtype="PERIODIQUE"
searching on itemtype="PERIODIQUE" would also get "ARTICLE DE PERIODIQUE"

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 15:54:00 +12:00
Chris Cormack
eb4ad6e44e Merge remote branch 'kc/master' into new/enh/bug_5917 2011-04-03 22:35:24 +12:00
Jared Camins-Esakov
f1663ada48 Bug 4421: Add alternate holdings display and prefs
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>
2011-04-02 06:56:02 +13:00
ruth@bywatersolutions.com
8548b804f4 Bug 5305: CCL query, then resort, loses reults.
If you did a CCL query, then attempted resort, you would get the advanced-search page,
because of wonky URL escaping of the q= clause.  This patch fixes that.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-31 21:18:29 +13:00
Chris Cormack
a3e59f3bf2 Bug 5917 : FIxing problem with comma in variable names 2011-03-30 21:53:13 +13:00
Ian Walls
48ee1dcb3f Bug 5547: Hide Lost Items dev
Adds a Hide Lost Items option to the staff client, as detailed in the enhancement request
at http://wiki.koha-community.org/wiki/Hidelostitems_option_for_the_staff_client_RFC

Minor edits: Whitespace

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:20:05 +13:00
Jared Camins-Esakov
51604b5487 Bug 4393: Scan Indexes results cannot be sorted
Because of the way Scan Indexes works, the results cannot be sorted. Previously
when any sort other than relevance (or in some cases popularity) was used, the
search failed. This patch disables sorting on Scan results. This patch also
fixes the index selection dropdown on the results page, which was not being
populated correctly from the Advanced Search screen.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 19:51:52 +13:00
Paul POULAIN
091d310016 Bug 3629 : search limit by group is not OK
MT4491 : limitation by library group

- the group list was not displayed in OPAC (even if everything else was here
- the group limit was not working due to a missing ()

author=jean et group=droit" resulted in:
author=jean and branch=b1 or branch=b2 or branch=b3
that is wrong (executed from left to right)

the fix add () to have :
author=jean and (branch=b1 or branch=b2 or branch=b3)
that is OK

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 12:37:50 +13:00
265ed53f12 3154 Preferences for building facets (functionality)
Based on patch from Fridolyn Somers with input of Frederic Demians.
Added new Searching preference maxRecordsForFacets.
This pref contains number of result records used in facet building.
Also added pref displayFacetCount (with thanks to Frederic).
Follow up patch takes care of install issues; functionality can already be tested with this patch only.

Updated on March 17 for changes in include files.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-22 20:53:28 +13:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Paul Poulain
04869d0fd0 Bug 4330 : fixing copyright mail from chris c 2010-12-16 on patches ML 2011-03-21 10:39:06 +13:00
Chris Cormack
76d52d89e4 Merge remote branch 'kc/new/enh/bug_3659' into kcmaster 2011-03-15 15:58:26 +13:00
251e2c4d74 Fix for Bug 3659, Add place hold option from patron checkout tab
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>
2011-03-15 15:48:09 +13:00
7a587112f0 Fix for Bug 4853 - Rights needed to renew a document
Correcting check for circulation permission. Also updating
updateitem.pl (for setting lost and damaged statuses) with
circulate permissions.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-06 08:26:35 +13:00
ee3707d0de Bug 4103 In Pro Adv Search, superlibrarian search always all libraries
Now, when 'independantbranches' syspref is activated, 'Individual Libraries'
combo list is set by default to the current user branch. It shouldn't be the
case for superlibrarian user who is supposed to manage all libraries.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-05 20:32:56 +13:00
Chris Cormack
36d64bd18c Merge remote branch 'kc/new/enh/bug_5462' into kcmaster 2011-02-17 09:47:14 +13:00
4797959964 Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit
A change was made to MARCdetail.tmpl without making a corresponding
change to MARCdetail.pl. I've reworked the original change so that
both can work together.

0XX --> tab0XX

Apparently TMPL variables can't start with a number now?

MR: Recreated patch file to recover failure to apply.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-17 09:42:56 +13:00
Paul Poulain
1abf1ea2d0 Bug 5731 When No ccode is defined for an item, then moredetail.pl throws a 500 error
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-10 14:50:49 +13:00
Frédérick Capovilla
07731037ee Bug 5616: Corrects an utf-8 encoding problem in cardviews
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-08 21:18:50 +13:00
Chris Cormack
e1b1c43425 Revert "Fix for Bug 3659, Add place hold option from patron checkout tab"
This reverts commit da2040634e.

Wrong patch was applied
2011-01-25 06:24:32 +13:00
da2040634e Fix for Bug 3659, Add place hold option from patron checkout tab
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>
2011-01-24 20:43:04 +13:00
a660b25aa0 Fix for Bug 4885 - Only 1 ISBN shows in non-XSL detail view
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>
2011-01-14 10:48:47 +13:00
75762a63e9 Fix for Bug 3262 - OPAC needs syspref to show homebranch on detail page
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>
2010-12-20 10:12:34 +13:00
Robin Sheat
13bc505c5f bug4891 - sort facets in search sidebar (OPAC and staff client)
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-19 07:24:16 +13:00
6466ac847f Fix for Bug 4218 - Staff client detail page does not show item hold status
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>
2010-12-13 15:56:11 +13:00
9753368626 bug 5405: remove disused script catalogue/suggest.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-02 09:12:31 +13:00
bd90bb02a4 Corrected patch for Bug 4520, facets "show more" doesn't work
Re-doing Nahuel's fix so that it applies to master

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-15 20:20:42 +13:00
be54744836 Partial fix for Bug 4924, Public/Internal notes missing in staff normal view
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>
2010-11-13 19:24:40 +13:00
Andrew Elwell
efa66f1f55 Bug 5385: POD Cleanups (part 2)
More podchecker cleanups to eliminate warnings / errors

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:56 +13:00
b0e29e5595 Fix for Bug 5082 - Not translatable name of default framework 'Default' in MARCdetail.tmpl
This patch also fixes an unreported bug where switching from any
other framework to 'Default' would bring up no MARC data.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 15:16:51 +13:00
ce5e2429db fixing various links to point to *.koha-community.org
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 22:08:24 -04:00
fb5412c529 Fix for Bug 4849 - Cannot delete records from Labeled MARC view
The template checks for a "count" variable (item count) to see
whether it should allow deletion of the biblio record. For some
reason labeledMARCdetail.pl hard-coded this as 1, which meant
the template always thought was 1 item.

This patch also adds an item count check on the display of
"Delete all items," disabling it if there are no items.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 08:16:48 -04:00
f8cec7ba13 Fix for Bug 4922 - Item display tries to show serial info for titles with series tags
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>
2010-10-06 08:06:42 -04:00
Henri-Damien LAURENT
39d70cf05b MT2938 : Adds a permission for editing items
This patch adds a permission on edit_items

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-03 21:04:01 -04:00
b1ed3af633 bug 4311: respect OPACXSLTResultsDisplay
Check OPACXSLTResultsDisplay instead of XSLTResultsDisplay when
determining whether to use the XSLT bib results stylesheet for
OPAC search results.

In the process, added a new $search_context parameter to
C4::Search::searchResults() to specify whether results
are to be served up for the staff interface or for the
OPAC.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 11:22:47 -04:00
ed2348dd95 Corrected: Fix for Bug 4529, columns on circ history all screwy
- fix formatting of last renew date
- Add table zebra striping
- Other markup structure changes
- Revised template assumes that issues.branchcode == checkout library and displays
  that value instead of issues.issuingbranch (which is always empty, see Bug 2806)
  issues.branchcode seems to reflect the item's holding branch *after* having
  been updated as part of the checkout transaction.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-24 10:43:28 -04:00
Jane Wagner
dc0b98eb9e Bug 3093 add syspref to turn off multiholds button
Having the place multiple holds button at the top of the OPAC and staff search results has caused problems for some sites with tight holds policies; this syspref allows those sites to turn off the button.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-11 07:44:17 -04:00
Chris Cormack
fcb8469d18 Reserve and onloan were reporting the same cardnumber, due to a little bug in detail.pl fixed by this patch
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-11 06:04:39 -04:00
Donovan Jones
b31b5f3620 Bug 2505 - Add commented use warnings where missing in the catalogue/ directory 2010-04-21 20:25:13 +12:00
Lars Wirzenius
034e2c1cbb Fix FSF address in directory catalogue/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:49 -04:00
Kyle M Hall
879d7f0e6b Bug 1248 - Add a "quick spine label" print to the bib item page in cataloging
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>
2010-02-05 07:36:09 -05:00
Matthias Meusburger
9f41fe64be MT 2050, Follow-up, Fast Cataloging
Adds granular permissions for cataloging
Also adds a link from the circulation home to fast cataloging when fast cataloging is active
2009-11-24 10:05:10 +01:00
Paul Poulain
ed047fead8 adding XSLT for intranet (UNIMARC only, MARC21 will be done by kf)
- 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)
2009-11-10 22:23:50 +01:00
Matthias Meusburger
4a119ecb41 MT 2134 : Adds a tab for subscriptions in intranet's record detail 2009-11-04 09:19:36 +01:00
Matthias Meusburger
790b7cc1b9 MT 2037 : Update ISBD 2009-10-22 11:45:38 +02:00
Matthias Meusburger
f00a4a7cfb MT 1976 : Lists are directly displayed through VirtualShelves.pm
(and not through the session, like in opac)
2009-10-02 11:15:16 +02:00
Matthias Meusburger
2a81f0778e Ticket 1110 : Balance carts and lists
In Opac :
Print lists
Carts looks more like lists
Carts "More Details" And "Brief Display" toolbar looks more alike
In Admin :
Search results toolbar now have a "Add To" button for adding to a selected list with a confirmation pop-up, like in OPAC

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-30 11:30:41 +02:00
Matthias Meusburger
374c898122 Fix broken moredetail.pl 2009-09-30 11:30:30 +02:00
Paul Poulain
9ec04d23c4 catalogue/moredetail, removing & reindenting (not new_acq specific) 2009-09-30 11:30:16 +02:00
Jean-André Santoni
f7d5759a0d (bug #3555) This sets the default branch to the logged user branch when IndependantBranches is active
In the advanced search form, when IndependantBranches is activated, the default
branch should be set to the logged user branch.
2009-09-30 11:30:12 +02:00
Nahuel ANGELINETTI
1b5e2e83ed (bug #3550) use GetRecordValue to retrieve subtitle
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.
2009-09-30 11:30:11 +02:00
Henri-Damien LAURENT
6e55d55f06 C4::Search :Enhancements
Stemming is now available for more languages

Adding also getDistinctValues which gets distinct values for a zebra index or for a Mysql field

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:29:24 +02:00
Nahuel ANGELINETTI
17c831399f Delete unused function
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-29 19:53:04 -04:00
Nicole Engard
b9f4fa6260 Bug 1003 Added lists to bib details pages
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>
2009-09-06 12:58:36 -04:00
Chris Cormack
634df1c76c Bug 3539, Adding a systempreference to hide borrowers name on the catalogue detail page, and holds page
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>
2009-08-23 13:52:26 -04:00
Nicole Engard
baa0b08149 ENH: 3525 - Link to OPAC View from Staff Bib
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>
2009-08-12 21:50:16 -04:00
Garry Collum
54dad0143c Bug 3428: Alphabetizes the collection codes in the Advanced Search.
If the advancedSearchTypes = CCODE, the code descriptions are not alphabetized, as opposed to itemtypes, which are alphabetized.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-20 21:24:54 -04:00
Joe Atzberger
af1fb6f0b4 Bug 2539. Remove unintegrated "spsuggest" code from search scripts.
The intent of kohaspsuggest is very confused.  It wanted to simultaneously
log every search query, and get spelling suggestions from a totally different
database_host:db_user:db_password:database.  The implementation seems
never have really made it into 3.0, however, since the only trace of the
tables it wants to query are in misc/migration_tools/22_to_30/phrase_log.sql

The job misc/spellcheck_suggest/make_spellcheck_suggest.pl does not even
target the same remote DB as the syspref tells the search code to do.  Instead, it hits the
local DB and, not finding the tables that have no way of existing in a 3.0
install, it CREATES its own tables spontaneously, using MyISAM storage, no less.
This script should be drastically overhauled, or more likely just removed.

Other fixes:
Commented out unconditional warn!
Also reduced bizarre whitespace amounts in catalogue/search.pl and
fixed warning as recommended by perl -wc:
    Scalar value @newresults[0] better written as $newresults[0]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 21:20:25 -04:00
Nahuel ANGELINETTI
79fc6d81f7 (bug #3267) show items.uri in opac and intranet
This add a column in normal view, with a link to items.uri URL if it exists.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 08:26:33 -04:00
Galen Charlton
38b3eacde0 bug 2641, 3263: minor fixes to labeled MARC view
* fixed to XHTML validation errors
* corrected copyright statement

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 06:42:35 -05:00
Rick Welykochy
7504a1bb5a bug 2641, 3263: Staff Search Results Interface Changes
New detail view: labeled MARC

New bib record view in the staff interface that
displays the MARC record in a single page.

Featured sponsored by MassCat.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 06:42:27 -05:00
Galen Charlton
17ab0a7532 bug 3263: Staff Search Results Interface Changes
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>
2009-05-28 06:42:20 -05:00
Galen Charlton
3cfa84362f bug 3219: handle variation in Amazon responses
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>
2009-05-27 07:06:20 -05:00
Galen Charlton
3f49ad62c8 bug 3236: remove disused scripts and a function
Removed opac/opac-dictionary.pl and catalogue/dictionary.pl,
which were not in use and not linked to from any active
template files.  According to Henri, the functionality that
these scripts implemented hasn't been working since 2.2.

Also removed C4::Search::findseealso(), which was used
only by the two scripts.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-20 08:37:58 -05:00
33fffbcfd6 Bug 2920 Fixes Amazon content use in pro interface
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>
2009-04-27 06:53:34 -05:00
199ec1473a Bugfix #2920 Avoid doing unecessary calls to Amazon Web Services
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>
2009-04-26 10:36:14 -05:00
Joe Atzberger
28a7b360be Block warning on detail.pl.
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>
2009-04-24 09:02:34 -05:00
Paul Poulain
444601a4d1 fix for #1731
The "place hold" button is hidden in detail.pl when there are no items or the
items are not for loan. MARC detail should do the same.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 18:38:45 -05:00
Galen Charlton
6a2a4e146e fix various warnings
* 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>
2009-04-08 15:54:19 -05:00
Galen Charlton
684cea4309 bug 3049: display correct due date of renewed loans
The intranet item display provided by moredetail.pl
would display the original due date of the item, and
would thus be incorrect if the item had been renewed
and got a different due date.

The incorrect date was coming from items.onloan,
which AddIssue() sets to the due date.  This patch
fixes the bug in two ways:

[1] AddRenewal() now updates items.onloan with the
    correct due date.
[2] Two templates were updated to display the
    due date from (indirectly) issues.date_due
    instead of items.onloan, thus making it less
    likely that the wrong value will be displayed.

This patch does *not* update items.onloan to reflect
the correct due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 14:51:32 -05:00
Nahuel ANGELINETTI
89c062c44b (bug #3053) extract ISBD view generator, and permit to display valuecode in ISBD view
this patch extract the generator of ISBD view in a C4 function, because it's used in intranet AND in OPAC but with 2 separate codes.
Now it's more reusable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 11:16:34 -05:00