Commit graph

2449 commits

Author SHA1 Message Date
d73cad91a7 Bug 14544: Get rid of AddShelf
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:00 -03:00
abe5c30973 Bug 14955: Don't double encode chars in the "Show more" link
Bug 13789 has fixed this issue for the facet links (select/unselect) but
not for the "Show more" facets link.

This patch reuses the "url" variable, generated for the facets, for
these links. A new "local_url" variable is used to build links for each
entry.

Test plan (for OPAC and intranet):
- Search for a very common term
- Filter the results using facets
- You should get more than 5 entries for a facet and 1 selected:
Author
 author 1
 author 2 [x] # Selected
 author 3
 author 4
 author 5
 Show more # you see this link if there is 5+ values for this facet
- Click on the Show more link
Without this patch, the url contains double-encoded characters and you
will certainly don't get any results
With this patch, you should get results.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:50:35 -03:00
Katrin Fischer
05d3770427 Bug 11881: QA follow-up - rename class
A suggestion for renaming the class to be a bit more "content" then "appearance".
Strictly optional.

.ItemSummary {
    display: block; # block - line breaks, inline - all one line
}

.LabelCallNumber {
    display: inline; # inline - display, none - don't display
}

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:13:36 -03:00
genevieve
5adb2268f0 Bug 11881: Small improvements for Items available for reference
As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:13:22 -03:00
simith
feb89b4532 Bug 11881: Small improvements for the availability informations in the search results list on the OPAC
This patch contains small modifications to the template of OPAC search results.
Theses modifications affect the "Availability" line :
* Add a linebreak after each location.
* Add the text "Call Number:" before call numbers.

To test:

I) Apply the patch

II) Include the following test in the OPACUserCSS preference:

.searchresults .CommasWithLinebreaks {
    display: block; # block - line breaks, inline - all one line
}

.searchresults .LabelCallNumber {
    display: inline; # inline - display, none - don't display
}

III) Do a search on the OPAC

IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text).

Sponsored-by: CCSR ( http://www.ccsr.qc.ca )

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:13:07 -03:00
Katrin Fischer
4b5e92c51c Bug 12428: QA Follow-up: Wrap borrower's title in a span to make it possible to hide
I think showing the title with the user name is quite unusual for
Koha. Wrapping the title in a span with a unique class makes it
possible to hide it.

http://bugs.koha-community.org/show_bug.cgi?id=14248

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:26:42 -03:00
Martin Persson
1f15b585d4 Bug 14248: Optionally display authorship for news
Test plan:

* Apply dependant patches 14246 and 14247.
* Apply current patch.
* Log into the Staff client, go to
 'Administration' -> 'Global Preferences' -> 'Tools',
  a new section titled 'News' should appear with a single option named 'NewsAuthorDisplay'.
  Available values should be 'Not at all', 'OPAC only', 'Staff client only' and
  Both OPAC and staff client'. By default the value should be 'Not at all'
  (to mimic existing behaviour, important!).

* Change the value to something different and save the changes.
* Go to 'Tools' -> 'News' and add some news items (at least 2).
* Use the MySQL command line tool to edit the opac_news table,
  removing the user id from one of the news items:
  $ mysql -u kohaadmin -p -D koha
  > SELECT `idnew`, `title`, `borrowernumber` FROM `opac_news`;
  * Make a mental note of one of the 'newid' numbers to change.
  > UPDATE `opac_news` SET `borrowernumber` = NULL WHERE `idnew` = <your-id-here>;
  * Now one of the news items will have no user id, and no author should be shown for it.
* Go to OPAC and Staff client and make sure the display modes works as intended.
  * Repeat for all values, making sure that the settings works as intended.
  * The changed news item should have no author info shown at any time.
  * The unchanged news item should show your own user name if the
    settings match the section where it is displayed.

Sponsored-By: Halland County Library

Tested on top of Bugs 1246 and 1247, works as advertised.
Note: Some whitespaces changed / removed in koha-news.tt to pass qa tools.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:26:22 -03:00
22068e3950 Bug 14100: Fix 3 occurrences more
- opac-suggestions.pl
- opac-readingrecord.pl
- opac-reserve.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:07 -03:00
d58f2cfaf6 Bug 14100: Fix some missing occurrences
This patch fixes:
- reports/bor_issues_top.pl
- sort order
- adv search and search results
- opac-topissues.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:07 -03:00
Winona Salesky
d1ea23e904 Bug 14734: Enhance 264 display in OPAC and Staff XSLT.
Makes 264 repeatable, prefer 264 over 260. If 264/ind1=3 is present in the
record the xslt uses ind1 to determine latest 264, if no ind1=3 then all
264 fields are displayed.

Test Plan:
1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac record details
3) Find or create a record with multiple MARC tags 264
4) Perform a search that would show the record in the search results.
5) Review results for correct 264 display.
6) Click title to review record details.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. 260 not showed when 264 exists, tested with multiple
records. If ind1=3 is present shows the current/latest data

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 11:45:52 -03:00
3e153d46ee Bug 13696: Add support for Font Awesome icons in Koha
Font Awesome is similar to Glyphicons included in Twitter Bootstrap,
except better in every way and more Free.

