Bug 6739: make it possible to block expired patrons from OPAC actions

Test Plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Pick a patron, note the patron's category
 5) Issue an item to this patron
 4) Edit that category, set "Block expired patrons" to "Block"
 5) Verify the patron cannot renew or place holds in the OPAC
 6) Edit the category again, set "Block expired patrons" to
    "Don't block"
 7) Verify the patron *can* renew and place holds in the OPAC
 8) Edit the category again, set "Block expired patrons" to
    "Follow system preference BlockExpiredPatronOpacActions"
 9) Set the system preference BlockExpiredPatronOpacActions to
    "Block"
10) Verify the patron cannot renew or place holds in the OPAC
11) Set the system preference BlockExpiredPatronOpacActions to
    "Don't block"
12) Verify the patron *can* renew and place holds in the OPAC

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) fix various issues

- translation issues
- wording issues

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) fix more issues

* Hide renewal column, buttons and links
* Fixes minor bug where upper-right table links would show even if
  renewal impossible
* Cleans up some of the template formatting ( whitespace changes only )

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) fix more issues

Installer fixes :
- in kohastructure.sql, category.BlockExpiredPatronOpacActions default
  value is -1, sets the same in updatedatabase.pl
- in syspref comment, replaces "opac actions such as placing a hold or
  reserve" by "opac actions such as placing holds or renrw books"
- A 'YesNo' does not have 'yes' as value in database, it is '1'.
- corrects small typo "categori" and syspref name case

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) more fixes

Some corrections :
- opac-reserve.tt : opening <p> instead of closing
- opac-user.tt : warnexpired was in database format, adds the use
  of KohaDates template plugin
- opac-user.tt : duplicated TT test : [% IF ( BORROWER_INF.warnexpired ) %]
  and [% ELSIF ( BORROWER_INF.warnexpired ) %], maybe a merge error
- opac-user.tt : <string> instead of <strong>, maybe for HTML 6 :-)
- opac-user.pl : adding dateformat var to template is already done by Auth.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Testing notes:
- Database update
  * Changes to kohastructure match changes done by the updatedatabase
    statement. Feature is activated by default. Fixing 'yes' to be '1'
    in a follow up.
  * Ran database update succesfully.
  * Note: Patrons are now blocked by default in new installations
    AND in updated installations.
- System preference
  * Verified system preference shows up correctly.
- Category configuration
  * Add new patron category
  * Edit existing patron category
  * Delete patron category
  * Check patron category summary table.
  => Verified all actions work as expected.
  => Verified chosen value for BlockExpiredPatronOpacActions'
     is always displayed and saved correctly.
  * Note: The new value is missing from the summary table.
  * Note: The new value is also not shown when deleting a patron category.
- Check functionality
  * Renew and place a hold for an NOT EXPIRED patron with
    a) category: use syspref (default)
       syspref: block  (default)
    b) category: use syspref (default)
       syspref: don't block
    c) category: block
       syspref: don't block
    d) category: block
       syspref: block
    e) category: don't block
       sypref: block
    * Verified renewals and placing holds were never blocked.
    * Also verified that the warning from NotifyBorrowerDeparture
      still shows up correctly.
  * Renew and place a hold for an EXPIRED patron with
    a) category: use syspref (default)
       syspref: block  (default)
       => OK, both actions are blocked.
    b) category: use syspref (default)
       syspref: don't block
       => OK, both actions possible.
    c) category: block
       syspref: don't block
       => OK, both actions are blocked.
    d) category: block
       syspref: block
       => OK, both actions are blocked.
    e) category: don't block
       sypref: block
       => OK, both actions possible.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2014-04-06 Update: Will repeat and amend above test plan on last patch in this series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) yet more fixes

- Fixes a typo in one of the OPAC messages: "you account"
- Fixes the updatedatabase script to use 1 instead of yes for the
  system preference default matching the sysprefs.sql file.
- Fixes capitalization "Don't Block" in system preference
  description.
- Adding . to the end of the warning, when renewals are blocked.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) fix conflicts with some others bugs.

See comments 86 and 88. This patch fixes a bad conflict resolution in a
previous patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) template changes for the bootstrap theme

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script, t, xt and t/db_dependent/Members*.

Testing notes:
    - Database update
      * Changes to kohastructure match changes done by the updatedatabase
        statement. Feature is activated by default!
      * Ran database update succesfully.
      * Note: Expired patrons are now blocked by default in new
        AND in updated installations.
    - System preference
      * Verified system preference shows up correctly.
    - Category configuration
      * Add new patron category
      * Edit existing patron category
      * Delete patron category
      * Check patron category summary table.
      => Verified all actions work as expected.
      => Verified chosen value for BlockExpiredPatronOpacActions
         is always displayed and saved correctly.
      * Note: The new value is missing from the summary table.
      * Note: The new value is also not shown when deleting a patron
        category.
    - Check functionality
      * Renew and place a hold for an NOT EXPIRED patron with
        a) category: use syspref (default)
           syspref: block  (default)
        b) category: use syspref (default)
           syspref: don't block
        c) category: block
           syspref: don't block
        d) category: block
           syspref: block
        e) category: don't block
           sypref: block
        f) category: don't block
           syspref: don't block
        Holds and renewals were always possible.
      * Also verified that the warning from NotifyBorrowerDeparture
        still shows up correctly.
      * Verified holds and renewals are still blocked, when the
        user has a restriction with a date in the future.
      * Renew and place a hold for an EXPIRED patron with
        a) category: use syspref (default)
           syspref: block  (default)
           Holds and renewals blocked.
        b) category: use syspref (default)
           syspref: don't block
           Holds an renewals possible.
        c) category: block
           syspref: don't block
           Holds and renewals blocked.
        d) category: block
           syspref: block
           Holds and renewals blocked.
        e) category: don't block
           sypref: block
           Holds and renewals possible.
        f) category: don't block
           syspref: don't block
           Holds and renewals possible.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: DBRev 3.15.00.045

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) do NOT activate new feature by default during upgrade

The previous behavior falls in the category of (arguably) buggy behavior
that nonetheless should not be silently changed on the folks who would
have to deal with patron complaints.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) add unit tests for GetMemberDetails()->{is_expired}

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6739: (follow-up) tweak wording

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11635: remove duplicate definition of 995$r in UNIMARC record.abs

Test plan :
- Create a fresh install UNIMARC flavor and GRS1 indexing for biblios
- Re-indexe database
- Perform a search with index "itemtype" (and then "itype") on an
  existing value of 995$r. For example : itemtype:BOOK
=> Check you get results

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>