Commit graph

156 commits

Author SHA1 Message Date
Colin Campbell
26b2bd1fe0 Bug 10426: Remove unused sub GetCcodes from Koha.pm
Remove uncalled sub GetCcodes

Also remove comment in opac-search.pl which is
remaining reference to it and serves no
useful purpose

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-06 18:27:16 +00:00
Galen Charlton
0c67e94c8b Bug 10656: (follow-up) handle OPAC sorting of authvals where lib_opac is NULL
The OPAC description for an authorized value is not required to be
populated.  In particular, if it is NULL, the staff description is
displayed instead.

This patch makes sure that the sort order (in OPAC mode) uses either
the staff description or the OPAC description as needed for each
value.

To test:

[1] Make sure that AdvancedSearchTypes includes "ccode"
[1] Arrange your CCODE values so the sort order for staff labels
    is different from the sort order for OPAC descriptions.  Also,
    ensure that one of the OPAC descriptions is NULL.  For example,

    authorised_value | lib     | lib_opac
    --------------------------------------
    ZZZ              | A_STAFF | Z_PUBLIC
    DDD              | D_STAFF | NULL
    AAA              | Z_STAFF | A_PUBLIC

[2] Prior to the patch, any CCODE values where the OPAC description
    is NULL will sort first in the OPAC advanced search page, even
    if the displayed label shouldn't come first.
[3] Apply the patch.
[4] Verify that the collection list on the OPAC advanced search page
    is now correct.
[5] Verify that the sort order on the staff advanced search page
    has not changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested in staff and OPAC.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-06 16:48:23 +00:00
dd13998837 Bug 10656: improve sorting of shelving location and collections on OPAC advanced search form
Collection codes and shelving locations are displayed in the OPAC and
staff client via GetAuthorisedValues which currently sorts results by
"lib, lib_opac." Consequently if lib (the description for the staff
client) doesn't match lib_opac (the description for the OPAC) sorting
will appear to be nonsensical in the OPAC. GetAuthorisedValues can be
passed an $opac parameter, so this should be used to switch how reuslts
are sorted. This patch implements such a switch.

To test, modify your collection code or shelving location authorized
values so that lib and lib_opac do not match. Set your
AdvancedSearchTypes system preference to display the modified authorized
values and view the advanced search page in the OPAC and staff client.
Sorting should be correct in each case according to the correct value
(lib in the staff client, lib_opac in the OPAC).

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested in staff and opac and it works perfectly!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-06 16:48:02 +00:00
3429e5e16d Bug 10765 - [SIGNED-OFF] Update POD of C4::Koha::GetSupportList() to use TT syntax
This patch updates the example template syntax in the POD for
C4::Koha::GetSupportList() to use Template Toolkit syntax.

To test, view the POD for  C4::Koha::GetSupportList() and confirm that
it looks correct.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
This patch works as advertised (verified with "perldoc C4::Koha"),
for GetSupportList, but it does not fix a a similar example for
GetItemTypes, getauthtypes and getframework in the same file,
which still has the old template syntax. So a followup or separate
bug(s) for those are called for.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It seems the default option is not in used in templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-20 14:29:30 +00:00
def952bda9 Bug 10463: ensure that Quote of the Day feature selects random quotes
When the Quote of the Day tool selects a new new quote, it updates the
timestamp and does not take the timezone into account.  Thus the time is
set to +4 hours (e.g. 2013-06-11 13:33:48 when the time is 2013-06-11
        09:33:48).  It then repeats the same quote every day.

To replicate:

Set Administration >> System preferences >> OPAC preferences >> Features
>> QuoteOfTheDay to Enable

In Home >> Tools >> Quote Editor, add several quotes.

In the opac, refresh the home page. You should get a quote of the day at
the top.

mysql> select * from quotes;

