Bugzilla – Attachment 83858 Details for
Bug 17353
Add phone number column to checkout search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17353: Add phone number column to checkout search
Bug-17353-Add-phone-number-column-to-checkout-sear.patch (text/plain), 6.02 KB, created by
Katrin Fischer
on 2019-01-13 22:15:28 UTC
(
hide
)
Description:
Bug 17353: Add phone number column to checkout search
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-01-13 22:15:28 UTC
Size:
6.02 KB
patch
obsolete
>From 65135efbd772655375b1cadf6e37b8c8c56a0228 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 26 Sep 2016 17:43:20 +0000 >Subject: [PATCH] Bug 17353: Add phone number column to checkout search > >This patch adds borrowers.phone as 'Primary phone' in the checkout >search results. It also ads the table to columns configuration > >To test: >1 - Perform a checkout search >2 - Note phone is not displayed >3 - Apply patch >4 - Note phone does not display >5 - Visit columns configuration >6 - Unhide the 'phone' column >7 - Note phone displays >8 - Ensure page functions as before patch > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Utils/DataTables/Members.pm | 2 +- > admin/columns_settings.yml | 19 ++++++++++++++++++- > .../prog/en/includes/circ-patron-search-results.inc | 2 ++ > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 3 ++- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 2 +- > .../prog/js/circ-patron-search-results.js | 14 ++++++++------ > 6 files changed, 32 insertions(+), 10 deletions(-) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index 1e3f6420a2..caf7a92152 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -64,7 +64,7 @@ sub search { > borrowers.borrowernotes, borrowers.branchcode, borrowers.email, > borrowers.userid, borrowers.dateofbirth, borrowers.categorycode, > categories.description AS category_description, categories.category_type, >- branches.branchname"; >+ branches.branchname, borrowers.phone"; > my $from = "FROM borrowers > LEFT JOIN branches ON borrowers.branchcode = branches.branchcode > LEFT JOIN categories ON borrowers.categorycode = categories.categorycode"; >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index c616851e46..292c72b70d 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -566,7 +566,24 @@ modules: > columnname: export > cannot_be_toggled: 1 > cannot_be_modified: 1 >- >+ table_borrowers: >+ - >+ columnname: name >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: cardnumber >+ - >+ columnname: date_of_birth >+ - >+ columnname: category >+ - >+ columnname: library >+ - >+ columnname: address >+ - >+ columnname: phone >+ is_hidden: 1 > returns: > checkedintable: > - >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >index 8e8845b461..8b34bd6c59 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >@@ -9,6 +9,7 @@ > <th>Category</th> > <th>Library</th> > <th>Address</th> >+ <th>Primary phone</th> > </tr> > </thead> > <tbody> >@@ -30,6 +31,7 @@ > <td>[% Categories.GetName( borrower.categorycode ) | html %]</td> > <td>[% Branches.GetName( borrower.branchcode ) | html %]</td> > <td>[% borrower.address | html %]</td> >+ <td>[% borrower.phone | html %]</td> > </tr> > [% END %] > </tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 3c5a777dc9..9f299a39db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1005,7 +1005,8 @@ No patron matched <span class="ex">[% message | html %]</span> > var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone."); > >- columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >+ columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >+ columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] > > [% IF borrowernumber and patron %] > if($.cookie("holdfor") != [% patron.borrowernumber | html %]){ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 9902f5be01..4fbaea60d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -546,7 +546,7 @@ $(document).ready(function() { > .append(ul) > .insertBefore(oSettings.nTableWrapper) > }, >- }, columns_settings).rowGrouping( >+ }, columns_settings_issues_table).rowGrouping( > { > iGroupingColumnIndex: 1, > iGroupingOrderByColumnIndex: 0, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js b/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >index f778d159c3..fa44b3e96a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >@@ -3,9 +3,11 @@ $(document).ready(function() { > $(".clickable").click(function() { > window.document.location = $(this).data('url'); > }); >- var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aaSorting": [ 0, "asc" ], >- "sDom": "t", >- "iDisplayLength": -1 >- })); >-}); >\ No newline at end of file >+ var table = KohaTable("table_borrowers", >+ { >+ "aaSorting": [ 0, "asc" ], >+ "sDom": "t", >+ "iDisplayLength": -1 >+ }, >+ columns_settings_borrowers_table, null); >+}); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17353
:
55824
|
55831
|
83720
|
83743
|
83775
| 83858 |
83859