Bug 10982: fix link to IFLA UNIMARC documentation in Cataloging
In Cataloging, a ? opens a documentation page on IFLA web site. The current
implementation rely on the tag tab to select the appropriate IFLA
documentation web page. It doesn't work when UNIMARC tag are displayed
in a tab which digit is different for tag first digit.
To reproduce the bug:
- Modify default framework, put all 200 subfields in tab 1
- Add a new biblio record
- Click on ? on 200 field
=> Wrong IFLA page is opened
Apply the patch and retry...
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Simple fix. Work as described. No koha-qa errors
Test on UNIMARC install
1) Switched all 2xx tags to tab 1
2) press any 2xx ?, wrong page
3) patch applied
4) links are now correct
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Tue, 22 Oct 2013 05:15:07 +0000 (05:15 +0000)]
Bug 11002: (follow-up) use jQuery validator plugin
This patch uses the jQuery validator plugin introduced in
bug 6209 for two reasons:
[1] To supply validation for non-HTML5-compatible web
browsers.
[2] To force use of the validator plugin rather than
built-in validation for HTML5 browsers, which means
that our translations will be used.
Note that a version of the function to prevent double form submission
is used as the submit handler invoked when the validator plugin
is satisified that the form is complete.
To test:
[1] Same as the main test plan, but note that the validation
messages now appear inline rather than as pop-ups.
[2] Verify that the double form submission prevention still
works.
Jonathan Druart [Mon, 7 Oct 2013 08:41:24 +0000 (10:41 +0200)]
Bug 11002: simplify patron mandatory field validation
When the pref BorrowerMandatoryField is set and a librarian forget to
fill fields, a js popup appears with the following message:
"The following fields are mandatory: surname, etc."
The fields are not translatable.
Test plan:
- fill the pref BorrowerMandatoryField with something like:
title|zipcode|surname|cardnumber|branchcode
- go the members/memberentry.pl?op=add page
- verify you are not allowed to add the patron without filling all
mandatory fields.
Jonathan Druart [Mon, 7 Oct 2013 09:41:22 +0000 (11:41 +0200)]
Bug 11003: fix JS error on the staff cart page
A call to yuiToolbar breaks JavaScript code on the cart page.
Test plan:
- add some biblio to your cart
- open the cart
- a js error occurs (see it with firebug):
ReferenceError: yuiToolbar is not defined
- apply the patch
- retry and verify the error does not appear anymore.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.
Colin Campbell [Wed, 16 Oct 2013 09:09:12 +0000 (10:09 +0100)]
Bug 11058: fix compilation warning in C4::Record
A routine declares two lexical variables named $stylesheet.
This patch renames the second to keep code clearer and
avoid propagating compile time warnings
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised!
Given how easy it is to accidentally receive items from one invoice on
multiple invoices, the ability to merge invoices can be quite handy.
This patch adds that ability to Koha's Acquisitions module.
To test:
1) Apply patch.
2) Run unit test:
> prove t/db_dependent/Acquisition/Invoices.t
3) Create two invoices from the same vendor for merging, and receive at
least one order on each.
4) Do a search on the Invoices page that brings up both the invoices you
created.
5) Check the boxes next to the two invoices.
6) Click "Merge selected invoices."
7) Choose which invoice you want to keep (the default will be the first).
8) Click "Merge."
9) Confirm that the resulting invoice has all the orders you received
listed on it.
10) Sign off.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Merged several invoices sucessfully - with and without received
orders, open and closed. Works nicely.
Jonathan Druart [Fri, 26 Apr 2013 07:30:23 +0000 (09:30 +0200)]
Bug 10724: Pending orders: add basket group name in filters
This patch adds a new filter "basket group name" for pending orders
searches.
Test plan:
Try different filters and check that results are consistent.
Try to filter by basket group name.
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Applied on top of patches for bug 10723.
Passes all tests and QA script.
Note: It's a bit irritating that the basket name is not shown
in the list of pending orders, so there is no way to check the
results are correct without checking from another page.
Jonathan Druart [Wed, 14 Aug 2013 08:43:07 +0000 (10:43 +0200)]
Bug 10723: Merge GetPendingOrders and SearchOrders routines
In the C4::Acquisition module, 2 routines do the same work. This patch
merges these 2 routines.
Test plan:
test the acqui/orderreceive.pl, acqui/uncertainprice.pl
and serials/acqui-search-result.pl, acqui/parcel.pl scripts.
Note: on acqui/parcel the basket filter is a search on basket name (was
on basket id, which was not relevant).
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pm, no adverse bahaviors noted. All sub calls updated.
Owen Leonard [Mon, 21 Oct 2013 00:52:06 +0000 (17:52 -0700)]
Bug 11060: (Bootstrap theme) fix incorrect rendering for right to left languages
The right-to-left CSS copied over from the prog theme does is not
relevant to the redesigned templates. This patch updates the OPAC's
right-to-left CSS and adds a couple of other right-to-left CSS files to
override the default Bootstrap and jQueryUI CSS.
To my eye this looks correct, but I don't speak Arabic.
To test you must have a set of right-to-left templates, like
ar-Arab, installed for the Bootstrap theme. At this time it is necessary
to download the po file to your misc/translator/po directory. Again
using ar-Arab as an example:
Open the OPAC, switch to that right-to-left language, and reload to
refresh the changed CSS. Confirm that it looks like right-to-left is
working.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
As far as I can tell it looks very well.
No koha-qa errors
1) Downloaded arabic bootstrap PO
2) Installed ar-Arab language, enabled on OPAC
3) Tested as anonymous user and logged in one, all pages look
well: cart, advanced search, user tabs.
I sent an email to Karam Qubsi asking his opinion.
But for me it's ok
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
I was testing this at the same time as Bernardo, so I will Pass QA on
it, instead of signing it off
Galen Charlton [Sun, 20 Oct 2013 20:55:06 +0000 (20:55 +0000)]
bug 10016: munge history in SCO to discourage resubmitting user login
This patch uses history.replaceState (introduced in HTML5) to manipulate
the browser history to encourage returning to the SCO patron barcode
form if the back button is used.
Note that a side effect of this patch is that if the user uses
the help link, they will be prompted to enter their barcode
again. It may be better to put the help inline with the rest
of the SCO forms.
To test:
[1] Start a web-based self-check session.
[2] Enter a patron barcode.
[3] Allow the self-check session to time out.
[4] Use the back button. You should get the patron barcode
entry form; you should not be prompted to resubmit form input.
[5] Enter a patron barcode, perform some transactions, then
use the finish button.
[6] Next, use the back button. You should get the patron barcode
entry form.
Galen Charlton [Sun, 20 Oct 2013 17:13:22 +0000 (17:13 +0000)]
Bug 10016: force zero browser-side caching of SCO pages
This patch makes the web-based self-check module pages
specify that no browser (or proxy caching) occur at all.
This prevents a security issue where letting the SCO session time out,
then hitting the back button allowed one to view the previous
patron's session.
This patch adds an optional fifth parameter to output_with_http_headers(),
and output_html_with_http_headers(), a hashref for miscellaneous
options. One key is defined at the moment: force_no_caching, which if
if present and set to a true value, sets HTTP headers to specify no
browser caching of the page at all.
To test:
[1] Start a web-based self-check session and optionally perform
some transactions.
[2] Allow the session to time out (it may be helpful to set
SelfCheckTimeout to a low value such as 10 seconds).
[3] Hit the back button. You should not see the previous patron's
self-check session.
[4] Verify that prove -v t/Output.t passes.
D Ruth Bavousett [Sun, 20 Oct 2013 17:23:44 +0000 (12:23 -0500)]
Bug 8070: improve MARC preview display for RTL languages
The Right Answer, according to the cataloger I spoke to,
is to make it LTR when doing "raw" MARC display.
To test:
1) Install this patch, then run misc/translator/translate install ar-Arab
2) search for a bib in the staff client.
3) Switch to Arabic, and click the link to the left of "MARC Preview"
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
At first glace I was unsure about hard-coding this style in the
template. Further testing indicated that this is required as the
showmarc template doesn't inherit any of the CSS from the containing
page.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mathieu Saby [Sun, 17 Mar 2013 13:54:12 +0000 (14:54 +0100)]
Bug 9830: Fix some indexes in UNIMARC item indexing
With this combination of sysprefs, and a UNIMARC configuration, it was
impossible to search on location, barcode and ccode indexes :
QueryWeightFields is activated
QueryAutoTruncate only if * is added
But in UNIMARC, location, barcode and ccode (995 $e,$f,h) were indexed
only as "words". They need to be indexed also as "phrase".
Additionnaly, in UNIMARC, information about damaged and withdrawn status
of items is not indexed, while it is done in MARC21.
This patch
- add 2 new indexes for 995$1 (damaged) and 995$3 (withdrawn)
- index location, barcode and ccode as "phrase" as well as "words"
Indexing of items in UNIMARC could be improved later. So this patch also
add comments explaining the origin of Koha 995, I think it could be
useful for further changes.
To test, on a UNIMARC configuration :
A. indexed with GRS-1
1) Set sysprefs QueryWeightFields as "activated" and QueryAutoTruncate
as "only if * is added"
2) Select location index in advanced search and search for a value
existing in your records in 995$e => 0 results
3) Apply patch
4) Rebuild zebra
5) Select location index in advanced search and search for a value
existing in your records in 995$e => x results
6) Mark an item as withdrawn; search "withdrawn:1" => x results, and
among them the biblio to which the item is attached
7) Mark an item as damaged ; search "damaged:1" => x results, and among
them the biblio to which the item is attached
B. indexed with DOM
Do the same operations
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors
Test
Apply the patch
Begin with GRS-1
Full reindex
Search by location, no results
cp files biblio-*-indexdefs.xml and record.abs to destination on etc/zebra
Full reindex
Search by location, got results
Switch to DOM
reset files
Full reindex
Search by location, no results
cp files
Full reindex
Search by location, results !
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Recent changes to LDAP broke auth_by_bind in many situations. This bug
resets the behaviour to what it used to be, however also allows the new
behaviour by adding the 'anonymous_bind' parameter to the LDAP config.
Testing:
1) Find an LDAP configuration that was broken recently that uses
auth_by_bind
2) Apply this patch
3) See if it works again.
Additionally, testing the original path in the case of 'anonymous_bind'
being set should probably be done too, but I have no idea about the LDAP
server config for that.
Fridolyn SOMERS [Thu, 28 Feb 2013 17:21:18 +0000 (18:21 +0100)]
Bug 9739: more options for serialsUpdate.pl
Script serialsUpdate.pl must be set in crontab to run daily.
It checks serials that are late, modifies status and adds a note.
This patch adds some options :
--note : defined note, a defaut one is used if not defined
--no-note : disable automatic note
--verbose : used to control output
This patch also implements confirmation option "-c" who whas present but not used.
Test plan :
Run script on a database with late serials :
- serialsUpdate.pl -h
=> you get help text in output
- serialsUpdate.pl --man
=> you get full help
- serialsUpdate.pl -v
=> you get output of changed serials but database has not changed
- serialsUpdate.pl -c -v
=> you get output of changed serials and database has changed, with note "Automatically set to late"
- serialsUpdate.pl -c
=> database has changed without anything in output
- serialsUpdate.pl -c --note "LATE"
=> database has changed, with note "LATE"
- serialsUpdate.pl -c --no-note
=> database has changed with no note
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No koha-qa errors.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
New options behave as described.
There are some existing problems with this script that I have noted
directly on the bug report.
Katrin Fischer [Sun, 29 Sep 2013 16:45:06 +0000 (18:45 +0200)]
Bug 10969: Fix sample itemtypes for translated installers
To test:
- Install the specific language and run the web installer.
Or:
- Truncate or delete all from the itemtypes table in your database.
- Try to run the complete SQL in the itemtypes sample files.
Verify the table is filled correctly.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works for all languages. No koha-qa errors.
Tested removing itemtypes, then loading new file,
and checking on staff.
For de, es, nb, and pl no problems. For ru I disable foreign
keys constraint before TRUNCATE and reenable it afterwards.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8368: fix email lists from OPAC when using non-English templates
This patch ports to list sending by email, the technique used in sending
cart, i.e. (1) format email in HTML, and (2) transform it into Text with
TT filter html2text.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a very annoying translation bug successfully.
Also passes all tests and QA script.
To test:
- Add a few records to a shelf, ideally use some with diacritics.
- Send shelf from English templates, verify email is ok
- Send shelf from translated templates (de-DE or similar) - verify
email content is broken.
- Apply patches, update po files and reinstall the language.
- Send shelf from English templates again, verify there is no
regression.
- Send shelf form translates templates - verify this email is now
also working correctly.
Patch also changes the name of the file attachement from shelf.iso2709
to list.iso2709.
Jonathan Druart [Mon, 9 Sep 2013 12:12:05 +0000 (14:12 +0200)]
Bug 10843: fix crash that can occur when confirming hold if ReservesMaxPickUpDelay is undefined
Test plan:
1) set an empty string for the ReservesMaxPickUpDelay pref
2) place a hold on an item
3) check in the item
4) click on "Print and confirm"
5) an error occurs
> The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
6) apply the patch
7) repeat steps 1 to 4
8) the error does not occur anymore.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
An empty string didn't do it for me, I had to set the
variable for the systempreference to NULL. I am not sure
if this can happen when editing from the interface, but
this change should not have any ill side effects and it has
unit tests!
Owen Leonard [Wed, 11 Sep 2013 15:51:54 +0000 (11:51 -0400)]
Bug 10850 - give quick spine label template page its own ID
Out of three conditional cases for display of the <body> tag one lacked
a unique ID. This patch copies the unique ID from the other cases to the
one lacking.
This patch also corrects the case of an "onload" attribute which should
follow XHTML style rules.
To test, the patch for Bug 9618 must be applied. Set the
SpineLabelAutoPrint system preference to "[don't] automatically pop up a
print dialog." Submit a barcode on the quick spine label creator and
view source. The <body> tag should have an ID attribute.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 17 Jul 2013 13:02:43 +0000 (15:02 +0200)]
Bug 10038: fix doubled 'default' entry when creating a new authority type
Test plan:
- Create a new authority type
- Click MARC structure
- Verify the pull down has only 1 entry for Default
- Go on the authority type home (admin/authtypes.pl)
- Click on the "MARC structure" link for the default type
- Verify the pull down has only 1 entry for Default
This patch adds a sort (on the authtypecode) for these 2 lists.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.
When creating a new framework it would be better to have Default
on top, but one is way better than two :)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Agreed, one is better than two :)
All tests and QA script pass.
Jonathan Druart [Mon, 23 Sep 2013 15:07:09 +0000 (17:07 +0200)]
Bug 10935: fix breakage of CSV acq exports when using a non-English translation
To reproduce:
- cd misc/translator
- ./translate update LANG
- ./translate install LANG
- go to the Koha mainpage and change the language.
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
basketgroup.
The headers is followed by the first basketgroup information. There is
no carriage return.
It looks like it is caused by a routine used by the translator script
(TmplTokenizer::string_canon).
To test this patch:
- apply it
- cd misc/translator
- ./translate -f update LANG
- translate headers in your po file
- ./translate -f install LANG
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
basketgroup.
- verify that the csv looks good now.
- same thing for basket.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good idea and seems to work - just fixing a small glitch
with the first entry of the list in a follow-up.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 13 Sep 2013 14:28:39 +0000 (16:28 +0200)]
Bug 10884: circulation table: fix odd behavior on checkboxes
Test plan:
Play with renew, check in and export checkboxes.
The expected behavior is: the renew and check in cb should work as radio
button, without affecting the export cb.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only.
Amended test plan:
* Create a CSV profile under Tools > CSV profiles
* Add CSV profile to system preference ExportWithCsvProfile
1) Check export checkbox
2) Check check in for same item
3) Switch to Renew
The export checkbox should not get unchecked when switching
between renew and check in.
Owen Leonard [Mon, 7 Oct 2013 19:12:03 +0000 (15:12 -0400)]
Bug 10309: (follow-up) Add changes from Bug 8712, "and" labels in advanced search
This patch adds the changes from Bug 8712 to the new theme. Some HTML
markup errors have also been corrected. From Bug 8712:
"The "and" label not only improves the accessibility but also gives the
user an idea that the operation between multiple search fields is a
boolean "AND" by default."
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
"and" looks well on advanced search. No errors
Owen Leonard [Mon, 7 Oct 2013 18:45:06 +0000 (14:45 -0400)]
Bug 10309: (follow-up) Update for Bug 10856, improve shelf browser
This patch updates this theme with the changes made in Bug 10856.
Because of the way JavaScript is loaded in the new theme, the JS in the
shelfbrowser include had to be moved to the opac-detail template.
Test plan from that bug:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors
Disabled JavaScript on Firefox (about:config, javascript.enable -> false)
Browse shelf works by reloading.
Unit test report success.
Owen Leonard [Mon, 7 Oct 2013 14:39:19 +0000 (10:39 -0400)]
Bug 10309: (Follow-up) Applying changes from Bug 10349
This patch applies the changes from Bug 10349, Don't show empty
Descriptions/Title notes tabs in OPAC and staff.
"The descriptions/title notes tab appears on the detail page in both
staff client and OPAC even if there are no notes. This is probably a
relic of the pre-T:T days when it wasn't possible to use || in an IF.
This patch adds a check for the various variables which might trigger
the display of the tab.
To test, apply the patch and view records in the OPAC and staff client
which do and do not have title notes attached (whether that be in the
MARC record or in the biblio.notes column). In the OPAC Syndetics
content should also be tested if possible. The descriptions/title notes
tab should only appear if there is content."
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors
Tested on OPAC, records without notes don't show title notes tab.
Owen Leonard [Mon, 7 Oct 2013 14:33:03 +0000 (10:33 -0400)]
Bug 10309: (follow-up) Updates for Bug 6594, Schema.org structured data
This patch adds the changes from Bug 6594:
"To support schema.org processors, such as Google, Bing, and Yandex,
structure our data so that it has machine-readable attributes. This pass
declares the CreativeWork sub-types as well as Product for the main
bibliographic record details, and uses the Offer type for holdings
information per the W3C Schema Bib Extend community group discussions."
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested against linter.structured-data.org, microdata present
No errors.
Owen Leonard [Wed, 22 May 2013 13:37:31 +0000 (09:37 -0400)]
Bug 10309 - New OPAC theme based on Bootstrap
The goal of this theme is to provide a fully-responsive OPAC which
offers a high level of functionality across multiple devices with varied
viewport sizes. Its style is based on the CCSR theme, with elements of
the Bootstrap framework providing default styling of buttons, menus,
modals, etc.
The Bootstrap grid is used everywhere, but Bootstrap's default
responsive breakpoints have been expanded to allow for better
flexibility for our needs.
All non-translation-depended files are in the root directory of this new
theme:
css, images, itemtypeimg, js, less, and lib. Languages.pm has been
modified to ignore the new directories when parsing the theme language
directories.
This theme introduces the use of LESS (http://lesscss.org/) to build
CSS. Three LESS files can be found in the "less" directory: mixins.less,
opac.less, and responsive.less. These three files are compiled into one
CSS file for production: opac.css. "Base" theme styles are found in
opac.less. A few "mixins" (http://lesscss.org/#-mixins) are found in
mixins.less. Any CSS which is conditional on specific media queries is
found in responsive.less.
At the template level some general sturctural changes have been made.
For the most part JavaScript is now at the end of each template as is
recommended for performance reasons. JavaScript formerly in
doc-head-close.inc is now in opac-bottom.inc.
In order to be able to maintain this structure and accommodate
page-specific scripts at the same time the use of BLOCK and PROCESS are
added. By default opac-bottom.inc will PROCESS a "jsinclude" block:
[% PROCESS jsinclude %]
Each page template in the theme must contain this block, even if it is
empty:
[% BLOCK jsinclude %][% END %]
Pages which require that page-specific JavaScript be inserted can add it
to the jsinclude block and it will appear correctly at the bottom of the
rendered page.
The same is true for page-specific CSS. Each page contains a cssinclude
block:
[% BLOCK cssinclude %][% END %]
...which is processed in doc-head-close.inc:
[% PROCESS cssinclude %]
Using these methods helps us maintain a strict separation of CSS links
and blocks (at the top of each page) and JavaScript (at the bottom). A
few exceptions are made for some JavaScript which must be processed
sooner: respond.js (https://github.com/scottjehl/Respond, conditionally
applied to Internet Explorer versions < 9 to allow for layout
responsiveness), the _() function required for JS translatability, and
Modernizr (http://modernizr.com/, a script which detects browser
features and allows us to conditionally load JavaScript based on
available features--or lack thereof).
Another new JavaScript dependency in this theme is enquire.js
(http://wicky.nillia.ms/enquire.js/), which lets us trigger JavaScript
events based on viewport size.
I have made an effort to re-indent the templates in a sane way,
eliminating trailing spaces and tabs. However, I have not wrapped lines
at a specific line length. In order to improve template legibility I
have also tried to insert comments indicating the origin of closing tags
like <div> or template directives like [% END %]:
</div> <!-- / .container-fluid -->
[% END # / IF ( OpacBrowseResults && busc ) %]
TESTING
Proper testing of this theme is no easy task: Every template has been
touched. Each page should work reasonable well at a variety of screen
dimensions. Pages should be tested under many conditions which are
controlled by toggling OPAC system preferences on and off. A variety of
devices, platforms, and browsers should be tested.
This corrects a failing test and follows a recommendation
by the maintainer of DBIx::Class. This patch also
adds a couple new directories for t/00-testcritic.t to
check.
Galen Charlton [Mon, 14 Oct 2013 22:31:37 +0000 (22:31 +0000)]
Bug 10565: (follow-up) add new user permission for patron list management
This patch adds a new user permission for patron list management,
tools => manage_patron_lists.
This closes a security issue with the original patch series where
patron lists and their contents could be retrieved and modified
without requiring authentication of any sort.
Kyle M Hall [Wed, 10 Jul 2013 13:38:40 +0000 (09:38 -0400)]
Bug 10565: Add a "Patron List" feature for storing and manipulating collections of patrons
The patron lists feature is somewhat similar to the record lists feature
in that it allows a librarian to create a list of patrons for later
retrieval and manipluation. These lists can then be used with the batch
patron modification tool.
Test Plan:
0) Apply the patch for Bug 8798
1) Apply this patch
2) Run updatedatabase.pl
3) Access the patron lists feature from Koha's Tools menu.
4) Create a new list via the "New patron list" button.
5) For this list, click the "Edit" button, and change the list name.
6) For this list, click the "Add patrons" button, and search for and
add some patrons to your list.
7) For this list select some patrons to remove them.
8) Try both adding some new patrons, and removing some old patrons
as a single action.
9) Click the "Patrons" link on the Koha toolbar
10) Search the patrons, or browse by letter to get patron results
11) Check the checkboxes next to one or more patrons, and add the
selected patrons to your existing list.
12) Change the "Selected patrons" pulldown to "All resultant patrons"
and add them to your list.
13) Check the checkboxes next to one or more patrons, and add the
selected patrons to a new list.
14) Try manipulating a list of patrons using the batch patron
modification tool.
15) Go back to the Patron Lists feature and delete your lists.
16) Run 'prove t/db_dependent/PatronLists.t'
Galen Charlton [Mon, 14 Oct 2013 20:57:24 +0000 (20:57 +0000)]
bug 8798: (follow-up) pass DB connection params to DBIC schema updater explicitly
This patch changes update_dbix_class_files.pl so that the connection
parameters to the reference database must be passed explicitly via
command-line switches, rather than grabbing them from the current Koha
context.
The purpose of this is to intentionally put up a roadblock to reduce
the chance that a developer (or release manager) accidentally updates
the schema files to include local testing cruft such as temporary
tables.
Usage is now as follows:
[1] Create an empty database
[2] Load the schema creation script into it, e.g.,
mysql -u dbic -pdbic dbic < installer/data/mysql/kohastructure.sql
Kyle M Hall [Thu, 29 Aug 2013 16:23:39 +0000 (12:23 -0400)]
Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable patronimages
4) Verify patron images are still displaying correctly
5) Test deleting a patron image
6) Test adding a patron image from moremember.pl
7) Test adding a patron image from tools/picture-upload.pl
Kyle M Hall [Fri, 21 Sep 2012 16:16:04 +0000 (12:16 -0400)]
Bug 8798: (follow-up) rename schema class updater script
updateDatabase.pl is a bit too close to updatedatabase.pl in installer
and may cause some confusion. I would suggest update_dbix_class_files.pl
as a unambiguous and descriptive name for this file.
Elliott Davis [Sun, 2 Sep 2012 13:45:40 +0000 (08:45 -0500)]
Bug 8798: DBIx::Class base classes for all Koha tables
* Added base class files for all tables in koha using
DBIx::Class::Schema::Loader.
* Added a (very basic) test file for C4::Context
* Also added dependencies in required files.
To Test:
[1] Install patch
[2] Make sure you can still connect to Koha
[3] You may optionally run this test script:
use Koha::Database;
use Data::Dumper;
my $db = Koha::Database->new();
my $schema = $db->schema();
print Dumper($schema->resultset("Borrower"));
If you run this file you should get a DBIx dump of the borrowers table.
Kyle M Hall [Wed, 4 Sep 2013 16:14:07 +0000 (12:14 -0400)]
Bug 10820: display item status as lost if item is both lost and on loan
In the OPAC, if an items is both lost and checked out, it will show as
lost on the search results, and checkout out in the record details. The
lost status should take precedence over the checked out status, as the
checked out status may lead a patron to believe the book may return
soon.
Test Plan:
1) Check an item out to a patron
2) Set it to lost ( requires itemlost to be revealed in the framework
for the items editor ).
3) Rebuild your zebra indexes
4) Run a search where that item is in the results list
5) Note the item is marked as lost
6) View the record details
7) Note the item is listed as "checked out"
8) Apply this patch
9) Repeat steps 4-6, note the item is now listed as lost
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fridolyn SOMERS [Tue, 6 Aug 2013 10:13:34 +0000 (12:13 +0200)]
Bug 10689: make public note appear in subscriptions search
In a serials module, when searching subscriptions, the results table as
a "Notes" column.
In TT code, you see that it tries to display public note
"subscription.notes" and internal note "subscription.internalnotes".
The internal note is displayed well but not the public note.
You can see the 2 notes in serial details in summary tab.
The problem commes from the SQL query. A join is perform on subscription
and biblio, both containing a "notes" column.
This patch solves the problem by using a alias in query for both columns
(biblio.notes is acutally not used in template but could be).
Test plan :
- Edit a subscription
- Add public and internal notes. For example : "too busy" and "on holiday"
- Perform a subscription search that returns this subscription
=> "Notes" column contains both notes. For example : "too busy (on holiday)"
- Test with only public note
- Test with only internal note
Works as described.
Signed-off-by:Mathieu Saby <mathieu.saby@uhb.fr> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Works as described, fixes a bug as the templates show that
the intention was to display both notes in the column.
Jonathan Druart [Tue, 10 Sep 2013 13:24:07 +0000 (15:24 +0200)]
Bug 10854: add ability to export serial claims using CSV profile.
Test plan:
- Create a CSV profile (or use the default one) with a type 'sql'.
- Go to serials/claims.pl, select the wanted CSV profile and click on
the "Export selected items data".
- Verify the CSV file is correctly generated.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors
On top of 10853 (solving merge conflict)
Need to do homework to test. Add subscription and serial claim
notice.
1) Create a new CSV profile, type SQL, copy sample fields
2) Go to claims, select vendor
3) Go to Export selected items with created profile
4) CSV (in my case I use | as separator) download successfully
5) All fields present, file correct
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as advertised, keeps existing format by porting it to
a SQL profile.
Jonathan Druart [Tue, 10 Sep 2013 13:20:09 +0000 (15:20 +0200)]
Bug 10853: Add DB field export_format.type ('marc' or 'sql').
This patch:
- adds a new column 'type' to the export_format table.
- renames the field name export_format.marcfields with
export_format.content.
Test plan:
- Check that existing profiles have the type "marc" selected by default
- Create a new profile with a type "sql"
- Save and verify the profile is correctly displayed when you select it.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. koha-qa reports Small tabs errors,
corrected in followup
Test:
1) go to Tools > CSV profiles, Create profile, current
2) Apply patch, run updatedatabase
3) Go to Tools > CSV profiles, new option present
old profile with type MARC
4) Create new profile MARC, save and show correct
5) Create new profile SQL, save and show correct
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass with all 3 patches applied.
Works as described. Functionality for SQL profiles will be
added by another patch. For now it's possible to add/edit/delete
them.
Existing CSV profiles can still be exported correctly.
Galen Charlton [Fri, 11 Oct 2013 01:46:47 +0000 (01:46 +0000)]
Bug 10240: (follow-up) don't display patrons as lost or gone-no-address incorrectly
Because borrowers.lost and borrowers.gonenoaddress are nullable, when
downloading patron information for an offline patron sync, convert null
values to zero.
To test:
[1] Set borrowers.lost to NULL for a patron.
[2] Do an offline sync, then disconnect network access (or
stop the webserver) and enter the offline interface.
[3] Try checking out to the test patron. A warning will
(incorrectly) disply stating that the patron's card is lost.
[4] Apply the patch.
[5] Do steps 2 and 3 again. This time, there will be lost card
warning.
Bug 10240: (follow-up) correctly record fines and fix label
At some point in rebasing I managed to remove the part of the code
that saved fine payments. This patch re-adds that feature. This patch
also corrects the label on the check out tab to not mention partial
names for checkouts when offline, and partial name searches are not
supported in offline circ.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10240: (follow-up) warn when patron's card is expired
This patch improves the alert messages to be slightly better English
and warns the librarian if a patron's card has expired. Like all alerts,
this is non-fatal since in the case of network failure there is no
particular reason to expect that the offline database is current.
To test this particular patch you can try checking something out to an
expired patron, otherwise test plan remains the same as above.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>