Note the timestamp of the quote selected by the tool. It will not match
the date on the machine (unless your server's timezone is set to UTC).

If you change the date to the previous date and refresh the opac, the
tool wlill select another quote, which will not change unless forced.

Test Plan:
1) Remove all your quotes and import a fresh set
2) Enable the quote of the day and view the opac
3) Look at your quotes table and note the timestamp is incorrect
4) Repeat steps 1 and 2
5) Look at your quotes table and note the timestamp is now correct

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-25 15:05:01 +00:00
be869ab279 Bug 8215 - Course Reserves
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
2013-05-21 15:50:55 -07:00
cdc5e11159 Bug 9659 - Better handling of non-existent authorised value categories used in SQL reports
A user might create a SQL report that relies on non-existent authorised value categories.
Because of a typo, or just because they copy&pasted the report from the Wiki.

Use cases are:

- The user creates a report from SQL
  a) Uses bad authorised values
  b) Clicks 'Save Report'
  c) Koha lists the problematic authorised values
  d) The user decides to
  e-1) Save it anyway, it gets saved
  e-2) Edit the report, it gets back to where it chose 'Save Report'

- The user edits an already saved report (Update SQL)
  a) Uses bad authorised values
  b) Clicks 'Update SQL'
  c) Koha lists the problematic authorised values
  d) The user decides to
  e-1) Save it anyway, it gets saved
  e-2) Edit the report, it gets back to where it chose 'Update SQL'

- The user tries to run a saved report that contains bad authorised values, Koha advertises the problem and provides the user with a button 'Edit SQL' to fix things.

To test, just create a report from SQL using invalid authorised values like this (misspelled 'branch'):

SELECT *
FROM itemtypes
WHERE hola=<<Test branch1|branchee>> AND
      hola2=<<Test branch2|brancha>>

Regards
To+

Notes:
- I added several comments on the code.
- Fixed an annoying warning of uninitialised variable also (refactored some tiny bits to do it).
- Added the following methods
   -  C4::Reports::Guided::GetReservedAuthorisedValues
   -  C4::Reports::Guided::GetParametersFromSQL
   -  C4::Reports::Guided::IsAuthorisedValueValid
   -  C4::Reports::Guided::ValidateSQLParameters
   -  C4::Koha::IsAuthorisedValueCategory
- Those methods could have been used to refactor this guided reports code as its *a bit messy*. I chose to do it in a new bug of course :-D.
- Fixed some trivial perlcritic -5 errors
- Removed some debugging stuff left by mistake
- Fixed some POD problems
- Optimal SQL-driven IsAuthorisedValueCategory method
- Thanks to Owen and Jared for their patience heh.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described. No koha-qa errors.

Test:
Tried with examples (from help and test plan) reports, correctly
identifies invalid authorized values, and no problem with
authorized ones.

NOTE: Online help for this does not states that partial values
need to be between '%' in a SQLish way. Perhaps this could be
addressed inserting % in values or adding a checkbox (partial|exact).
Or changing help.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-26 08:07:24 -04:00
Julian Maurice
8eae0c2a67 Bug 9117: Add imageurl to the list of parameters of AddAuthorisedValue
and add unit test in t/db_dependant/Koha.t

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-21 18:54:10 -04:00
Julian Maurice
1e92b9c15e Bug 9117: Reports hierarchies management improvements
- Filter by groups using tabs
- Filter by subgroups using a dropdown list under each tab
- Allow to create new group and subgroups when building a new report or
  editing an existing report (no need to go through admin AV interface)

+ Possibility to duplicate a report (new link in the table)

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>
2013-03-21 18:54:09 -04:00
Vitor FERNANDES
6646c5887a Bug 9341: Problem with UNIMARC authors facets
In UNIMARC installations the authors have a double comma separating the subfield a and the subfield b.

Test plan:

- After applying the patch do a search and check the double comma in authors facets.
- Apply the patch
- Do a new search
- Check if authors facets as a double comma

Sponsored-by: KEEP SOLUTIONS
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>
2013-03-19 20:37:29 -04:00
Galen Charlton
facde98694 Bug 9494: update default LOC z39.50 target settings
This patch updates the seed data from the target list at
http://www.loc.gov/z3950/lcserver.html#addr.

Comment: new target works. updated deleting and reloading
sample targets.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
I agree with Galen that this may need to be incorproated as a follow-up
for current installations. Works fine for new installs
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-31 11:11:16 -05:00
Jared Camins-Esakov
61db2de294 Bug 9174 follow-up: Eliminate warning and fix POD
Thanks to Marcel for spotting these issues.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-31 10:59:04 -05:00
Jared Camins-Esakov
066848a8f0 Bug 9174: Fix itemtype image display in OPAC lists
Prior to this patch, C4::VirtualShelves::Page did not make sure that
the itemtype images that it chose when displaying itemtype images for
biblio-level itemtypes were for the correct interface, so
even on the OPAC the Intranet icons were requested. On standard
installations, intranet-tmpl is not available to the OPAC.

To test:
1) Set noItemTypeImages to "Show" and item-level_items to "biblio record"
2) Create a list and add an item with the default item type (942$c in
   MARC21) set to something with an itemtype image associated with it.
3) View the list in the OPAC.
4) If you are an a standard install, the itemtype image will be a broken
   link. If on a dev install, you can confirm with Firebug or the like
   that the image is pulled from /intranet-tmpl.
5) Apply patch.
6) Run `prove t/db_dependent/Koha.t` to confirm that the behavior of the
   routine used to retrieve the image URL is correct. (Note that you
   must have an item type with the code 'BK')
7) Refresh the list, noting that the display is now correct/the image is
   pulled from opac-tmpl.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It works as expected. All tests in Koha.t passed.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-31 10:59:04 -05:00
Jonathan Druart
acbfe26c9e Bug 7919 : Display of values depending on the connexion library
In a librairies network, we would like to declare specific values just
for one (or more) library.
Here we implement the ability to associate categories, patron attributes
types and/or authorised_values with librairies (branches).

This patch adds 3 new association tables:
- categories_branches ( association table between categories and branches )
- authorised_values_branches ( association table between
  authorised_values and branches )
- borrower_attribute_types_branches (association table between
  borrower_attribute_types and branches )

Plan test:
  - Create (or modify) categories, patron attributes and
    authorised_values and link it with one (or more) library.
  - Set one of these librairies
  - Go to one of the multiple pages where this specific value must be displayed
    and check that it does appear.
  - Set a library not concerned.
  - Check on the same pages this value is doest not appear.

A page list:
cataloguing/addbiblio.pl
cataloguing/additems.pl
members/members-home.pl
members/memberentry.pl
acqui/neworderempty.pl
tools/modborrowers.pl
and others :)

Please say me if filters don't work on some pages.

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-05 10:10:57 -05:00
Mathieu Saby
44e65ad514 Bug 8958: Make facets more UNIMARC compliant (revision 1)
Suppressions : I suppressed some indexes not existing in Unimarc : 603, 502,
504

Corrections :

  - Places : 651 was Marc21 => I put the right value (607)
  - Topics : 600a => 600ab (name/surname) ;  604a => 604at (author/title)

To test, take a record with 607, 600ab, 601ab, 604at, do a research matching
this record, and check if facets looks nicer that before...

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

Works as described. 607 for Places is very useful! Other tweakings make sense.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-26 17:16:50 +02:00
5e4d80ce6f Bug 6679 - [SIGNED-OFF] fix 9 perlcritic violations in C4/Koha.pm
- Subroutine prototypes used at line 115, column 1.  See page 194 of PBP.  (Severity: 5)

- "return" statement with explicit "undef" at line 1112, column 4.  See page 199 of PBP.  (Severity: 5)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-20 12:01:35 +02:00
881ee1b1a1 Bug 7401 - Shelving Location facet
This patch enables the shelving location facet as an
alternative to the branches fact in two situations:
A) SingleBranchMode is enabled
B) There is only one branch in the branches table

Test Plan:
1) Catalog multiple items with different shelving locations.
2) Test enable by enabling SingleBranchMode
3) Test enable by deleting all but one branch

Based on initial patch by Ian Walls.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested cases 2) and 3) successfully in OPAC and staff client

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-19 14:25:04 +02:00
6f431883f8 Bug 4173 - Statuses not appearing in the OPAC
For the authorised values LOST and DAMAGED, if an OPAC description
is defined for the given value, display that description in the OPAC
rather than the generic description.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2012-09-14 16:37:16 +02:00
Jared Camins-Esakov
765bbe1dad Bug 8623: Do not accept "lib" as a valid theme
Since we are going to be storing third-party Javascript libraries in
koha-tmpl/opac-tmpl/lib and koha-tmpl/intranet-tmpl/lib, we want to make
sure that "lib" is not picked up as a theme in the system preferences
editor.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-09-05 12:04:12 +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
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
Chris Cormack
509d673f10 Bug 7941 : Fix version numbers in modules
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:29:38 +02:00
Chris Nighswonger
ef064dca6d Bug 7977: Adding Daily Quotes Tests to Koha.t test suite; also fixing sort order on quote selection SQL
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:45 +02:00
Chris Nighswonger
eb7e930eea Bug 7977: Quote-of-the-day (QOTD) Feature for OPAC
This feature will add the option of displaying a select quote
for the day on the OPAC homepage. It will include the addition
of a QOTD editor in the tools section of the staff interface
which will allow the addition, editing, and deletion of quotes.
A single system preference will enable/disable the display of
the QOTD on the OPAC homepage. A new granular permission will
also be added to conrol user access to the QOTD editor tool.

Possible extentions to this would be code to allow alternate
quote selection algorithms to be added to vary how the currently
displayed quote is selected from the table of quotes.

This patch is a squash of the following work:

--Adding quotes table to kohastructure.sql and updatedatabase.pl

Note: This patch is intended for a MySQL based installation only.
That means that it includes backticks because that is what is required
at this point in history to install Koha correctly on a MySQL based
installation.

Feel free to port this over to the Pg stuff in the data/Pg directory.

--Adding system preference to control display of QOTD on OPAC main page
--Adding sample quote data

These quotes are taken from various US presidents. I'm not sure these
are applicable to the rest of the world, so I'm leaving it to translators
and others to add sample quote data for other languages.

--Adding edit_quotes user permissions
--Squash with other db related patches in this series
--Adding quotes editor pages to tools
--Adding QOTD editor link to tools homepage
--Integration of DataTables into QOTD Editor
--Impleminting jEditable into the quote editor
--Adding delete and add option to editor
--Fixing OPAC display so the QOTD div does not show if no quote is returned
--Also removing useless code from tools/quotes.pl
--Adding spans around QOTD foo in opac-main.tt
--Also fixing quote selection logic to accomodate the possibility of
    a single quote in the db a litte better.
--Changing timestamp column header to a more user-friendly 'Last Displayed'
--Fixing bug in quote selection logic. This bug caused a situation where
    when the table had only a single quote with an id greater than 1 in it,
    no quote would be selected.
--Fixing up sorting in the quote editor table. --jcamins
--Adding span element to quote separator --jcamins
--Overriding the default empty table message supplied by datatables-strings.inc
--Adds missing page heading
--Adds beginning of click-for-help elements.
--Refactors delete functionality to allow selecting of quotes to delete,
    enabling multi-delete.
--Refactors saving added quote functionality so that striking <Enter>
    saves the new quote.
--Refactors canceling aded quote functionality so that striking <Esc>
    cancels the new quote.
--Removing debug console.log statements
--Implementng the YUI button widget/toolbar used on other pages.
--Adds a 5px radius to all YUI buttons to bring them into
    conformity with the general trend toward rounded corners