Test Plan:
1) Apply this patch
2) Edit the template for a page, and add a Font Awesome tag to it,
   examples can be found here:
   http://fortawesome.github.io/Font-Awesome/examples/
3) Reload the page and verify the icon displays.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 09:57:23 -03:00
Marc Véron
b02619928b Bug 14776: Remove 'selfcheck' patron related links from and add language selector to SCO header
The SCO screen displays patron related menu items in it's header (Link to the account and "Logout").
This makes no sense since the patron that is logged in is the 'selfcheck' user as defined in syspref AutoSelfCheckId.
Additionally, the language menue is missing when the syspref OpacLangSelectorMode is set to 'top' or to 'both'.

To test:
- Apply on top of Bug 15039
- Set AutoSelfCheck sysprefs as appropriate
- Set OpacLangSelectorMode to 'top' or 'both'
- Go to SCO page
- Verify that the language menue does not display in the header
- Enter a card number to check out (this logs in the SCO user)
- Verify that you get text similar to "Welcome, checkout" with a link to the sco user's account in the OPAC and a 'Logout' link
- Apply patch
- Verify that the language menu appears and the SCO user's information disappears.
- Verify, that the language menu displays / does not display with combinations of:
  - opaclanguagedisplay (Allow)
  - opaclanguages ( > 1 language selected)
  - OpacLangSelectorMode (top or both)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-23 10:12:41 -03:00
48f869825f Bug 5685: (RM followup) opac.less and opac.css out of sync
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-23 09:44:21 -03:00
Marc Véron
17b3e3c9eb Bug 15039: Move top language menu to include and streamline logic
The language menu in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc is used at other places as well (see Bug 14776).

This patch moves it to a file masthead-langmenu.inc to make it re-usable.

Additionally it streamlines the logic (not all combinations of Opac sysprefs that should display the menu did so).

To test:
- Apply patch
- Verify, that the language menu displays / does not display with combinations of:
  - opaclanguagedisplay (Allow)
  - opaclanguages ( > 1 language selected)
  - OpacLangSelectorMode (top or both)
- Verify that sysprefs opacuserlogin and EnableOpacSearchHistory do not interfere
  with the lenguage menu (before, at least one of them had to be on to display the menu)
- Verify that language switching works as before.

Signed-off-by:  Chris Kirby <christopherlawrencekirby@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:53:42 -03:00
Julian Maurice
986cbaf830 Bug 11139: Add support for multiple values in AdvancedSearchTypes
AdvancedSearchTypes syspref can be multivalued, opac-topissues.pl
have to support that.

AdvancedSearchTypes can have one or more of the following values:
'itemtypes', 'ccode', 'loc'.  But this patch adds support only for
itemtypes and ccode.  AdvancedSearchTypes can still contain 'loc' but it
will change nothing to the behaviour of opac-topissues.pl.

This patch also removes duplicate code in template (the "Refine your
search" form was written in two different places)
This introduces a small behaviour change: when there is no results,
instead of having the form in the center of the page, it remains in the
left sidebar and we have a "No results" message in the main area.

Depends on bug 14788

Tested on top of 14788. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:36:53 -03:00
Julian Maurice
3d7600f976 Bug 14788: Move opac-topissues.pl code into C4::Circulation
Tested with syspref 'AdvancedSearchTypes' set to itemtypes an ccode (one at a time).
No problems found.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:35:06 -03:00
Blou
396275be35 Bug 10937: Fix Seach Type in Advanced Search
In order to see the checkboxes of the Collection and Shelving location of the advanced search, the if changed so that only the Itemtypes will go through the previous if
2015-10-22 11:06:39 -03:00
ahmed
30edfbfa58 Bug 10937: Option to hide and group itemtypes from advanced search
This allows to group certain item types in a category, to be displayed (and searched) as such in OPAC's advanced search.  For example, you can group Reserve 2h and Reserve 12h into a Reserve category.  The 2 and 12h types won't appear anymore.
This also allows to simply prevent an item type from displaying as a search option.

TEST PLAN
------------------
0) Back up database, so you can reset and retest easily. ;)
1) Apply the patch
2) Run Koha QA tool.
3) prove -v t/db_dependent/Koha.t
  -- all tests should pass.
  4) run ./installer/data/mysql/updatedatabase.pl to add the
  two columns to itemtypes
  -- Does a meaningful message get printed?
  Are the columns added?
  "DESCRIBE itemtypes;" should list hideinopac and searchcategory.
  5) You need to add a category to group your item types:
  a) In Intranet/Koha Admin/Authorized values,
  select DOCTYPECAT in the 'Show category:' dropdown
  i) If you do not have a DOCTYPECAT category, create one.
  b) Click button "New authorized value for DOCTYPECAT"
  c) Enter
  Authorized value: HARDWARE
  Description : Hardware
  Description (OPAC): Hardware
  6) Group your items under that new category
  a) In Intranet/Koha Admin/Item types, choose (at least)
  two item types and for each:
  - Click action/Edit on the right column
  - Third row (below Description) is the Search category list box, select Hardware
  - click Save changes at the bottom
  7) Select at least one item to be hidden in the OPAC search
  a) In Intranet/Koha Admin/Item types (again), choose a different item type:
  -  Click action/Edit
  -  Click the checkbox "Hide in OPAC" below the list of icons.
  8) Go test your modifications
  a) Go to OPAC/Adv search.
  b) Validate that all items modified above (hidden or grouped) do not appear in Item type list
  c) Validate that new item type Hardware does appear instead.
  d) Select item Hardware, start Search.
  ) Validate returned items are the of the two types that were grouped into the Hardware category in step 4.

Sponsored-by: Vanier college

Signed-off-by: Nick <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:06:07 -03:00
3aef0257f4 Bug 8236: (QA followup) Tweak language, fix whitespace error
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
2015-10-19 14:37:13 -03:00
Lyon3 Team
64b0984a51 Bug 8236: Renewing policy in overdue or restriction case
This patch introduces 2 sysprefs :
    RestrictionBlockRenewing to allow/block renewal of items when patron is restricted.
    OverduesBlockRenewing to allow, block only the late ones or block all checked out items
    Default is "allow" in both case.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 14:36:55 -03:00
912f238c5e Bug 15005: Replace CGI->url with the corresponding url
CGI->url does not return the correct url on install using packages.

Test plan:
1/ Try to reproduce the bug from the description of bug 15005.
You should be able to login to the intranet and the OPAC
2/ Send a basket and a list from the intranet and the OPAC.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 09:36:43 -03:00
Jesse Weaver
226a10232a Bug 14607: (QA followup) Fix one missing occurence, incorrect calls to GetNormalizedUPC
Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:09:53 -03:00
Jesse Weaver
bbd66ad767 Bug 14607: (QA followup) Fix typo in shelfbrowser.inc
Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:09:53 -03:00
Jesse Weaver
0ba37ddeba Bug 14607: Baker & Taylor cover images should be accessible by UPC as well as ISBN
Test plan (requires Baker and Taylor cover images to be set up and enabled):
  1. Create a record with an ISBN that does not have a cover and a UPC
     that does. 141985934X/085391174929 is one set that works well.
  2. Verify that the record shows up as "No image available" in the
     following OPAC locations: shelf browser, reviews, lists, search and
     reading record. This will require adding reviews/checkouts/etc. for
     the record in question.
  3. Apply patch.
  4. Check the locations again, and verify that the record now has a
     valid cover image.

Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:09:53 -03:00
4f4c5e67ef Bug 5144: Duplicate holds allowed if patron clicks back button after placing hold
Koha is currently not engineered to handle multiple holds per record.
Until such time that is does, we should not allow them to be created.

Test Plan:
1) Apply this patch
2) Log in to the opac
3) Place a hold
4) Hit the back button on your browser
5) Place the hold again
6) Note the new message

Signed-off-by: David Kuhn <kuhn@monterey.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 10:01:55 -03:00
Winona Salesky
58a0186dd2 Bug 14917: 700/710/711 fix path for icon in XSLT
Added theme and materialTypeLabel parameters back into showAuthor template call
for 7xx display in OPAC display.

Test Plan:
1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac record details
3) Find or create a record with MARC tags 700,710,711
5) Click title to review record details.
6) Link to icon following contributor names should appear.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected. Magnifying glass icon corrected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I shortened the commit subject and put most of it in the commit message.
2015-10-05 12:34:21 -03:00
Jonathan Druart
1489bb7342 Bug 6379: Remove link from unapproved tags
At the OPAC, if the tag is not approved, the tag's link did not return
any result.

This patch removes the link.
Test plan:
1/ Set TagsModeration to 'Require'
2/ Create tags at the OPAC
3/ Approve a couple
4/ Confirm that unapproved tags does not have links.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
works as described, no errors

For the (approved) link to work I need to install YAML::XS

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-05 12:27:44 -03:00
Julian Maurice
2f0e409f47 Bug 14940: Fix sorting in opac-topissues.pl
There is hidden text in "Checkouts" cells that prevent DataTables to
sort numerically.
This patch adds the 'title-numeric' sort plugin and use it in
opac-topissues.pl

Column 'Checkouts' in Home > Most popular items sorts as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-05 12:26:45 -03:00
9bdd33de21 Bug 14671: Allow correct translation of CAS authentication
In authentication pages with CAS, the use of acronym or abbr tags does not allow a correct translation of the text.
See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5983#c7

It does not help a lot end users to know that CAS is Central Authentication Service, I think. Now one can custom the login page with NoLoginInstructions syspref to describe how to use the authentication.

This patch removes the use of acronym and abbr is authentication pages.

Test plan (example with fr-FR locale) :
- Without patch
- Update translation files : cd misc/translator ; perl translate update fr-FR
- You see in fr-FR-opac-bootstrap.po : msgid "If you have a "
- Is is translated in : msgstr "Si vous avez un compte "
- Apply patch
- Update translation files : cd misc/translator ; perl translate update fr-FR
- You see in fr-FR-opac-bootstrap.po : msgid "If you have a CAS account, %s please "
- You can now translate it : msgstr "Si vous avez un compte CAS, %s veuillez "
- Same test for intranet authentication page
- Install the translation : cd misc/translator ; perl translate install fr-FR
- Look at the result

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tranlated OK, tested in spanish es-ES

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-02 15:07:58 -03:00
Winona Salesky
67fa231a74 Bug 14054: 246 XSLT Improvements
Adds other title type based on ind2 value. ind2 overridden by $i value.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-28 11:52:08 -03:00
1b8f3194e9 Bug 14509: Reject invalid passwords
Bug 10177 rejects password with leading or trailing whitespaces, but
only on the member-password page.
It's not consistent to only do this check on 1 place.
This patch adds the check for the 2 other places: memberentry and at the
OPAC.

Test plan:
1/ Edit a patron and set a password with leading and/or trailing
whitespaces. You should not be allowed to do it (no server side check).
2/ Same at the OPAC ("Change you password" tab). Here there is a server
side check.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-28 11:51:08 -03:00
2d69e143d8 Bug 14904: Resolve warning from tt_valid.t
Test tt_valid.t warns that opac-retrieve-file.tt has no id and class
attribute on the body tag.
This patch adds them to clear the warning.

Test plan:
Apply patch and run xt/tt_valid.t.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-28 11:49:13 -03:00
83ea49a009 Bug 14321: Integrate Upload.pm into Koha
This patch makes the following changes to achieve that:
[1] Use Upload.pm in stage-marc-import.pl, upload-cover-image.pl,
    offline_circ/process_koc.pl and enqueue_koc.pl.
[2] A new file-upload.js replaces file-upload.inc in the associated template.
    We now use ajax to get progress figures instead of launching perl script
    upload-file-progress.
    The js changes now also allow for aborting a file upload.
[3] Adds a tools/upload script and template. It allows to upload multiple
    files at once.
[4] Makes upload-file return error messages in JSON. For a multiple upload,
    we could have some files with errors and others without errors.
    The upload is now marked as Failed only if there was no upload at all.
[5] The upload plugin is converted to use tools/upload with plugin param.
    Deleting an upload is now presented via the search results form.

NOTE: In editing the process_koc.tt I noticed that the form enqueuefile was
hidden and no longer used (with associated code in process_koc.pl). When a
file has been uploaded, I display the form again (with the Apply directly
button). The code still works.

NOTE: We fix an error in upload-file from one of the patches of bug 6874.
The userid of the Koha admin user is passed to haspermission, but we
should pick the userid from the session.

NOTE: Bug 14686 will add a specific permission for tools/upload.pl, and
will add the tools/upload script to the Tools menu.
For now, you need edit_catalogue to start upload.pl and you will
additionally need a permission like upload_local_cover_images
to successfully upload a new file.

Test plan:
[1] Upload a marc file in stage-marc-import. (This is temp storage.)
[2] Check new entry in table uploaded_files. Look for the file in your
    temporary directory (/tmp ?), subfolder koha_upload.
    Bonus: Remove permissions on this subfolder. Retry, check error and
    restore permissions again.
[3] Upload another (larger) file and abort the upload. Check table and
    directory again. You should have a partial file, but no record.
[4] Verify that Stage for import still works as expected.
[5] Test Upload local cover image. (Enable OPACLocalCoverImages.) You can
    test an individual image or a zip file including images and a file
    called datalink.txt (with lines biblionumber,filename).
[6] Test uploading a offline circulation file:
    Enable AllowOfflineCirculation, and create a koc file (plain text):
    Line1: Version=1.0\tA=1\tB=2
    Line2: 2015-08-06 08:00:00 345\treturn\t[barcode]
    Note: Replace tabs and barcode. The number of tabs is essential!
    Checkout the item with your barcode.
    Go to Offline circulation file upload. Upload and click Apply directly.
    Checkout again. Upload again, click Add to offline circulation queue.
[7] Upload three files via tools/upload.pl with a category and marked as
    public. Check the results in the table.
    Verify that you can download the file in OPAC without being logged in.
[8] Pick one new file and one of the files of step 7. Upload them in the
    same category. One upload should succeed. Check for reported error.
[9] Connect upload.pl to field 856$u.
    Goto Cataloguing editor.
    In an empty 856$u, click the tag editor. Upload a file and click Choose.
    Save the record. Open the record in the OPAC and click the link.
    Copy this link to your clipboard for next step.
[A] Go back to editor. Click the tag editor on the same 856 field.
    Choose for Delete.
    Open the link in your clipboard again. Error message?
[B] Check the process of upload, search, download and delete of an upload
    with some diacritical characters in the filename. (Bonus points for
    adding special chars in the category code.)
    Note: You can add categories via authorized values, UPLOAD key.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Bug 14321: [QA Follow-up] Perltidy upload.pl

Run perltidy -pro=xt/perltidyrc on tools/upload.pl.
No other changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-09-25 12:02:52 -03:00
73e9dcb70f Bug 14760: Disabled courses display in the course reserves list for items
If an item is on reserve for two courses but one of those courses is
disabled, both courses are still listed on opac-detail.pl!

Test Plan:
1) Enable course reserves
2) Create two courses
3) Place one item on reserve for both courses
4) Disable one of the two courses
5) View the record details for that record/item
6) You should see both courses listed in the course reserves column
7) Apply this patch
8) Reload the page
9) You should now only see the active course in the course reseves column

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-09-07 12:08:40 -03:00
Winona Salesky
8749411abd Bug 13383: 100/110/111 changes to XSLT
Test plan:
1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac search results and record details
3) Find or create a record with MARC tags 100,110,111
4) Perform an opac search that would show the record in the search results.
5) Click title to review record.
6) Note the fields updates 100,110,111 to show subfields a,b,c,d,q and t.Multiple fields are separated by span class=separator |. Includes 100$j and handles multiple relator terms/codes.
7) Repeat steps 4 - 6 for the staff interface

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-08-28 09:39:26 -03:00
Winona Salesky
16f382e7ec Bug 13387: Uniform titles (130 / 240 / 730) Display in XSLT
Test Plan:
1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac record details
3) Find or create a record with MARC tags 130/240/730
4) Perform an opac search that would show the record in the search results.
5) Click title to review record.
6) Fields show subfields a,d,f,g,h,k,l,m,n,o,p,r,s,t with multiple fields separated by span class=separator |
7) Repeat steps 4 - 6 for the staff interface

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-21 10:44:03 -03:00
Liz Rea
c6d24b15ce Bug 14652: change gender specification from "N/A" to "None specified"
To test:

Edit a patron in the intranet, note that the gender options are "Female," "Male," and "None specified"

Setting "None specified" should result in the gender not being shown on the patron detail page (unchanged functionality)

In the opac, log in and click the "your personal details" tab, and note that the gender options are "Female," "Male," and "None specified"

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-21 10:03:06 -03:00
Winona Salesky
a1359d8b83 Bug 13734: RDA: Display 33xs
Test Plan:
    1) Apply this patch
    2) Ensure you are using the default XSLT setting for the staff and opac search results and record details
    3) Find or create a record with MARC tags 336,337,338
    4) Perform an opac search that would show the record in the search results.
    5) Click title to review record.
    6) Adds fields 336, 337 and 338 to staff and opac details. Adds comma between multiple subfields and | with class='separator' between multiple datafields (e.g. two 336 fields)
    7) Repeat steps 4 - 6 for the staff interface

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-21 09:58:35 -03:00
Winona Salesky
3cbed1e65e Bug 14181: MARC21 773 -- Display when ind1 = 0 or blank
Display 773 in opac and staff details when ind1 !=1

Test plan
=========

1/ Add a new record which uses the 773 field to an instance running
   master code. (the selected MARC framework should have the 773's
   relevant sub-fields enabled and visible on staff client, opac and
   the editor).
2/ Set ind1 as '0' (zero). The note should be displayed both on OPAC
   as well as the staff client.
3/ Reset ind1 with a non-zero value or leave it blank. The display
   note should no longer be visible from either client or opac.
4/ Apply the patch.
5/ Repeat step #1 and #2. The note is displayed on staff and opac.
6/ Repeat step #3. The display note should be visible on both staff
   and opac.
7/ run koha-qa.pl -c 1 -v 2

Note : For #1 above, the following LoC record was used:
       http://www.loc.gov/marc/bibliographic/examples.html#monographic

       The patch applied cleanly and performed as expected.

       The koha-qa.pl gave OK as results.

Signed-off-by: Indranil Das Gupta  <indradg@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-20 13:49:44 -03:00
Martin Stenberg
d5a5e9576e Bug 14675: Don't update details if no changes made
if no changes has been made for personal details, bring user back to details
page and inform them that no changes has been made.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-20 13:42:04 -03:00
cb1ac9f36a Bug 13485: Use the Koha template plugin to access syspref values
And remove the useless use of the KohaDates plugin

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-11 15:15:36 -03:00
Simith D'Oliveira
43fadbadea Bug 13485: Add a page to display links to restricted sites
To test:

I) Apply the patch
II) Run updatedatabase.pl

scenario I)

1) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
2) Add your machine ip (ex. 127.0.0)
3) Validate cgi-bin/koha/opac-proxypage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents.

scenario II)

1) Logout opac page
2) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
3) Add other ip that your machine ip.
4) Validate: cgi-bin/koha/opac-proxypage.pl shows a login page.
5) Validate: cgi-bin/koha/opac-proxypage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents after login.

Followed both scenarios, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

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

Bug 13485 [QA Followup]

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

Bug 13485 - Atomic Update + Rename Proxy page to Restricted page

Test plan:

I) Apply the patch
II) Run updatedatabase.pl

scenario I)

1) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
2) Add your machine ip (ex. 127.0.0)
3) Validate cgi-bin/koha/opac-restrictedpage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents.

scenario II)

1) Logout opac page
2) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
3) Add a diffrent ip.
4) Validate: cgi-bin/koha/opac-restrictedpage.pl shows a login page.
5) Validate: cgi-bin/koha/opac-restrictedpage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents after login.

	new file:   installer/data/mysql/atomicupdate/Bug13485_RestrictedSitesPage.sql
	modified:   installer/data/mysql/sysprefs.sql
	modified:   koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
	renamed:    koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-proxypage.tt -> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt
	renamed:    opac/opac-proxypage.pl -> opac/opac-restrictedpage.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-11 15:15:16 -03:00
Mark Tompsett
c0a52bb198 Bug 13948: Prevent explosion when Template::Plugin::Stash not installed
TEST PLAN
---------
1) Install first two patches
2) do not install, or uninstall Template::Plugin::Stash
3) Upgrade to make sure system preference is added.
4) Set the system preference to turn it on for Staff and OPAC
5) Refresh staff -- kaboom
6) Load OPAC -- kaboom
7) Apply this patch
8) Reload staff and OPAC
   -- nice HTML comment about what is wrong.
9) run koha qa test tools.

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

Neat, runs well. Tested with/without sysprefs and Template::Plugin::Stash
No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
2015-07-28 10:30:21 -03:00
aa356f47ea Bug 13948: Add ability to dump template toolkit variables to html comment
It would be incredibly helpful if we could easily enable Koha to dump
all Template Toolkit variables to a comment for debugging purposes.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Enable the new system preferences DumpTemplateVarsIntranet and
   DumpTemplateVarsOpac
4) Load a page in the staff intranet, view the html source
5) Note the template toolkit variables are embedded in an html comment
6) Load a page in the opac, view the html source
7) Note the template toolkit variable are embedded in an html comment

NOTE: I had to cpan2deb Template::Plugin::Stash to test.
      This is not optimal. Additionally:
      http://www.template-toolkit.org/docs/modules/Template/Plugin/index.html
      does not contain Stash. I suspect this was how it was
      introduced initially by TT.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-07-28 10:29:43 -03:00
cf5df6590d Bug 5685: [OPAC follow-up] Validation of email address field
This patch makes a few changes to the way errors are handled in the
OPAC:

- The validation plugin has been moved from the global include file to
  the template itself. Since we aren't doing form validation on any
  other page yet it doesn't make sense to include it globally at this
  time.

- The error message which appears if you have JavaScript disabled and
  have submitted invalid emails was styled in a non-standard way.

- I have added in-page links to the error message which appears if you
  have JavaScript disabled so that you can click to jump to the field
  which contains the error.

- I have modified the error message language slightly to make it (I
  hope) read better.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-07-24 13:47:57 -03:00
342a7a1205 Bug 5685: [Compiled CSS] Validation of email address field
This patch contains the recompiled opac.css file based on changes made
to opac.less in the previous patch.

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

FIXED the compress. - mtompset

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-07-24 13:47:49 -03:00
Juhani Seppälä
ab1fd8a556 Bug 5685: Validation of email address field
This patch adds server-side & client-side validation for email
form fields in the members/memberentry -view and in the
opac/memberentry-view (bootstrap).

I recently added simple validation for phone number and email address fields
for our in-house koha and saw this old bug: I'm open to any ideas on how
to do this better. Validation for phone numbers would be easy to add on
top of this but I left it out since this bug is only about the email
fields.

To test:
1) Select a member and go to any of the edit forms with email fields
(Primary info, "Library use", "Alternate address", "Alternative
contact").
2) Disable javascript in the browser in order to test server-side
validation and try to input invalid emails in each of the email form
fields.
3) Confirm that an invalid address is catched from any of the email
fields, an alert shown for each invalid address and that the member's
information was not updated with invalid data.
4) Enable javascript in the browser.
5) Confirm that the jquery validation plugin caches invalid addresses
from any of the email fields and that you cannot send the form before
correcting the problem.
6) Perform the same tests for the opac-memberentry-view.

Note: as the jQuery validation plugin doesn't exist in the bootstrap
folder, I just copied it over from the staff-client folder -how to deal
with this?

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

I have undone the changes to opac.css so that they can be submitted as a
separate patch. I have some other follow-ups to make as well.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-07-24 13:47:32 -03:00
Jonathan Druart
f8abcf3e8e Bug 12137: Use Koha.Preference to access pref value
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
2015-07-20 10:44:06 -03:00
Jonathan Druart
0183cc0223 Bug 14404: Rename class no-show to noshow for consistency with nosort
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-07-20 10:34:00 -03:00
e9061028c1 Bug 14404: Checkouts default sort order for Self Checkout (SCO) confusing for patrons
Libraries are reporting that patrons are very confused during
self-checkout. The problem is they are expecting the list of checkouts
to be in the order they checked out the items ( first checkout on the
bottom, last item checked out on top ). However, the checkouts
table is sorted by title ( ascending ) then due date ( descending ).
This is not intuitive.

Test Plan:
1) Enable Koha's self checkout
2) Use the SCO to check out a random assortment of items,
   make sure you don't check them out in alphabetical order
3) Note the order of the items in the list is not based on the order
   you checked them out in
4) Apply this patch
5) Refresh the page
6) Note the items are now in the order you checked them out
   with the last on top and the first on bottom

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-07-20 10:33:51 -03:00