@@ -, +, @@ - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. --- .../prog/css/src/staff-global.scss | 20 +++ .../prog/en/includes/patron-search.inc | 5 +- .../prog/en/modules/members/member.tt | 128 +++++++++++++----- .../intranet-tmpl/prog/js/staff-global.js | 1 + 4 files changed, 117 insertions(+), 37 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2213,6 +2213,26 @@ li { } } +#patron_search_selected { + background-color: #F9FEFF; + border: 1px solid #B9D8D9; + border-color: #A2CBCC #CEE0E3 #CEE0E3 #A2CBCC; + border-radius: 3px; + color: #333; + display: inline-block; + font-size: 11px; + line-height: 1.5; + padding: 5px 10px; + text-align: center; + vertical-align: middle; + white-space: nowrap; +} + +#clear-patron-selection { + display: inline-block; + margin-left: 1em; +} + #search-facets { border: 1px solid #B9D8D9; border-radius: 5px 5px 0 0; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -369,7 +369,7 @@ return json.data; } }, - [% IF open_on_row_click OR preview_on_name_click %] + [% IF open_on_row_click OR preview_on_name_click OR remember_selections %] "drawCallback": function( settings ) { var api = this.api(); var data = api.data(); @@ -389,6 +389,9 @@ $(tr).find("a.patron_name").addClass("patron_preview"); }); [% END %] + [% IF remember_selections %] + prepSelections(); + [% END %] }, [% END %] "iDeferLoading": defer_loading, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -95,6 +95,10 @@ [% IF CAN_user_borrowers_edit_borrowers %] [% END %] + [% END %] @@ -147,15 +151,38 @@ [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %]