Commit graph

69 commits

Author SHA1 Message Date
dbaefb626c Bug 10550: Fix database typo wthdrawn
This patch updates the wthdrawn field in items and deleteditems to be
withdrawn instead. No functional changes are made.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Save for translation files (that will be fixed on next release),
only occurrence of wthdrawn is on updatedatabase.pl
No koha-qa errors.

This touch many files, and I did not test everything,
but all seems normal. I think that any problem could
be fixed later.

Perhaps both entries in updatedatabase.pl could be joined
into one, but thats for QA.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:58:41 +00:00
Galen Charlton
b0eeb00d48 bug 10292: improve fallback logic for picking XSLT
This patch fixes a bug whereby XSLT files from the
prog theme would be used (for English OPACs and staff
interfaces) even if the user had created and enabled a
custom theme that provided override XSLT files.

This patch provides a clearer implementation of the fallback
logic and adds test cases.

To reproduce the bug:

[1] Set OPACXSLTDetailsDisplay to 'default' and English as the OPAC
    language.
[2] Create a new OPAC theme, including copying the XSLT files.
[3] Set opactheme to the new theme.
[4] Make a change to koha-tmpl/opac-tmpl/NEWTHEME/en/xslt/MARC21slim2OPACDetail.xsl
[5] View a bib record in the OPAC. The change made in the previous step
    is not reflected.

To test after applying the patch:

[6] Reload the bib record in the OPAC. The change made in step 4 should
    now be reflected.
[7] (To be thorough) Go through the test plan for bug 8947
    and verify that there is no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-29 07:39:41 -07:00
Galen Charlton
94508a5c3d Revert "Bug 6554 QA Followup"
This reverts commit 686fdae32c.

Rolling back bug 6554 work until we have more comprehensive tests.
2013-04-29 15:17:06 -07:00
ab5c3eccf4 Bug 10073: Show ccode or location also if not bound to Authorized Values in XSLT
If you do not have ccode or location governed by authorized value
(you can release this default connection in the marc structure),
these item values are not passed through in the items section,
created by buildKohaItemsNamespace for XSLTParse4Display.

This simple patch checks if the authorized value hash on ccode or
location returns something and passes the original value in otherwise.

Test plan:
Temporarily disconnect ccode and location from authorized values
in MARC structure.
Edit an item, put some values in location and ccode.
Look at this record via opac search (XSLT enabled). Toggle the value of
OPACItemLocation to show ccode or location before call number.
Restore authorized values-connection when applicable.

Note: Since bug 9995 adjusts OPAC XSLT Results, it may be helpful
to apply these
patches when testing this.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described for the XSLT result list.
The text is shown when OpacItemLocation is set to show collection
or location.

Note: Displaying location and collection without using authorised
values doesn't work in other places like the detail page item table.
So this will need more work to be fully functional.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-26 18:31:01 -04:00
Liz Rea
0942cac72e Bug 10006 - holding branch is not available to XSLT display
To test:

Use attached XSLT stylesheet for OPAC Results
 * set your OPACXSLTResultsDisplay to use the attached stylesheet. The path is the FULL PATH, from /, to the file.
 * be sure to copy MARC21slimUtils.xsl to the same folder, or change the path in the attached one to point to the correct path on your filesystem.

Verify that the OPAC results now show the holding branch instead of the home branch.

Possible fail states:

* no branch is shown (only call numbers, if given)
* the wrong branch is shown

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-25 22:14:23 -04:00
686fdae32c Bug 6554 QA Followup
Removing binmode, now encoding data in output_with_http_headers.
Replaced output_string by output_as_chars in XSLTParse4Display.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-01 18:51:49 -04:00
bf4337fa38 Bug 9873 - Quiet errors in the log from XSLT.pm
If XSLTResultsDisplay is enabled and items in your search results lack a
shelving location or a ccode errors will appear in the log complaining
of "uninitialized value in hash element." This patch adds a check on
these values to quiet the errors.

To test, find or create a record with items which have no shelving
location and/or no collection code. Perform a search the results for
which will include your record. Check for errors in the log.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Cleans up logs for result list quite a bit.
Passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-30 20:37:14 -04:00
2618c05568 Bug 9403: Material type icons not showing for XSLT default view in intranet
Implements the material type icons shown in the MARC21 XSLT result list
of the OPAC for the intrant result list.

Also adds the system preference DisplayIconsXSLT as an intranet analogue
for the OPAC system preference DisplayOPACiconsXSLT and corrects the
descriptions of both preferences in the syspref editor.

To test:
0) Run database update to add new system preference
1) Activate default XSLTResultsDisplay
2) Check the new system preference DisplayIconsXSLT shows up correctly
  and is activated by default. Compare descriptions between DisplayIconsXSLT
  and DisplayOPACiconsXSLT.
3) Check the intranet result list for icons showing up after 'Type:' and
  before the corresponding description. Detail pages should be showing
  the 'Type:' as before.
4) Turn off DisplayIconsXSLT.
5) Check the line containing 'Type:', format and audience information is now
  hidden from the result list.
6) Check that the 'Type:'line is also hidden from the detail page.

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

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-21 12:00:38 -04:00
Jonathan Druart
fad1f44d42 Bug 9367: Code optimization: CheckReserves is too often called
This patch rewrites the GetReserveStatus routine in order to take in
parameter the itemnumber and/or the biblionumber.

In some places, the C4::Reserves::CheckReserves routine is called when
we just want to get the status of the reserve. In these cases, the
C4::Reserves::GetReserveStatus is now called.
This routine executes 1 sql query (or 2 max).

Test plan:
Check that there is no regression on the different pages where reserves
are used. The different status will be the same than before applying
this patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-16 11:49:43 -04:00
Chris Cormack
57c6b26df0 Bug 8917 : Link tracking, changes to XSLT
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2013-03-07 11:14:22 -05:00
43c875b683 Bug 5079 - Make display of shelving location and call number in XSLT results controlled by sysprefs
* Don't show the Location line if there are no copies available, since it
  will inevitably be blank

* Also, don't show locations for Checked Out, Lost, Damaged, Withdrawn,
  On Hold or In transit items; it doesn't really make sense, since the
  items aren't actually there, and it results in repetitive listing of
  the shelving location

* Added system preference to display shelving location of an item on opac
  results. The system preference is called OpacItemLocation. I also moved
  the call number to a new line called Location along with the shelving
  location if it is enabled.

To Test:
  1) Run database update script to add syspref.
  2) Set OpacItemLocation to show locations or collection codes on the
     opac-search page.

  If it is working you should see the shelving location of the item
  before the call number. Multiple home branch shelving locations
  are seperated by a pipe character ( i.e. '|' ).

Based on code by Elliot Davis <tdavis@uttyler.edu>

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

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-07 11:05:00 -05:00
Jared Camins-Esakov
9ea2bb7eca Bug 8947: [SIGNED-OFF] XSLT fallback logic backwards
The logic for the XSLT fallback was backwards, which meant that
non-English installations of the CCSR theme were unable to use XSLT
stylesheets. This patch corrects the logic.

To test:
1) Switch to the ccsr OPAC theme.
2) Switch to a language other than English for the OPAC.
3) Turn on the default XSLT stylesheets for the OPAC.
4) Do a search or view a record that would result in something being
   displayed with XSLT. This will work after the patch, but not before.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised!

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-26 17:41:08 +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
Chris Cormack
cf7f5ecbea Bug 6886 - OPAC XSLT respecting single branch mode
This is only for the MARC21 XSLT at this stage, follow up patch for
UNIMARC will come

Conflicts:

	C4/XSLT.pm
	koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2012-09-05 10:32:00 +02:00
Gaetan Boisson
134445d7e5 Bug 8405 : add IntranetBiblioDefaultView and BiblioDefaultView in XSLT.pm
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-01 17:46:14 +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
Dobrica Pavlinusic
574f46fb19 Bug 7821 - fix C4::Templates::_current_language
Bareword "C4::Templates::_current_language" not allowed while "strict subs" in use at /home/oleonard/kohaclone/C4/XSLT.pm line 175.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fixes the problem.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-02 11:33:17 +02:00
Paul Poulain
f9207da8f2 bug 7821 follow-up: escaping {} in regexp 2012-03-29 17:23:50 +02:00
Dobrica Pavlinusic
f91bd36399 Bug 7821 - {langcode} will be replaced with current interface language
This makes bug 4032 support multi-language Koha installation which is important
for some of Koha users.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1) After update XSLT system preferences are set to 'default'. All views
(OPAC and staff, results and detail page) work and switching languages
selects the correct translated file.

2) Leaving empty works and normal views are used.

3) Putting in a single URL without placeholder works.

4) Putting in a URL with placeholder works. Created local directories
have to match the language codes.

NOTE: In order to make the URLs and patchs work, the Utils file needs to be
copied too.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-29 17:05:12 +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
Magnus Enger
20fd03724a Bug 7092 - Complete-subfield searches TraceCompleteSubfields syspref not working correctly
This patch adds a syspref UseICU for toggling between using "" and {} for
quoting in subject tracings. With normal Zebra indexing, "" must be used. With
ICU Zebra indexing, {} must be used.

This syspref interacts with TraceCompleteSubfields and TraceSubjectSubdivisions.

To test:

- marcflavour = MARC21
- make sure you have a record with a "complex subject", like
  "Internet -- Law and legislation"

Toggle UseICU, TraceCompleteSubfields, and TraceSubjectSubdivisions and check
that you get the expected results for the clickable links in the OPAC detail
view:

TraceCompleteSubfields   = Don't force
TraceSubjectSubdivisions = Don't include
UseICU                   = Not using
  opac-search.pl?q=su:"Internet"
UseICU                   = Using
  opac-search.pl?q=su:{Internet}

TraceCompleteSubfields   = Force
TraceSubjectSubdivisions = Don't include
UseICU                   = Not using
  opac-search.pl?q=su,complete-subfield:"Internet"
UseICU                   = Using
  opac-search.pl?q=su,complete-subfield:{Internet}

TraceCompleteSubfields   = Don't force
TraceSubjectSubdivisions = Include
UsingICU                 = Not using
  opac-search.pl?q=(su:"Internet") and (su:"Law and legislation.")
UsingICU                 = Using
  opac-search.pl?q=(su:{Internet}) and (su:{Law and legislation.})

TraceCompleteSubfields   = Force
TraceSubjectSubdivisions = Include
UseICU                   = Not using
  opac-search.pl?q=(su,complete-subfield:"Internet") and (su,complete-subfield:"Law and legislation.")
UseICU                   = Using
  opac-search.pl?q=(su,complete-subfield:{Internet}) and (su,complete-subfield:{Law and legislation.})

Check that clicking on the generated links gives the expected search results,
but with normal and ICU indexing. (I have actually not tested this with ICU, so
doing that before signing off is crucial.)

UPDATE 2012-03-16:

Changed the name of the syspref from TracingQuotes to UseICU after a suggestion
from Paul P., to make it more generally useful.

I have used "Using/Not using" instead of "Use/Don't use" in the description of
the syspref, to reflect the fact that this syspref will not change how Zebra
does its indexing - it's just a way of telling Koha how the indexing is
actually done.

I have also set UseICU = 1 in updatedatabase.pl, since that will preserve the
current behaviour of Koha, but UseICU = 0 in sysprefs.sql, since most new
installations will not have ICU activated.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-03-21 14:53:14 +01:00
MJ Ray
d4b132136c Bug 7476 Remove executable bit from files that probably should not be executed
Signed-off-by: Aleksa Vujicic <aleksa@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended to replace some copy-and-paste comments only with consent of MJR.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-03 14:22:15 +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
Chris Cormack
fa1a90fd4f Bug 7394 : Fixing scoping issue with XSLT processing. Also bailing out early for 404 inestead of doing unnessecary processing
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

I can confirm the bug and the solution.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Second sign-off from me, patch fixes display of detail page
for last record on a result page.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-06 12:29:43 +01:00
Srdjan Jankovic
6e07fd7b00 bug_2830: Remove reserve when checking out if the borrower is not the first one in the reserve queue
To test:
Create 4 holds on a bib, for patrons A, B, C, and D,

Check in the item to mark hold as waiting for patron A
Check out the item to patron B -> reserve for patron B should be removed
Check in the item to mark hold as waiting for patron A
Check out the item to Patron A, hold should complete normally
Check in the item to mark hold as waiting for patron C
Check out the item to patron D -> reserve for patron D should be removed.
Check in the item to mark hold as waiting for patron C
Check out the item to patron C, hold should complete normally
Check in the item -> there should be no more reserves.

We also tested:
Created 4 holds on a bib with two items, for patrons A, B, C, and D

All worked as expected.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-16 16:21:38 +01: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
04e97b57ff 6290: Fix warning on XSLT.pm
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2011-08-11 12:54:47 +12:00
Chris Cormack
75aa5398c5 Merge remote branch 'kc/new/enh/bug_4421' into kcmaster
Conflicts:
	C4/XSLT.pm
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	installer/data/mysql/it-IT/necessari/sysprefs.sql
	installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
	installer/data/mysql/updatedatabase.pl
2011-04-02 07:15:47 +13: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
Katrin Fischer
c0ca9f3413 Bug 5959: Add search link for analytics to serial records
This will work similar to 'Show volumes' links from traced series records and
set records. A link to search for analytics linked to serials.

A new syspref will be added: UseControlNumber.

This syspref will make it possible to determine, if $w and Controlnumber are
used for linking of records in bibliographic records.

If syspref is OFF (default), the search links will not use control numbers
but keywords.
If syspref is ON links will be built using Control-number and rcn index.

NOTE: 773$a is added to index Host-item. For testing on a dev installation:
copy record.abs to your koha-dev folder and reindex!

Rebased against 3.03.00.035 and a small typo fixed by Jared Camins-Esakov.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 20:23:30 +13:00
Doug Dearden
6c7f964c27 Bug 5738 Display 856u As Image
Add an option to the OPAC to display the URI that is stored in the 856u field
as an image instead of a text link.  This would be implemented in the OPAC XSLT
style sheets for the Results and Details pages, and would require that the
corresponding OPAC XSLT option be set.

This enhancement is designed to enable the staff to catalog images, then have
them appear on the resulting pages in the OPAC when searching.  Clicking on the
image would open it full size.  If the image option is in use, then the default
link text would be disabled.  Custom text would still appear if entered in the
"URLLinkText" option.

Add system preference "Display856uAsImage" with options of Results page,
Details page, Both Results and Details pages, Neither Results or Details page.

Notes for documentation manager:
There are two system preferences added for this enhancement:
OPACDisplay856uAsImage and Display856uAsImage.  These appear on the OPAC and
Staff Client screens under the System Preferences.

The preference can be set to one of four options:

Both Details and Results pages
Details page only
Neither Details or Results pages
Results page only

In addition to this option being set, the corresponding XSLT option must be
turned on. Also, the corresponding 856q field must have a valid MIME image
extension (e.g., "jpg") or MIME image type (i.e. starting with "image/"), or the
generic indicator "img" entered in the field.

As of 14 March 2011 the UNIMARC xslt display files also require a "0" in the
second indicator location of the 856u field for the links to be activated.  This
is not true for the MARC21 display files.

When all of the requirements are met, an image file will be displayed instead of
the standard link text. Clicking on the image will open it in the same way as
clicking on the link text.

Rebased and three original patches squashed into one on 30 March 2011 by Jared
Camins-Esakov.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Doug Dearden <dearden@sarsf.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 13:38:14 +13:00
Jared Camins-Esakov
36ca010cc4 Bug 4276: XSLT subject tracings only use subfield a
When XSLT is enabled, the subject tracings on the details view (both OPAC and
Intranet) previously only searched on the subfield 'a'. In addition, searches
failed when the tracing included parentheses, and the XSLT display did not
include subfields other than abcdvxyz, even for those 6xx tags that have other
subfields.

This patch adds a syspref: TraceSubjectSubdivisons. When
TraceSubjectSubdivisions is set to "Don't include" (default), the subject
tracings in the XSLT details view will only search on subfield 'a'. When
TraceSubjectSubdivisions is set to "Include", the subject tracings will search
on all subfields, not just subfield 'a'.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-28 09:47:05 +13:00
Jared Camins-Esakov
e18ddca9d4 Follow up for Bug 3326: previous fix broke searches when
This fix ensures that searches will still work when -x is not used when
reindexing Zebra.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Magnus Enger <magnus@bibkat.no>
Signed-off-by: Jane Wagner <jwagner@ptfs.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-17 09:21:54 +13:00
Jared Camins-Esakov
d52f3680f4 Bug 3326: Work around Zebra's handling of &amp; entities
When using XSLT mode, the OPAC results display will show "&amp;" instead of "&"
when Zebra is indexing in XML mode. This patch works around this by replacing
"&amp;" with "&" and then extends the previous fix to apply to all occurrences
of "& " instead of just the first.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-16 20:48:50 +13:00
Jared Camins-Esakov
4bc293c3aa Bug 5810: Subject tracings search complete subfields
This patch adds the syspref TraceCompleteSubfields. When TraceCompleteSubfields
is set to "force," clicking on links in non-authority controlled subject
tracings will only find other records where the entire subfields match. Leaving
it at "don't force" keeps the current behavior of doing a keyword search of the
subject indexes.