--Fixes capitalization in quote editor
--Implements improvements suggested by jcamins and oleonard
--Adds DataTables Plugin dataTables.fnReloadAjax.js

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:05 +02:00
Adrien Saurat
1ea7afdb57 Bug 8025: corrects the return of a zero value for authorised values
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-07 22:00:09 +02:00
aed0d8a63d Bug 3216: UNIMARC author facets
Add 700$b to UNIMARC author facets.

Other facets subfields could be added now. For example, other subjects
subfields.

Following patches are required to handle better MARC21 subfields and choose
other subfields to deal with UNIMARC format.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested under both MARC21 and UNIMARC. Does not cause any regressions with
MARC21, and offers the possibility for better faceting there in the future.
Works as advertised with UNIMARC.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-13 16:35:02 +01:00
99f686ea83 Bug 7579 - Icons for authorized values/item types not showing in OPAC
The functions getitemtypeimagedir and getitemtypeimagesrc
in Koha.pm were using the system preference 'template'
when they should be using 'opacthemes' instead.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-27 18:32:09 +01:00
Paul Poulain
8165aeef77 Bug 6875 de-nesting C4::Koha.pm
* removed use C4::Output, that was not used
* moved use URI::split to getitemtypeimagelocation and switched to "require".
  Checked it still works through admin/itemtype.pl
* moved use Business::ISBN to _isbn_cleanup.pl and switched to "require".
  Checked it still works with the following small script :

use C4::Koha;
print GetNormalizedISBN("1-56592-257-3");

(GetNormalizedISBN uses _isbn_cleanup)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-02-15 14:58:28 +01:00
Katrin Fischer
d831a03fde Bug 7321: Silence some warns in Koha.pm
While testing bug 7013 I noticed a lot of warns in the koha error log.
This patch is silencing them.

To test:
Add or edit an authorised value and check your log files before and after
applying the patch.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-15 16:53:32 +01:00
Chris Cormack
c1181b780b Merge remote branch 'kc/new/pending_qa/enh/bug_3644' into kcmaster 2011-04-09 19:16:45 +12:00
Alex Arnaud
22dc04e24c Bug #6082 - On aqbudgets.pl bug on the Statistic's combobox
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 10:45:02 +12:00
Magnus Enger
edf8ad5d5d Bug 3644 Add support for NORMARC
- XSLT for the OPAC
- Value_builders for lesder, 007 and 008
- Default NORMARC framework
- Reverse MARC logic of some subs, so MARC21 is default (and works for NORMARC)
- Add NORMARC as an option to the syspref marcflavour
- Add record.abs for NORMARC
- Add NORMARC and nb as options to Makefile.PL
- Add etc/zebradb/lang_defs/nb/sort-string-utf.chr
- Copy MARC21slim2OAIDC.xsl to NORMARCslim2OAIDC.xsl

Some things are still missing, e.g.:

- XSLT for Intranet
- More MARC21slim2*.xsl transformations
2011-03-30 10:13:37 +02:00
Chris Cormack
079b546a61 Merge remote branch 'kc/new/enh/bug_5880' into kcmaster 2011-03-24 22:09:50 +13:00
Colin Campbell
0e1ea3ef81 Bug 5880: Correct misleading pod in new subroutine
Also remove some whitespace noise from prev commit

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-24 22:07:35 +13:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Paul Poulain
d057f65743 Bug 5880 : C4/Koha.pm : adding two functions GetAutorisedValueByCode and GetKohaImageurlFromAuthorisedValues
just for convenience

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-17 14:44:38 +13:00
Chris Cormack
be1a194d6c New icon set, renaming and making files in the intranet too 2011-01-19 14:42:46 +13:00
Colin Campbell
a61db4986d Bug 5403 Remove DisplayISBN and GetPublisherNameFromIsbn
These two subroutines were no longer being used by any other code
removed them from their respective modules
If we need any ISBN in future we should use Business::ISBN directly

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-17 19:40:08 +13:00
Zach Sim
53a301b8f2 Bug 5327 - Adding UNIT Tests.
Squashed commit of the following:

