From oleonard at myacpl.org Mon Feb 3 18:07:32 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 3 Feb 2014 12:07:32 -0500 Subject: [Koha-patches] [PATCH] Bug 11670 - Remove sorting from patron lists action columns Message-ID: <1391447252-13686-1-git-send-email-oleonard@myacpl.org> The list of patron lists has sortable columns for the add, edit, and delete buttons. These columns should not be sortable. This patch removes sorting. This patch also adds the "btn-mini" class to the in-table buttons to make the table more compact. To test you must have existing patron lists. Apply the patch and navigate to Tools -> Patron lists. The columns containing the add, edit, and delete buttons should not be sortable. Other columns should sort correctly. --- .../prog/en/modules/patron_lists/lists.tt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt index 901b925..ec8c2b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt @@ -8,7 +8,11 @@ - -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] -[% END %] +[% INCLUDE 'datatables.inc' %][% END %] @@ -46,7 +44,7 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); { "aTargets": [ -1, -2[% IF ( exports_enabled ) %], -3[% END %] ], "bSortable": false, "bSearchable": false } ], "aoColumns": [ - { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,null,null[% IF ( exports_enabled ) %],null[% END %] + { "sType": "title-string" },{ "sType": "anti-the" },null,{ "sType": "title-string" },null,null,null,null,null,null[% IF ( exports_enabled ) %],null[% END %] ], "bPaginate": false })); @@ -55,7 +53,7 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); "sDom": 't', "aaSorting": [], "aoColumns": [ - { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,{ "sType": "html" } + { "sType": "title-string" },{ "sType": "anti-the" },null,{ "sType": "title-string" },null,null,null,null,{ "sType": "html" } ], "bPaginate": false })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index d55382e..1742e30 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -3,9 +3,7 @@ [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] - -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] - -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 7 21:49:36 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 7 Feb 2014 15:49:36 -0500 Subject: [Koha-patches] [PATCH] Bug 11717 - Use new DataTables include in member templates Message-ID: <1391806176-24773-1-git-send-email-oleonard@myacpl.org> Bug 10649 introduced a new include file for adding DataTables-related JavaScript assets. This patch adds use of this include file to all member pages which use DataTables. Apply the patch and test the following pages to confirm that table sorting works correctly: - Patron details (members/moremember.pl) - The checkouts, relatives' checkouts, and holds tables have been modified to exclude articles when sorting of titles. - Notices (members/notices.pl) - Circulation history (members/readingrec.pl) - Statistics (members/statistics.pl) - Update child to adult patron (members/update-child.pl) - This is the page which appears in a pop-up when you update a child patron to an adult (from the "More" menu in the toolbar when viewing patron details). --- .../prog/en/modules/members/moremember.tt | 12 +++++------- .../prog/en/modules/members/notices.tt | 4 +--- .../prog/en/modules/members/readingrec.tt | 6 ++---- .../prog/en/modules/members/statistics.tt | 6 ++---- .../prog/en/modules/members/update-child.tt | 6 ++---- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 79d319e..27d1d4b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -9,10 +9,8 @@ [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] - - -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] [% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] [% END %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] +[% INCLUDE 'datatables.inc' %] - -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] - -[% INCLUDE 'datatables-strings.inc' %] - - -[% INCLUDE 'datatables-strings.inc' %] - +[% INCLUDE 'datatables.inc' %] - [% INCLUDE 'datatables-strings.inc' %] - + + [% INCLUDE 'datatables.inc' %] - - [% INCLUDE 'datatables-strings.inc' %] - + + [% INCLUDE 'datatables.inc' %] + -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] - [% INCLUDE 'datatables-strings.inc' %] - - + + [% INCLUDE 'datatables.inc' %] -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 14 15:02:06 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 14 Feb 2014 09:02:06 -0500 Subject: [Koha-patches] [PATCH] Bug 11756 - Hold ratios report sorting incorrectly Message-ID: <1392386526-19021-1-git-send-email-oleonard@myacpl.org> The DataTables plugin doesn't by default take multiple columns into account when sorting. The hold ratios report presents a situation where it makes sense to sort by default based on two columns: hold count and title, since there are likely to be many titles with the same hold count. This patch adds sorting by default on holds (descending) and title (ascending). It also modifies the configuration of the title sort to exclude articles when sorting. To test, view the hold ratios report. If necessary use the filter form to reduce the minimum hold ratio and generate more results. Confirm that the correct columns can be sorted. Note that by default one can manually trigger sorting on two columns by shift-clicking the second column header. --- .../prog/en/modules/circ/reserveratios.tt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index d55382e..2cc539a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -17,9 +17,21 @@ function () { $(this).toggleClass("ulined") } ); $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { + "aaSorting": [ [0,'desc'], [3,'asc'] ], "aoColumnDefs": [ { "aTargets": [ 8 ], "sType": "natural" } ], + "aoColumns": [ + null, + null, + null, + { "sType": "anti-the" }, + null, + null, + null, + null, + null + ], "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], "iDisplayLength": 20, "sPaginationType": "four_button" -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 14 16:11:57 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 14 Feb 2014 10:11:57 -0500 Subject: [Koha-patches] [PATCH] Bug 11763 - Consolidate fund action links into menu Message-ID: <1392390717-21925-1-git-send-email-oleonard@myacpl.org> This patch moves the fund Edit/Delete/Add child links on the fund view into a pop-up menu, allow the table to be more compact and the links to be more distinct. To test you must apply the patches on Bug 11578 if necessary. Apply the patch and view the funds list page (Administration -> Funds). For each line there should be an "Actions" menu containing the Edit/Delete/Add cihld links. Each should function correctly. Test with inactive budgets shown and hidden. --- .../prog/en/modules/admin/aqbudgets.tt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 4132ae6..33810a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -331,9 +331,16 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") Edit Delete [% ELSE %] - Edit - Delete - Add child fund + [% END %] -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 14 18:36:55 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 14 Feb 2014 12:36:55 -0500 Subject: [Koha-patches] [PATCH] Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js Message-ID: <1392399415-24249-1-git-send-email-oleonard@myacpl.org> toUC() is repeatedly declared on many administration templates. This function, used to transform user input to uppercase, can be added to staff-global.js to prevent repetition. To test, confirm that transformation to uppercase is working on the following Administration pages when text is entered in a form field and focus is moved to the next field: - Authority types -> New: Test the "Authority type" field. - MARC bibliographic framework -> New framework: Test the "Framework code" field. - Patron types and categories -> New category: Test the "Category code" field. - Currencies and exchange rates -> New currency: Test the "Currency" field. - Item types -> New item type: Test the "Item type" field. - Z39.50 client targets -> New Z39.50 server: Test the "Z39.50 server" field. The following pages do not call the toUC function despite the fact that they included it: auth_tag_structure.tt printers.tt roadtype.tt stopwords.tt systempreferences.tt --- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 6 ++++++ .../prog/en/modules/admin/auth_tag_structure.tt | 6 ------ .../prog/en/modules/admin/authtypes.tt | 6 ------ .../prog/en/modules/admin/biblio_framework.tt | 4 ---- .../prog/en/modules/admin/categorie.tt | 6 ------ .../prog/en/modules/admin/currency.tt | 5 ----- .../prog/en/modules/admin/itemtypes.tt | 6 ------ .../prog/en/modules/admin/printers.tt | 6 ------ .../prog/en/modules/admin/roadtype.tt | 6 ------ .../prog/en/modules/admin/stopwords.tt | 5 ----- .../prog/en/modules/admin/systempreferences.tt | 6 ------ .../prog/en/modules/admin/z3950servers.tt | 6 ------ 12 files changed, 6 insertions(+), 62 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js index 234a871..c97007f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -86,3 +86,9 @@ function openWindow(link,name,width,height) { function removeFocus() { $(':focus').blur(); } + +function toUC(f) { + var x=f.value.toUpperCase(); + f.value=x; + return true; +} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index aed41b6..7ecb565 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -28,12 +28,6 @@ return false; return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - function toUC(f) { - var x=f.value.toUpperCase(); - f.value=x; - return true; - } - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// function isNum(v,maybenull) { var n = new Number(v.value); if (isNaN(n)) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt index dab813e..7823108 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt @@ -17,12 +17,6 @@ function isNotNull(f,noalert) { return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// -function toUC(f) { - var x=f.value.toUpperCase(); - f.value=x; - return true; -} -///////////////////////////////////////////////////////////////////////////////////////////////////////////////// function Check(f) { var _alertString=""; var alertString2; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt index e6ce9d8..ec458b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt @@ -16,10 +16,6 @@ function isNotNull(f,noalert) { } return true; } -function toUC(f) { - f.value = f.value.toUpperCase(); - return true; -} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// function Check(f) { var ok=1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt index ce7f014..49b359a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -35,12 +35,6 @@ return true; } // - function toUC(f) { - var x=f.value.toUpperCase(); - f.value=x; - return true; - } - // function isNum(v,maybenull) { var n = new Number(v.value); if (isNaN(n)) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt index 99f693b..def9a02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt @@ -7,11 +7,6 @@ [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -61,7 +31,7 @@ function Check(f) { [% IF ( add_form ) %] -
+
[% IF ( authtypecode ) %] @@ -78,11 +48,11 @@ function Check(f) { [% authtypecode %] [% ELSE %] - - + + [% END %] -
  • +
  • Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record

    @@ -94,7 +64,8 @@ function Check(f) {
  • -
    +
    + Cancel
    -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 14 21:13:25 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 14 Feb 2014 15:13:25 -0500 Subject: [Koha-patches] [PATCH] Bug 11767 - Use validation plugin when creating new authority framework tag Message-ID: <1392408805-26157-1-git-send-email-oleonard@myacpl.org> The page for adding a new tag to an authority framework includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. The patch also moves some tag markup out of the script and into the template where it belongs. To test, apply the patch and go to Administration -> Authority types -> MARC structure -> New tag. Try submitting the form without entering a tag number. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing tag should also work correctly. --- admin/auth_tag_structure.pl | 6 +- .../prog/en/modules/admin/auth_tag_structure.tt | 61 ++++++-------------- 2 files changed, 19 insertions(+), 48 deletions(-) diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 31b510a..ae2d2da 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -111,18 +111,14 @@ if ($op eq 'add_form') { -id=>'authorised_value', -values=> \@authorised_values, -size=>1, - -tabindex=>'', -multiple=>0, -default => $data->{'authorised_value'}, ); if ($searchfield) { - $template->param(action => "Modify tag", - searchfield => "$searchfield"); + $template->param('searchfield' => $searchfield); $template->param('heading_modify_tag_p' => 1); } else { - $template->param(action => "Add tag", - searchfield => ""); $template->param('heading_add_tag_p' => 1); } $template->param('use_heading_flags_p' => 1); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index f8c3910..aed89bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -19,43 +19,7 @@ "sPaginationType": "four_button" })); }); - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - function isNotNull(f,noalert) { - if (f.value.length ==0) { -return false; - } - return true; - } - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - function isNum(v,maybenull) { - var n = new Number(v.value); - if (isNaN(n)) { - return false; - } - if (maybenull==0 && v.value=='') { - return false; - } - return true; - } - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - function Check(f) { - var ok=1; - var _alertString=""; - var alertString2; - if (f.tagfield.value.length==0) { - _alertString += "\n- " + _("tag number missing"); - } - if (_alertString.length==0) { - document.Aform.submit(); - } else { - alertString2 = _("Form not submitted because of the following problem(s)"); - alertString2 += "\n------------------------------------------------------------------------------------\n"; - alertString2 += _alertString; - alert(alertString2); - } - } - //]]> +//]]> @@ -112,17 +76,25 @@ return false; [% IF ( add_form ) %]

    - [% IF ( use_heading_flags_p ) %] [% IF ( heading_modify_tag_p ) %]Modify tag[% END %] [% IF ( heading_add_tag_p ) %]New tag[% END %] - [% ELSE %][% action %][% END %]

    -
    + [% IF ( heading_modify_tag_p ) %][% END %] -
      -
    1. Tag: [% searchfield %]
    2. +
      +
        + [% IF ( heading_modify_tag_p ) %] +
      1. + Tag: + + [% searchfield %] +
      2. + [% ELSE %] +
      3. + [% END %] +
      4. @@ -141,7 +113,10 @@ return false;
      5. [% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)
      -

      +
      + + Cancel +
      [% END %] -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 14 21:20:47 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 14 Feb 2014 15:20:47 -0500 Subject: [Koha-patches] [PATCH] Bug 11769 - Use validation plugin when creating new MARC framework Message-ID: <1392409247-26819-1-git-send-email-oleonard@myacpl.org> The page for adding a new MARC framework includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. To test, apply the patch and go to Administration -> MARC bibliographic framework -> New framework. Try submitting the form without entering a tag number. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing framework should also work correctly. --- .../prog/en/modules/admin/biblio_framework.tt | 40 ++------------------ 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt index ec458b3..4ef8103 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt @@ -8,40 +8,6 @@ [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] @@ -55,7 +20,7 @@

      New road type

      [% END %] -
      + @@ -67,12 +32,13 @@ [% END %]
    3. - - + + Required
    - Cancel + + Cancel
    [% END %] -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 14 22:26:54 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 14 Feb 2014 16:26:54 -0500 Subject: [Koha-patches] [PATCH] Bug 11771 - Use validation plugin when creating new MARC framework tag Message-ID: <1392413215-28752-1-git-send-email-oleonard@myacpl.org> The page for adding a new tag to a MARC framework includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. The patch also moves some tag markup creation out of the script and into the template where it belongs. To test, apply the patch and go to Administration -> MARC bibliographic framework -> MARC structure -> New tag. Try submitting the form without entering a tag number. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing tag should also work correctly. --- admin/marctagstructure.pl | 12 ++----- .../prog/en/modules/admin/marctagstructure.tt | 37 +++++++++----------- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 0326b93..d3b227d 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -126,16 +126,8 @@ if ($op eq 'add_form') { $template->param('use_heading_flags_p' => 1); $template->param(liblibrarian => $data->{'liblibrarian'}, libopac => $data->{'libopac'}, - repeatable => CGI::checkbox(-name=>'repeatable', - -checked=> $data->{'repeatable'}?'checked':'', - -value=> 1, - -label => '', - -id=> 'repeatable'), - mandatory => CGI::checkbox(-name => 'mandatory', - -checked => $data->{'mandatory'}?'checked':'', - -value => 1, - -label => '', - -id => 'mandatory'), + repeatable => $data->{'repeatable'}, + mandatory => $data->{'mandatory'}, authorised_value => $authorised_value, frameworkcode => $frameworkcode, ); # FIXME: move checkboxes to presentation layer diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt index c905f30..7ce8414 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt @@ -10,21 +10,6 @@ @@ -72,11 +68,12 @@ function CheckForm(f) {
    1. - - + + + Required
    -
    +
    Upload progress:
    0%
    -- 1.7.9.5 From oleonard at myacpl.org Tue Feb 18 21:14:37 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 18 Feb 2014 15:14:37 -0500 Subject: [Koha-patches] [PATCH] Bug 11787 - Use validation plugin when adding new vendor Message-ID: <1392754477-17683-1-git-send-email-oleonard@myacpl.org> The vendor entry form uses some custom JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. Also corrected: Minor validation issue. To test, apply the patch and go to Acquisitions -> New vendor. Try submitting the form without entering a vendor name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing vendor should also work correctly. --- .../prog/en/modules/acqui/supplier.tt | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 79ae629..14faa11 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -12,13 +12,6 @@ function confirm_deletion() { window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete"; } } -function check(f) { -if (f.company.value == "") { - alert(_("You must specify a name for this vendor.")); - return false; -} - f.submit(); -} $(document).ready(function() { [% IF (dateformat == 'metric') %] @@ -60,13 +53,13 @@ if (f.company.value == "") { [% END %] [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %] [% IF ( enter ) %] -
    +
    Company details -
    1. -
    2. +
      1. + Required
      2. @@ -114,7 +107,7 @@ if (f.company.value == "") {
      3. @@ -122,7 +115,7 @@ if (f.company.value == "") {
      4. @@ -159,7 +152,7 @@ if (f.company.value == "") { [% IF gst_values %]
        1. - +
    -
    [% IF ( booksellerid ) %] +
    [% IF ( booksellerid ) %] [% ELSE %] [% END %]Cancel
    -- 1.7.9.5 From oleonard at myacpl.org Tue Feb 18 21:29:10 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 18 Feb 2014 15:29:10 -0500 Subject: [Koha-patches] [PATCH] Bug 11788 - Use validation plugin when creating new course Message-ID: <1392755350-17932-1-git-send-email-oleonard@myacpl.org> The page for adding a new course includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. To test, apply the patch and go to Course reserves -> New course. Try submitting the form without entering a department, course number, and/or course name. This should trigger validation warnings. Submission of the form with valid data should work correctly. Editing an existing course should also work correctly. --- .../prog/en/modules/course_reserves/course.tt | 45 ++++---------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index b9daa0a..a485b22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -6,38 +6,6 @@ - - @@ -124,7 +90,7 @@ Item types administration [% ELSE %]

    Add item type

    [% END %] - + @@ -137,15 +103,11 @@ Item types administration [% ELSE %]
  • - + Required
  • [% END %]
  • - [% IF ( itemtype ) %] -
  • - [% ELSE %] - - [% END %] + Required [% IF ( noItemTypeImages ) %]
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • [% ELSE %] @@ -242,7 +204,7 @@ Item types administration
    - + Cancel
    -- 1.7.9.5 From oleonard at myacpl.org Wed Feb 19 19:10:22 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 19 Feb 2014 13:10:22 -0500 Subject: [Koha-patches] [PATCH] Bug 11795 - Use validation plugin when creating new Z39.50 server Message-ID: <1392833422-24838-1-git-send-email-oleonard@myacpl.org> The page for adding a new Z39.50 server includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. To test, apply the patch and go to Administration -> Z39.50 client targets -> New Z39.50 server. Try submitting the form with any of the following error conditions: - Missing Z39.50 server name - Missing hostname - Missing port - Non-numeric port - Missing database - Non-numeric rank - Non-numeric timeout These errors should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing Z39.50 server should also work correctly. --- .../prog/en/modules/admin/z3950servers.tt | 74 +++++++------------- 1 file changed, 25 insertions(+), 49 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt index a1dc45f..5685b70 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -13,46 +13,22 @@ [% IF ( add_form ) %] [% END %] [% IF ( else ) %] @@ -93,7 +69,7 @@ [% IF ( add_form ) %] -
    + [% IF ( searchfield ) %]

    Modify Z39.50 server

    @@ -104,14 +80,14 @@
      [% IF ( searchfield ) %]
    1. Z39.50 server: [% searchfield %]
    2. [% ELSE %] -
    3. +
    4. Required
    5. [% END %] -
    6. +
    7. Required
    8. -
    9. +
    10. Required
    11. -
    12. +
    13. Required
    14. @@ -124,7 +100,7 @@ [% END %] -
    15. +
    16. - seconds + seconds
    17. Cancel + +
      Cancel
    18. [% END %] -- 1.7.9.5 From oleonard at myacpl.org Wed Feb 19 21:11:31 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 19 Feb 2014 15:11:31 -0500 Subject: [Koha-patches] [PATCH] Bug 10714 [Follow-up] Redirect to list contents view upon save after initiating edit from list contents view Message-ID: <1392840691-26927-1-git-send-email-oleonard@myacpl.org> This follow-up corrects the "cancel" action on list edit actions based on whether the edit was initiated from the list of lists or the list contents view. To test, view the list of lists and click the edit link next to one of them. Click the cancel link. You should return to the list of lists you were just viewing. View the contents of a list. Choose "Edit list" from the edit menu. Click the cancel link on the edit screen. You should return to the list contents view from which you initiated the edit action. --- .../prog/en/modules/virtualshelves/shelves.tt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 4c51b34..95fa4b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -500,7 +500,15 @@ function placeHold () {
      - [% IF ( showprivateshelves ) %]Cancel[% ELSE %]Cancel[% END %] + [% IF ( showprivateshelves ) %] + Cancel + [% ELSE %] + [% IF ( display == "viewshelf" ) %] + Cancel + [% ELSE %] + Cancel + [% END %] + [% END %]
    -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 15:49:54 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 09:49:54 -0500 Subject: [Koha-patches] [PATCH] Bug 9677 - Style button on notices and slips page with Bootstrap Message-ID: <1392907794-29403-1-git-send-email-oleonard@myacpl.org> The toolbar button on the Notices & Slips page isn't styled with Bootstrap as other toolbar buttons are. This patch corrects this. The patch also removes some obsolete CSS. To test go to Tools -> Notices and Slips. The toolbar button should look correct and work correctly. --- .../intranet-tmpl/prog/en/css/staff-global.css | 6 ------ .../intranet-tmpl/prog/en/modules/tools/letter.tt | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 4aa7b83..2a04c35 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -397,17 +397,11 @@ dd { div#toolbar { background-color : #EDF4F6; - margin-bottom : .7em; padding: 5px 5px 5px 5px; border-radius: 5px 5px 0 0; border: 1px solid #E6F0F2; } -div#toolbar .yui-menu-button button, -div#toolbar .yui-button-button button { - line-height : 1.7em; -} - ul.toolbar { padding-left : 0; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index d4c864b..c414787 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -135,8 +135,8 @@ $(document).ready(function() {

    [% END %] -
    - +
    +
    -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 16:03:03 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 10:03:03 -0500 Subject: [Koha-patches] [PATCH] Bug 11800 - Correct toolbar markup on course reserve pages Message-ID: <1392908583-29591-1-git-send-email-oleonard@myacpl.org> This patch corrects some inconsistencies between the toolbars on some course reserves pages and other toolbars in Koha. Other changes: Removed obsolete commented markup and corrected some invalid markup. To test course reserves must be enabled. View the list of course reserves (course_reserves/course-reserves.pl) and the detail view of a course (course_reserves/course-details.pl?course_id=X). Toolbars on both pages should look correct and work correctly. --- .../en/modules/course_reserves/course-details.tt | 10 +++--- .../en/modules/course_reserves/course-reserves.tt | 35 +++----------------- 2 files changed, 9 insertions(+), 36 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 5e69702..f41b3cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -45,12 +45,10 @@
    -
    -
      - [% IF CAN_user_coursereserves_add_reserves %]
    • Add reserves
    • [% END %] - [% IF ( CAN_user_coursereserves_manage_courses ) %]
    • Edit course
    • [% END %] - [% IF ( CAN_user_coursereserves_manage_courses ) %]
    • Delete course
    • [% END %] -
    +
    + [% IF CAN_user_coursereserves_add_reserves %] Add reserves[% END %] + [% IF ( CAN_user_coursereserves_manage_courses ) %] Edit course[% END %] + [% IF ( CAN_user_coursereserves_manage_courses ) %] Delete course[% END %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt index 820c1a2..3072e53 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt @@ -31,35 +31,12 @@ $(document).ready(function() {
    -
    -
      - [% IF ( CAN_user_coursereserves_manage_courses ) %] -
    • New course
    • - [% END %] -
    +
    + [% IF ( CAN_user_coursereserves_manage_courses ) %] + New course + [% END %]
    - -

    Courses

    @@ -72,7 +49,7 @@ $(document).ready(function() { - + @@ -107,7 +84,5 @@ $(document).ready(function() { - - [% INCLUDE 'intranet-bottom.inc' %] -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 16:25:42 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 10:25:42 -0500 Subject: [Koha-patches] [PATCH] Bug 11802 - Patron purchase suggestions page requires some corrections Message-ID: <1392909942-30565-1-git-send-email-oleonard@myacpl.org> This patch corrects some errors with the staff client's patron purchase suggestions page (members/purchase-suggestions.pl). To test, apply the patch and make sure the patronimages system preference is enabled. - View the purchase suggestions page for a patron whose record has a patron image attached. The image should appear in the left-hand sidebar. - View the page for a patron who has submitted no purchase suggestions. The message should be styled correctly. - The toolbar on the page should look correct and work correctly. --- .../en/modules/members/purchase-suggestions.tt | 10 ++++++---- members/purchase-suggestions.pl | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt index 58e8e24..2d198a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt @@ -33,8 +33,8 @@

    Purchase suggestions

    -
    - New purchase suggestion + [% IF suggestions %] @@ -55,7 +55,7 @@

    [% IF ( CAN_user_catalogue ) %] - [% s.title |html %] + [% s.title |html %] [% ELSE %] [% s.title |html %] [% END %] @@ -94,7 +94,9 @@

    Instructors Staff note Public note# of Students# of students Enabled
    [% ELSE %] - There is no purchase suggestion for this patron. +
    +

    This patron has not submitted any purchase suggestions

    +
    [% END %]
    diff --git a/members/purchase-suggestions.pl b/members/purchase-suggestions.pl index d071425..a624b68 100755 --- a/members/purchase-suggestions.pl +++ b/members/purchase-suggestions.pl @@ -51,6 +51,9 @@ $template->param( branchname => GetBranchName( $borrower->{'branchcode'} ), ); +my ($picture, $dberror) = GetPatronImage($borrowernumber); +$template->param( picture => 1 ) if $picture; + my $suggestions = SearchSuggestion( { suggestedby => $borrowernumber } ); $template->param( suggestions => $suggestions ); -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 17:46:07 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 11:46:07 -0500 Subject: [Koha-patches] [PATCH] Bug 11794 - opacSerialDefaultTab being ignored Message-ID: <1392914767-31497-1-git-send-email-oleonard@myacpl.org> The opacSerialDefaultTab system preference should control whether to show the holdings or subscriptions tab by default on the detail page for a serial. This behavior was broken when we last updated jQueryUI because of a change in the jQueryUI active tab class name. This patch corrects the class on the detail page and removes the old class from the authorities detail page (where it was unnecessary anyway). To test, view a serial record in the OPAC under various settings of the opacSerialDefaultTab preference. The default tab should correctly follow the preference. Test in prog and Bootstrap themes. --- .../bootstrap/en/modules/opac-auth-detail.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 +++--- .../opac-tmpl/prog/en/modules/opac-auth-detail.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt index 3c5b05f..18a942e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt @@ -108,7 +108,7 @@
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 46f73db..da209eb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -513,7 +513,7 @@
      [% IF ( defaulttab == 'holdings' ) %] -
    • +
    • [% ELSE %]
    • [% END %] @@ -555,7 +555,7 @@ [% END %] [% IF ( subscriptionsnumber ) %] - [% IF ( defaulttab == 'subscriptions' ) %]
    • [% ELSE %]
    • [% END %] + [% IF ( defaulttab == 'subscriptions' ) %]
    • [% ELSE %]
    • [% END %] Subscriptions
    • [% END %] @@ -575,7 +575,7 @@ [% END %] [% IF ( serialcollection ) %] - [% IF ( defaulttab == 'serialcollection' ) %]
    • [% ELSE %]
    • [% END %] + [% IF ( defaulttab == 'serialcollection' ) %]
    • [% ELSE %]
    • [% END %] Serial collection
    • [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt index 78bc5b9..1a46f84 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt @@ -92,7 +92,7 @@ $(document).ready(function() { [% END %]
      diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 3f3ade7..3935180 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -937,7 +937,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
        - [% IF ( defaulttab == 'holdings' ) %]
      • [% ELSE %]
      • [% END %] + [% IF ( defaulttab == 'holdings' ) %]
      • [% ELSE %]
      • [% END %] [% IF SeparateHoldings %][% LoginBranchname %] holdings[% ELSE %]Holdings[% END %] ( [% itemloop.size || 0 %] )
      • [% IF (SeparateHoldings) %] @@ -976,7 +976,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %] [% END %] [% IF ( subscriptionsnumber ) %] - [% IF ( defaulttab == 'subscriptions' ) %]
      • [% ELSE %]
      • [% END %] + [% IF ( defaulttab == 'subscriptions' ) %]
      • [% ELSE %]
      • [% END %] Subscriptions
      • [% END %] @@ -995,7 +995,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %][% END %] [% IF ( serialcollection ) %] - [% IF ( defaulttab == 'serialcollection' ) %]
      • [% ELSE %]
      • [% END %] + [% IF ( defaulttab == 'serialcollection' ) %]
      • [% ELSE %]
      • [% END %] Serial collection
      • [% END %] -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 21:28:54 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 15:28:54 -0500 Subject: [Koha-patches] [PATCH] Bug 11328 - Show local cover images in staff client search results Message-ID: <1392928134-4666-1-git-send-email-oleonard@myacpl.org> Local cover images do not appear in staff client search results. This patch adds them. To test, enable the LocalCoverImages system preference and add at least one cover image to a title. Perform a search which will return results that include your title. Confirm that the local cover image is displayed. Search results should also display correctly with and without AmazonCoverImages enabled as well as with LocalCoverImages disabled. --- .../intranet-tmpl/prog/en/css/staff-global.css | 13 +++++++++++++ .../prog/en/modules/catalogue/results.tt | 20 ++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 4aa7b83..d2404ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2018,6 +2018,19 @@ a.localimage img { margin : 0 .5em; padding : .3em; } + +.no-image { + background-color : #FFF; + border: 1px solid #AAA; + color : #979797; + display:block; + font-size : 86%; + font-weight : bold; + text-align : center; + width : 75px; + border-radius : 3px; +} + div.pager p { margin: 0; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 84206fe..7bb75f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -148,6 +148,9 @@ $('#sort_by').change(function() { window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.last.biblionumber %] + '&searchid=[% searchid %]'; [% END %] [% END %] + +[% IF LocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %] + }); @@ -430,19 +433,24 @@ var holdForPatron = function () { - [% IF ( AmazonCoverImages ) %][% END %] + [% IF ( AmazonCoverImages || LocalCoverImages ) %][% END %] [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] [% IF ( loop.odd ) %][% ELSE %][% END %] - [% IF ( AmazonCoverImages ) %] + [% IF ( AmazonCoverImages || LocalCoverImages ) %] + [% IF ( LocalCoverImages ) %] + + [% END %] + [% IF ( AmazonCoverImages ) %] + + + + [% END %] + [% END %]
          Results Location
        - - - - -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 21:45:34 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 15:45:34 -0500 Subject: [Koha-patches] [PATCH] Bug 11805 - Use validation plugin when creating new basket in Acquisitions Message-ID: <1392929135-4925-1-git-send-email-oleonard@myacpl.org> The page for adding a new basket in Acquisitions includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. To test, apply the patch and go to Acquisitions -> Choose a vendor -> New basket. Try submitting the form without entering a basket name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing basket should also work correctly. --- .../prog/en/modules/acqui/basketheader.tt | 27 +++----------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt index 85fc946..84b318c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt @@ -8,26 +8,6 @@ [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] @@ -54,7 +34,7 @@ function Check(ff) {

        Edit basket [% basketname %]

        [% ELSE %]

        Add a basket to [% booksellername %]

        [% END %] -
        +
          @@ -66,7 +46,8 @@ function Check(ff) { [% END %]
        1.   - + + Required
        2. @@ -136,7 +117,7 @@ function Check(ff) {
        - + Cancel
        -- 1.7.9.5 From oleonard at myacpl.org Thu Feb 20 22:10:57 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 20 Feb 2014 16:10:57 -0500 Subject: [Koha-patches] [PATCH] Bug 11806 - Use validation plugin when creating new OAI set Message-ID: <1392930657-5303-1-git-send-email-oleonard@myacpl.org> The form for adding a new OAI indicates that two fields are required but does nothing to enforce this rule. This can be handled client-side with HTML5 validation attributes and Koha's built-in validation plugin. This patch implements this. To test, apply the patch and go to Administration -> OAI sets configuration -> New set. Try submitting the form without entering a setSpec and/or setName. Doing so should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing set should also work correctly. --- .../prog/en/modules/admin/oai_sets.tt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt index a480b74..02eaf39 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt @@ -32,7 +32,7 @@ function delDescField(minusButton) {
        [% IF ( op_new || op_mod ) %] -
        + [% IF ( op_new ) %]

        Add a new OAI set

        @@ -45,11 +45,13 @@ function delDescField(minusButton) {
        1. - + + Required
        2. - + + Required
        3. [% FOREACH desc IN descriptions %]
        4. -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 21 15:26:28 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 21 Feb 2014 09:26:28 -0500 Subject: [Koha-patches] [PATCH] Bug 10751 - Title should be mandatory for creating suggestions in staff Message-ID: <1392992788-7186-1-git-send-email-oleonard@myacpl.org> The form for adding a new purchase suggestion in the staff client indicates that the title field is required but does nothing to enforce this rule. This can be handled client-side with HTML5 validation attributes and Koha's built-in validation plugin. This patch implements this. To test, apply the patch and go to Acquisitions -> Suggestions -> New purchase suggestion. Try submitting the form without entering a title. Doing so should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing suggestion should also work correctly. --- .../prog/en/modules/suggestion/suggestion.tt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 2f1cfb0..ecd8a8e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -296,7 +296,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
          [% IF ( op_save ) %] - + [% IF ( suggestionid ) %] @@ -306,7 +306,11 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o

          Enter a new purchase suggestion

          [% END %]
          Bibliographic information
            -
          1. +
          2. + + + Required +
          3. -- 1.7.9.5 From oleonard at myacpl.org Fri Feb 21 16:08:58 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 21 Feb 2014 10:08:58 -0500 Subject: [Koha-patches] [PATCH] Bug 11812 - Add missing "required" indicator to fields which are required Message-ID: <1392995338-7986-1-git-send-email-oleonard@myacpl.org> Form fields in the staff client which are required should be configured to be so by doing several things: - Add a class "required" to the field's
          [% END %] +[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) %]
          +[% END %]
          -- 1.7.9.5 From oleonard at myacpl.org Mon Feb 24 17:19:40 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 24 Feb 2014 11:19:40 -0500 Subject: [Koha-patches] [PATCH] Bug 11829 - JavaScript error on staff client biblio details pages if template variables are undefined Message-ID: <1393258780-19297-1-git-send-email-oleonard@myacpl.org> The JavaScript included in cat-toolbar.inc expects several variables to be passed to the template for use in calculations. Several scripts to not pass the required variables to the template, leading to a JS error. This patch re-adds (See Bug 9823) hold count calculation to the required scripts and copies the acquisitions-related count calculation from detail.pl into related bibliographic detail scripts so that the commonnly-included cat-toolbar.inc can receive correct values. To test, locate a bibliographic record which has no holds and is not used in a current or deleted order, but which has a local cover image attached. Check the following views to confirm there is no JavaScript error: - Normal - MARC - Labeled MARC - ISBD - Items - Images (from the Images tab on the "Normal" detail page) Next, locate a bibliographic record with no items attached which is used in an Acquisitions order. On each of the pages listed above, choose "Delete record" from the Edit menu. This should trigger a warning that the record is used in an order. Cancel the deletion. Finally, delete the order which references the bibliographic record. On each of the pages listed above, choose "Delete record" again. This should trigger a warning that the record is used in a deleted order. Cancel the deletion. --- catalogue/ISBDdetail.pl | 32 ++++++++++++++++++++++++++++++++ catalogue/MARCdetail.pl | 31 +++++++++++++++++++++++++++++++ catalogue/imageviewer.pl | 32 ++++++++++++++++++++++++++++++++ catalogue/labeledMARCdetail.pl | 32 ++++++++++++++++++++++++++++++++ catalogue/moredetail.pl | 31 +++++++++++++++++++++++++++++++ 5 files changed, 158 insertions(+) diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index ffc6c5e..2fa76bd 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -47,6 +47,8 @@ use C4::Members; # to use GetMember use C4::Branch; # GetBranchDetail use C4::Serials; # CountSubscriptionFromBiblionumber use C4::Search; # enabled_staff_search_views +use C4::Acquisition qw(GetOrdersByBiblionumber); + #---- Internal function @@ -112,7 +114,37 @@ $template->param ( searchid => $query->param('searchid'), ); +my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); +my @deletedorders_using_biblio; +my @orders_using_biblio; +my @baskets_orders; +my @baskets_deletedorders; + +foreach my $myorder (@allorders_using_biblio) { + my $basket = $myorder->{'basketno'}; + if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ + push @deletedorders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_deletedorders)){ + push @baskets_deletedorders,$myorder->{'basketno'}; + } + } + else { + push @orders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_orders)){ + push @baskets_orders,$myorder->{'basketno'}; + } + } +} + +my $count_orders_using_biblio = scalar @orders_using_biblio ; +$template->param (countorders => $count_orders_using_biblio); + +my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; +$template->param (countdeletedorders => $count_deletedorders_using_biblio); +my $holds = C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); +my $holdcount = scalar( @$holds ); +$template->param( holdcount => scalar ( @$holds ) ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 8eadb77..f8e4095 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -336,5 +336,36 @@ $template->param ( searchid => $query->param('searchid'), ); +my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); +my @deletedorders_using_biblio; +my @orders_using_biblio; +my @baskets_orders; +my @baskets_deletedorders; + +foreach my $myorder (@allorders_using_biblio) { + my $basket = $myorder->{'basketno'}; + if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ + push @deletedorders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_deletedorders)){ + push @baskets_deletedorders,$myorder->{'basketno'}; + } + } + else { + push @orders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_orders)){ + push @baskets_orders,$myorder->{'basketno'}; + } + } +} + +my $count_orders_using_biblio = scalar @orders_using_biblio ; +$template->param (countorders => $count_orders_using_biblio); + +my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; +$template->param (countdeletedorders => $count_deletedorders_using_biblio); + +my $holds = C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); +my $holdcount = scalar( @$holds ); +$template->param( holdcount => scalar ( @$holds ) ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl index 39a5102..6ecbc8d 100755 --- a/catalogue/imageviewer.pl +++ b/catalogue/imageviewer.pl @@ -27,6 +27,7 @@ use C4::Items; use C4::Output; use C4::Images; use C4::Search; +use C4::Acquisition qw(GetOrdersByBiblionumber); my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( @@ -78,5 +79,36 @@ $template->{VARS}->{'norequests'} = $norequests; $template->param(C4::Search::enabled_staff_search_views); $template->{VARS}->{'biblio'} = $biblio; +my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); +my @deletedorders_using_biblio; +my @orders_using_biblio; +my @baskets_orders; +my @baskets_deletedorders; + +foreach my $myorder (@allorders_using_biblio) { + my $basket = $myorder->{'basketno'}; + if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ + push @deletedorders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_deletedorders)){ + push @baskets_deletedorders,$myorder->{'basketno'}; + } + } + else { + push @orders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_orders)){ + push @baskets_orders,$myorder->{'basketno'}; + } + } +} + +my $count_orders_using_biblio = scalar @orders_using_biblio ; +$template->param (countorders => $count_orders_using_biblio); + +my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; +$template->param (countdeletedorders => $count_deletedorders_using_biblio); + +my $holds= C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); +my $holdcount = scalar( @$holds ); +$template->param( holdcount => scalar ( @$holds ) ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/labeledMARCdetail.pl b/catalogue/labeledMARCdetail.pl index 95788b0..37cae1c 100755 --- a/catalogue/labeledMARCdetail.pl +++ b/catalogue/labeledMARCdetail.pl @@ -28,6 +28,7 @@ use C4::Biblio; use C4::Items; use C4::Members; # to use GetMember use C4::Search; # enabled_staff_search_views +use C4::Acquisition qw(GetOrdersByBiblionumber); my $query = new CGI; my $dbh = C4::Context->dbh; @@ -137,5 +138,36 @@ $template->param ( searchid => $query->param('searchid'), ); +my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); +my @deletedorders_using_biblio; +my @orders_using_biblio; +my @baskets_orders; +my @baskets_deletedorders; + +foreach my $myorder (@allorders_using_biblio) { + my $basket = $myorder->{'basketno'}; + if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ + push @deletedorders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_deletedorders)){ + push @baskets_deletedorders,$myorder->{'basketno'}; + } + } + else { + push @orders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_orders)){ + push @baskets_orders,$myorder->{'basketno'}; + } + } +} + +my $count_orders_using_biblio = scalar @orders_using_biblio ; +$template->param (countorders => $count_orders_using_biblio); + +my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; +$template->param (countdeletedorders => $count_deletedorders_using_biblio); + +my $holds= C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); +my $holdcount = scalar( @$holds ); +$template->param( holdcount => scalar ( @$holds ) ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 28deb3b..86adb72 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -35,6 +35,7 @@ use C4::Circulation; # to use itemissues use C4::Members; # to use GetMember use C4::Search; # enabled_staff_search_views use C4::Members qw/GetHideLostItemsPreference/; +use C4::Reserves qw(GetReservesFromBiblionumber); use Koha::DateUtils; my $query=new CGI; @@ -215,7 +216,37 @@ $template->param( $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items ); $template->{'VARS'}->{'searchid'} = $query->param('searchid'); +my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); +my @deletedorders_using_biblio; +my @orders_using_biblio; +my @baskets_orders; +my @baskets_deletedorders; + +foreach my $myorder (@allorders_using_biblio) { + my $basket = $myorder->{'basketno'}; + if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ + push @deletedorders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_deletedorders)){ + push @baskets_deletedorders,$myorder->{'basketno'}; + } + } + else { + push @orders_using_biblio, $myorder; + unless (grep(/^$basket$/, @baskets_orders)){ + push @baskets_orders,$myorder->{'basketno'}; + } + } +} + +my $count_orders_using_biblio = scalar @orders_using_biblio ; +$template->param (countorders => $count_orders_using_biblio); + +my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; +$template->param (countdeletedorders => $count_deletedorders_using_biblio); +my $holds = GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); +my $holdcount = scalar( @$holds ); +$template->param( holdcount => scalar ( @$holds ) ); output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.9.5 From oleonard at myacpl.org Mon Feb 24 17:48:31 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 24 Feb 2014 11:48:31 -0500 Subject: [Koha-patches] [PATCH] Bug 11832 - JavaScript error on staff client place hold screen if record has no items Message-ID: <1393260511-19716-1-git-send-email-oleonard@myacpl.org> If a hold operation is blocked because the title has no items attached the patron search autocomplete JavaScript triggers an error. This patch modifies the template so that the JS is loaded only when items are present. To test, find a title which has no items attached. View the holds page for that title. There should be no JavaScript error. Patron search autocomplete should still work correctly for titles which have items attached. --- .../prog/en/modules/reserve/request.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index b084e25..1092166 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -131,7 +131,7 @@ function checkMultiHold() { $('#hold-request-form').preventDoubleFormSubmit(); -[% UNLESS ( borrowernumber || borrower_list ) %] +[% UNLESS ( borrowernumber || borrower_list || noitems ) %] [% IF ( CircAutocompl ) %] $( "#patron" ).autocomplete({ source: "/cgi-bin/koha/circ/ysearch.pl", -- 1.7.9.5 From oleonard at myacpl.org Mon Feb 24 18:19:13 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 24 Feb 2014 12:19:13 -0500 Subject: [Koha-patches] [PATCH] Bug 11821 - Staff client catalog: delete menu items greyed out without explanation Message-ID: <1393262353-21739-1-git-send-email-oleonard@myacpl.org> Biblio edit menu items which are disabled should trigger a tooltip on hover and an alert on click with explanations. This patch implements this for the relevent menu items. To test, apply the patch for Bug 11829 if necessary. Find a record which has no items attached. Test the following views: - Normal - MARC - Labeled MARC - ISBD - Items Test these Edit menu items: - Edit items in a batch - Delete items in a batch - Delete all items Hovering over these menu items should trigger an explanatory tooltip. Clicking the menu items should trigger a similar alert. Next, locate a title with items attached. On the same pages above, test the Edit -> Delete record menu item. Hovering should trigger an explanatory tooltip. Clicking it should trigger a similar alert. --- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 42 ++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index e2271df..12a4ad0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -82,10 +82,13 @@ return false; } } else { - alert(_("This record has no items.")); + alertNoItems(); return false; } } + function alertNoItems(){ + alert(_("This record has no items.")); + } [% END %] $(document).ready(function() { $("#z3950copy").click(function(){ @@ -115,6 +118,13 @@ return false; }); $("#export").remove(); // Hide embedded export form if JS menus available + $("#deletebiblio").tooltip(); + $("#batchedit-disabled,#batchdelete-disabled,#deleteallitems-disabled") + .on("click",function(e){ + e.preventDefault(); + alertNoItems(); + }) + .tooltip(); }); //]]> @@ -161,9 +171,21 @@ CAN_user_serials_create_subscription ) %]
        5. Edit items
        6. [% END %] - [% IF ( CAN_user_tools_items_batchmod ) %]
        7. Edit items in batch
        8. [% END %] + [% IF ( CAN_user_tools_items_batchmod ) %] + [% IF ( count ) %] +
        9. Edit items in batch
        10. + [% ELSE %] +
        11. Edit items in batch
        12. + [% END %] + [% END %] - [% IF ( CAN_user_tools_items_batchdel ) %]
        13. Delete items in a batch
        14. [% END %] + [% IF ( CAN_user_tools_items_batchdel ) %] + [% IF ( count ) %] +
        15. Delete items in a batch
        16. + [% ELSE %] +
        17. Delete items in a batch
        18. + [% END %] + [% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]
        19. Attach item
        20. [% END %] @@ -174,13 +196,19 @@ CAN_user_serials_create_subscription ) %]
        21. Edit as new (duplicate)
        22. Replace record via Z39.50
        23. - [% IF ( count ) %]
        24. [% ELSE %]
        25. [% END %] - Delete record
        26. + [% IF ( count ) %] +
        27. Delete record
        28. + [% ELSE %] +
        29. Delete record
        30. + [% END %] [% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %] - [% UNLESS ( count ) %]
        31. [% ELSE %]
        32. [% END %]
        33. - Delete all items
        34. + [% IF ( count ) %] +
        35. Delete all items
        36. + [% ELSE %] +
        37. Delete all items
        38. + [% END %] [% END %] -- 1.7.9.5 From dpavlin at rot13.org Tue Feb 25 12:45:58 2014 From: dpavlin at rot13.org (Dobrica Pavlinusic) Date: Tue, 25 Feb 2014 12:45:58 +0100 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_11811_-_tools/import=5Fb?= =?utf-8?q?orrowers=2Epl_doesn=27t_support_utf-8_encoded_CSV?= Message-ID: <1393328758-18120-1-git-send-email-dpavlin@rot13.org> Decode utf-8 characters in CSV file Test scenario: 1. go to Tools > Import patrons 2. download sample CSV file 3. create few patrons with utf-8 chars 4. import patrons and verify then utf-8 characters are correct --- tools/import_borrowers.pl | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index 5f65c97..aa26bce 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -48,12 +48,9 @@ use C4::Members::AttributeTypes; use C4::Members::Messaging; use Text::CSV; -# Text::CSV::Unicode, even in binary mode, fails to parse lines with these diacriticals: -# ? -# ? +use utf8; use CGI; -# use encoding 'utf8'; # don't do this my (@errors, @feedback); my $extended = C4::Context->preference('ExtendedPatronAttributes'); @@ -115,6 +112,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { # use header line to construct key to column map my $borrowerline = <$handle>; + utf8::decode($borrowerline); my $status = $csv->parse($borrowerline); ($status) or push @errors, {badheader=>1,line=>$., lineraw=>$borrowerline}; my @csvcolumns = $csv->fields(); @@ -138,6 +136,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { my $date_re = C4::Dates->new->regexp('syspref'); my $iso_re = C4::Dates->new->regexp('iso'); LINE: while ( my $borrowerline = <$handle> ) { + utf8::decode($borrowerline); my %borrower; my @missing_criticals; my $patron_attributes; -- 1.7.2.5 From oleonard at myacpl.org Tue Feb 25 17:02:58 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 25 Feb 2014 11:02:58 -0500 Subject: [Koha-patches] [PATCH] Bug 11719 [Follow-up] Use new DataTables include in serials templates Message-ID: <1393344178-25896-1-git-send-email-oleonard@myacpl.org> This patch corrects column sorting configuration to avoid an error when sorting on the call number column. Also changed: removed obsolete UK sort mention. To test, search for serial subscriptions. Test sorting on all columns in the results table with and without the RoutingSerials preference enabled. Sorting should work correctly without error. --- .../prog/en/modules/serials/serials-search.tt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index e88533b..561e032 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -10,9 +10,6 @@