Galen Charlton [Fri, 30 May 2008 19:37:33 +0000 (14:37 -0500)]
kohabug 2186 - improve display of empty import batches
[1] Display the "No records have been staged" message only
if no import batches exist.
[2] When displaying a batch that has no bibs in it, display
a "There are no records in this batch to import". Also,
do not display the "import record into catalogue" button
for an empty batch.
[3] Add CSS class "problem" to both messages.
Documentation changes: minor; only required if screenshots
exist of the manage staged MARC records page that has no
import batches on it.
Joshua Ferraro [Fri, 30 May 2008 18:56:17 +0000 (13:56 -0500)]
From HDL:
I agree that opac-suggestions.tmpl modification is Not required any longer.
But still, the modification in opac-suggestions.pl is really necessary.
If you donot do that, ppl are presented with ALL suggestions and not
their suggestions by default, which is not what My Suggestions suggests.
Joe Atzberger [Thu, 29 May 2008 18:15:23 +0000 (13:15 -0500)]
Repair Labels code to accomodate patroncards. Purged EXPR.
Major FIXME's still remain, like the use of GET instead of POST.
The code is also a bit too INCLUDE-happy to net good performance.
The entire mechanism of adding to a batch should probably be proper
AJAX instead of the GET-centric opener.location approach.
Joe Atzberger [Thu, 29 May 2008 13:59:25 +0000 (08:59 -0500)]
minor cleanup, remove $sth->finish's. No documentation impact.
For details: see http://search.cpan.org/~timb/DBI-1.14/DBI.pm
"There's no need to call finish if you're about to destroy or re-execute the statement handle."
In all these cases the sth is falling out of scope, about to be destroyed.
Galen Charlton [Wed, 28 May 2008 17:08:47 +0000 (12:08 -0500)]
kohabug 2164 - display of guarantor relationship
When editing a child or professional patron, display
the drop-down of relationship types only if at least
one relationship type is defined by the borrowerRelationship
syspref.
Joe Atzberger [Thu, 29 May 2008 01:31:28 +0000 (20:31 -0500)]
Tags AJAX integration on OPAC details page, so it behaves like results.
Also, prevent duplicate tags (same user, biblio and term). Strip
leading/trailing whitespace from term. Block whitespace terms.
The CSS for details could be enhanced to emphasize tagstatus more.
Joe Atzberger [Tue, 27 May 2008 23:06:01 +0000 (18:06 -0500)]
Fines repair. Make fines2.pl work, give feedback, improve comments and perldoc.
Remove $dbh->disconnect statements as counterproductive.
Prevent description field from begining with whitespace.
Added robust debug elements. Test script behavior with:
perl misc/cronjobs/fines2.pl -v
and:
mysql> select * from accountlines;
Joe Atzberger [Tue, 27 May 2008 23:05:57 +0000 (18:05 -0500)]
Commented out fixaccounts (not used anywhere). Also improved getnextacctno.
You can test getnextacctno like:
perl -e 'use C4::Accounts; print getnextacctno(33), "\n";'
where 33 is a borrowernumber out of the accountlines table. Get that number like:
mysql> select borrowernumber,accountno from accountlines LIMIT 100;
Note: we CANNOT rely on window.close in onSubmit or $().submit to close our popups.
On a relatively slow connection with a relatively large POST, commonly the close finishes
*before* the POST completes, as reported with our New Zealand clients. Despite success in
trivial cases, this should be obvious, since the event is necessarily before the submission.
It also assumes success and prevents any kind of error feedback. Other popups are likely
to exhibit this same defective behavior.
Some FIXME's outstanding: need to allow users to delete their own comments,
need to enforce and feedback on max comment length.
Joe Atzberger [Fri, 23 May 2008 07:40:49 +0000 (02:40 -0500)]
Unescape Comment, now that we trust Scrubber to block bad markup.
Obviously if we are going to allow good markup, we can't then escape it.
Documentation reference: allowed tags for comments are:
br b i em big small strong
Joe Atzberger [Wed, 21 May 2008 06:36:05 +0000 (01:36 -0500)]
Tags AJAX and JSON for OPAC side.
Note, all Tags js will live under KOHA.Tags namespace.
See opac-tags.pl perldoc for AJAX/JSON examples. The capability is already
there to be very web-servicey, even moreso than the current OPAC implementation
will utilize.
Joe Atzberger [Mon, 19 May 2008 21:23:35 +0000 (16:23 -0500)]
Add AJAX output sub, EXPORT_TAGS and enable loop_context_vars for HTML::Template::Pro.
The loop_context_vars will be very useful in display. They are:
__first__, __last__, __inner__, __odd__, __counter__.
Note: apparently __even__ does not exist, so instead use something like:
<!-- TMPL_UNLESS NAME="__odd__" -->
Frederic Demians [Tue, 20 May 2008 20:06:58 +0000 (22:06 +0200)]
Facets (current) translatable via template
This patch allows to translate facets label with standart
templates / PO files. Facets are still hard coded in Koha.pm.
Template wait those hard coded facets: Topics, Places, Titles,
Autors and Libraries.
Owen Leonard [Thu, 22 May 2008 14:49:40 +0000 (09:49 -0500)]
Terminology correction: cancelled -> withdrawn. Also adding dateformat variable to new holds queue script to allow correct table sorting with metric dates.
Galen Charlton [Tue, 20 May 2008 16:09:16 +0000 (11:09 -0500)]
various bugfixes for MARC21 Z39.50 targets
[1] Added MARC-8 as an encoding choice on the target
administration page.
[2] Fixed TMPL coding errors.
[3] Set the correct encoding (as it happens, 'MARC-8')
for all of the English sample Z39.50 targets.
Documentation note: due to this patch and the ones from
Frederic, screenshots of the page for editing a Z39.50
target should be redone.
[1] Increase sleep interval between checks of zebraqueue
from 0.01 seconds to 0.50.
[2] Batch up commits of changes to the zebraqueue table
[3] If the same record appears multiple times in the queue,
handle only once.
[4] Properly postpone failures to process record deletes to
avoid spinning.
[5] Correct how queue entries are marked done - avoid skipping
an authority record update, e.g., if it has the same
ID number as a bib that was updated.
[6] Added a FIXME about a possible later enhancement to
batch up updates so that Zebra isn't told to commit
after each record.
Owen Leonard [Tue, 20 May 2008 12:50:22 +0000 (07:50 -0500)]
Allowing delete-biblio menu item to trigger javascript warning. Style now mimicsa disabled menu item. Addresses Bug 2135, "Cannot Delete MARC Records."
Joshua Ferraro [Tue, 20 May 2008 17:36:40 +0000 (12:36 -0500)]
Final update to holds queue work: adds link to holds queue
from circulation dashboard, creates new sysprefs, assigns
the sysprefs to the proper tab in sysprefs (Circulation),
updatedatabase changes to do the previous, and fixing one
redundent limit in the query for build_holds_queue.pl
Joshua Ferraro [Tue, 20 May 2008 15:58:24 +0000 (10:58 -0500)]
Adds a cron script to be run periodically that populates
the tmp_holdsqueue table. This is an alternative holds
targeting workflow that is more suitable for multi-location
libraries than the default holds picklist report.
Note to documentation writers: this summary should be
added to any holds documentation as an overview of
the avaialable methods for holds fulfillment.
This alternative holds workflow assumes an
expectation that the system should target a specific
item for a given hold request, attempt to fulfill the
hold with that item, and if unable to fulfill, select
an available item at another location to fulfill the
hold.
This is quite different than the default Koha behavior
which uses a 'broadcast' method of hold fulfillment.
How it works:
This script weights available locations for holds based
on options specified in two system preferences:
StaticHoldsQueueWeight
Allows the library to specify a list of library
location codes -- if used alone, it will rank the
list statically, selecting the top-ranking available
location to be added to the picklist.
RandomizeHoldsQueueWeight
If RandomizeHoldsQueueWeight and StaticHoldsQueueWeight
are set, the list of library codes in the
StaticHoldsQueueWeight syspref are randomized rather
than statically ranked. If RandomizeHoldsQueueWeight
alone is set, the list of all available library codes
is used to randomize the weight.
If neither syspref is set, the list is statically
ranked according to how they are pulled out of the system
database.
NOTE: This has not yet been tested with item-level holds
Joshua Ferraro [Tue, 20 May 2008 14:36:26 +0000 (09:36 -0500)]
DB Update .086: adding new table tmp_holdsqueue,
used for reporting picklist for holds in multi-location
libraries. This is a temporary workaround to a longer-term
post-3.0 cleanup of the holds process.
Following this will be a cron job for managing the
holds picklist queue as well as a report for viewing
the list of items from circulation
Galen Charlton [Mon, 19 May 2008 19:28:36 +0000 (14:28 -0500)]
kohabug 2141 - avoid carp on display of details of deleted bib
When displaying details of bib in staff interface, check
that bib actually exists and display 404 page if not. Avoids
following fatal error:
Can't call method "field" on an undefined value at /home/gmc/koha/dev/C4/Biblio.pm line 944.
This situtation can arise when running Zebra; if a bib is deleted,
Zebra will not necessarily be reindexed instantly, allowing a link
from a search result list to point to a missing record.
Joe Atzberger [Mon, 19 May 2008 20:36:37 +0000 (15:36 -0500)]
BUGFIX - pagination bar was not in template, so only the first 20 hits were
pagination bar was not in template, so only the first 20 hits were
visible. Probably it wasn't included because the script referenced a bogus base URL.
Also debugified warn statement in script. Note FIXME for bogus template reference.
We probably don't need that template or the related selector lines for it.
Galen Charlton [Mon, 19 May 2008 14:59:02 +0000 (09:59 -0500)]
test suite: allow skipping of expensive tests
Defined a function attribute for KohaTest and subclasses
called 'Expensive'. When a test method has that attribute,
it is skipped unless the RUN_EXPENSIVE_TESTS environment
variable is true.
To mark a test method, expensive, do this:
sub test_foo : Tests(4) Expensive { ... }
To mark a whole class and its subclasses expensive,
define a SKIP_CLASS sub (with empty body) with the
Expensive attribute:
sub SKIP_CLASS : Expensive { }
Updated the t/Makefile so that 'make test' runs
nonexpensive tests, while 'make fulltest' runs both
cheap and expensive tests.
Marked KohaTest::Installer test class expensive.
Signed-off-by: Andrew Moore <andrew.moore@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>