commit 146d14665c52edaa85e38b70aabc9d52be5d64b6
Author: Zach Sim <joseph.zachariah.sim@gmail.com>
Date:   Mon Jan 17 16:07:24 2011 +1300

    Edited DisplayISBN to cleanup the ISBN using _isbn_cleanup if it is not 13 or 10 digits long.

commit ba97b26d9a25470b0717cdd60a3d4f7a5c459ca9
Author: Zach Sim <joseph.zachariah.sim@gmail.com>
Date:   Mon Jan 17 16:06:14 2011 +1300

    Added extra unit tests to test C4::Koha::DisplayISBN.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-17 16:25:08 +13:00
e54169ba0f Incremental fix for Bug 3285 - Location on Add Subscription should be pull down
- Adds location dropdown to subscription edit form
- Pulls authorised value for display on subscription detail page
- Adds function for pulling authorised value description based
  on category and value

This patch does NOT implement automatic preselection of the shelving
location form field on the serial add item screen. This must be
worked out in order for the bug to be closed.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-07 09:29:05 +13:00
Colin Campbell
c95b5153e0 Bug 4305 Improve code flow
Use the ISBN Object's method to format the string
rather than add extra code to do it
Clean up the code flow for clarity
Benchmarking shows its a bit faster too
Don't add to the number of Test::Perl::Critic warnings
 for no benefit

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:26:56 +13:00
Chris Cormack
ae6ae0b39d Merge remote branch 'kc/new/bug_5301' into kcmaster 2010-11-03 06:54:50 +13:00
f2e4fa7b1b Fix for Bug 5221 - Preselect tab containing itemtype/authval image in use
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 11:19:50 +13:00
f88f88dcc5 bug 5301: improve escaping of XML characters in bib output
<, >, ', or " in an item call number will no longer make
the bib displays break when using XSLT mode.

Added a new routine to C4::Koha, xml_escape(), to implement
converting &, <, >, ', and " to their corresponding
entities.

Patch loosely based on work done by Daniel Latrémolière <daniel.latremoliere@bulac.fr>

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 08:31:47 +13:00
Robin Sheat
e81bc5ce81 Bug 4305 - prevent errors when handling invalid ISBN13 values
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 18:36:35 -04:00
Ian Walls
0d768b482e Followup to Bug 4305: multiple ISBNS in biblioitems.isbn breaks patron
This patch adds a scrub for ' | ' when the ISBN comes from the
biblioitems table, in the event that Koha has attempted to store
multiple ISBNs in the field.  The ISBN presented to Business::ISBN will
now be something it can handle.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 12:56:12 -04:00
Ian Walls
a897931313 Update VOKAL icon set
The Green Mountain Library Consortium has updated the 'vokal' item type
image set to include new and updated icons, including:
Puzzles and Games
BLURAY
Hardware
Educational Media
Fiction, Nonfiction, New and Holiday books
ILL materials

Smaller versions of all the icons (32 px) are included as well.

Sorting of the icons has been included in this patch to group
large and small versions of these icons together, as well as make large
icon sets easier to visually scan (the 'bridge' set benefits from this,
as well) .

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 08:09:22 -04:00
e4f37fde48 Bug 4305 Get Amazon book covers for ISBN13
The way Koha get book cover from Amazon doesn't work from biblio records
having ISBN13 because Amazon expect an ISBN10. This patch transforms
ISBN13 into ISBN10 before sending it to Amazon.

Warning! On some devel installations, you will have to install by hand a
new CPAN depency:

  Business::ISBN

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 06:18:48 -04:00
Andrew Elwell
c6bf50d052 The start of some POD cleanups in C4/*.pm
If these are acceptable I'll continue - target is to get rid of all warnings
and errors with podcheck and make sure that any man and html formatted pod
docs look 'OK'

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 08:38:55 -04:00
Donovan Jones
593a7d8e6a Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00