This patch implements complete-subfield subject tracings in MARC21 XSLTs (OPAC
and Staff) and all Normal mode interfaces. UNIMARC XSLTs have not been updated.

This patch also adds the syspref UseAuthoritiesForTracings. When set to "Do not"
tracings in the XSLT detail displays will never generate links using authority
numbers, but rather use the heading strings (NB: the tracings currently use only
subfield 'a' for generating links).

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jane Wagner <jwagner@ptfs.com>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-13 15:02:59 +13:00
326222e3f1 Bug 4072 Lost items aren't hidden on OPAC result page
When hidelostitems system preference is enabled, lost items are hidden on OPAC
detail page but are shown on result page. This patch modify MARC21/UNIMARC XSL
in order to take into account hidelostitems syspref on OPAC result page.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-12 12:52:57 +13:00
bfec5ef4c1 Bug 5727 Warning in log due to XSLT.pm
XSLT.pm add few syspref to MARCXML record send to be transformed by XSLT. If
one of those syspref doesn't exist, it generated a warning.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-14 09:46:20 +13:00
Katrin Fischer
9f688ad92b Bug 5370: Fix all references to koha.org
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-08 09:41:47 +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
d3b07c1889 More fixes for Bug 4423, Staff Client XSLT is just a copy of the OPAC one
- Adding material type icons from the OPAC side
- Adding OPAC View link
- Copying revised handling of MU from the OPAC
- Removing OPAC-specific markup

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-23 22:50:29 -04:00
Andrew Elwell
546a0244bb More POD cleanups
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 08:38:58 -04:00
e7f8cc8f5e bug 4403: look in appropriate theme/lang for bib display XSL
Note: approach used can be described as a hack at best; the current
language should probably become a session attribute.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-08 18:59:41 -04:00
Ian Walls
b86e4e5700 Fixes bug 4448: &'s in itemcallnumber
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-05 11:35:34 -04:00
Jane Wagner
6ecb2ddbb5 Bug 3788 XSLT does not obey viewISBD syspref
Modified XSLT.pm and MARC21slim2OPACDetail.xsl to obey the viewISBD syspref
setting in the OPAC.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:09:59 -04:00
Cindy Murdock Ames
7c7794d838 Fix for ampersand display problem in OPAC search results
This is a quick fix to XSLTParse4Display to make ampersands display
correctly in OPAC search results.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 11:12:34 -04:00
Lars Wirzenius
7279f55b60 Fix FSF address in directory C4/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:56 -04:00
Garry Collum
9fa69bff82 Bug 2655: Partial fix for Items on hold shelf showing as available.
Fixes the opac results (opac-search.pl), if using xsl to transform data.  I have no way to test UNIMARC results, if someone could test it for me.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-21 20:12:12 -05:00
Chris Cormack
a319a402f7 Removing noisy warn in C4/XSLT.pm
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 07:39:50 -05:00
Paul Poulain
9d1e7f43e1 (bug #4020) XSLT unimarc display
When using XSLT Display, and UNIMARC,
since marcFlavour is not used in encoding data, when data is true utf8, as_xml
fails on some subfields.

Moreover, because transformMARCXMLForXSLT edits some values in the marc record
and the PERL UTF8 is not handled by MARC::File::USMARC, it endsup in double
encoding the data.
Sending a patch to fix both issues.

This patch adds
    - two functions in  C4/Charset.pm
        NormalizeString (uses Unicode::Normalize)
        SetUTF8Flag (This function in my opinion belongs to MARC::Record, or at least MARC::File::USMARC)
    - edits C4::XSLT in order to cope with the correct marcflavour
    - edits C4::Search searchResults to use setUTF8Flag
2010-01-28 15:11:51 +01:00
David Birmingham
77141dab35 Translated & to &amp; in xmlrecord
If the homebranch tag had an & in its name, then the XML wouldn't parse
correctly.  As a result, if XSLT was turned on, "No copies available" would
always be displayed.
2009-12-20 14:26:35 +01:00