Bugzilla – Attachment 64422 Details for
Bug 18818
Manage categories displayed in Quick add patron list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18818: Display in quick add list now depends on a field in database
Bug-18818-Display-in-quick-add-list-now-depends-on.patch (text/plain), 6.22 KB, created by
Baptiste Wojtkowski (bwoj)
on 2017-06-19 10:13:43 UTC
(
hide
)
Description:
Bug 18818: Display in quick add list now depends on a field in database
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2017-06-19 10:13:43 UTC
Size:
6.22 KB
patch
obsolete
>From 07d45906fe4b82fbf9089202d7855f1df9713839 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Mon, 19 Jun 2017 10:05:37 +0000 >Subject: [PATCH] Bug 18818: Display in quick add list now depends on a field > in database > >test plan: >1 - Apply patch >2 - Run update misc/devel/update_dbix_class_files.pl >3 - Run installer/data/mysql/updatedatabase.pl >4 - Check in Administation>patron categories there is a field named "Display in Quick add patron" (and check everything is set to "Display") >5 - Try to edit and check that the field exists and edits well the field >6 - Go to Patrons => quick add patron and check that the list displayed only consists in wished categories >--- > admin/categories.pl | 2 ++ > .../bug_18818_quick_add_patron_category_list.sql | 1 + > .../intranet-tmpl/prog/en/includes/patron-toolbar.inc | 2 +- > .../intranet-tmpl/prog/en/modules/admin/categories.tt | 14 ++++++++++++++ > 4 files changed, 18 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_18818_quick_add_patron_category_list.sql > >diff --git a/admin/categories.pl b/admin/categories.pl >index 358ef7d..33556a3 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -92,6 +92,7 @@ elsif ( $op eq 'add_validate' ) { > my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions'); > my $checkPrevCheckout = $input->param('checkprevcheckout'); > my $default_privacy = $input->param('default_privacy'); >+ my $quick_add_display = $input->param('quick_add_display'); > my @branches = grep { $_ ne q{} } $input->multi_param('branches'); > > my $is_a_modif = $input->param("is_a_modif"); >@@ -121,6 +122,7 @@ elsif ( $op eq 'add_validate' ) { > $category->category_type($category_type); > $category->BlockExpiredPatronOpacActions($BlockExpiredPatronOpacActions); > $category->checkprevcheckout($checkPrevCheckout); >+ $category->quick_add_display($quick_add_display); > $category->default_privacy($default_privacy); > eval { > $category->store; >diff --git a/installer/data/mysql/atomicupdate/bug_18818_quick_add_patron_category_list.sql b/installer/data/mysql/atomicupdate/bug_18818_quick_add_patron_category_list.sql >new file mode 100644 >index 0000000..35a82a4 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_18818_quick_add_patron_category_list.sql >@@ -0,0 +1 @@ >+ALTER TABLE categories ADD quick_add_display integer DEFAULT 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >index ea89124..52155c1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >@@ -14,7 +14,7 @@ > <div class="btn-group"> > <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> Quick add new patron <span class="caret"></span></button> > <ul class="dropdown-menu"> >- [% FOREACH category IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% category.categorycode %]&quickadd=true">[% category.description %]</a></li>[% END %] >+ [% FOREACH category IN categories %][% IF category.quick_add_display %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% category.categorycode %]&quickadd=true">[% category.description %]</a></li>[% END %][% END %] > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >index e33b36f..0d26f3e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -212,6 +212,13 @@ > </li> > [% END %] > <li> >+ <label for="quick_add_display">Display in quick add patron list:</label> >+ <select id=quick_add_display name=quick_add_display> >+ <option value=1 [% UNLESS category.quick_add_display %]selected=selected [% END %]>Display</option> >+ <option value=0 [% UNLESS category.quick_add_display %]selected=selected [% END %]>Don't Display</option> >+ </select> >+ </li> >+ <li> > <label for="default_privacy">Default privacy: </label> > <select id="default_privacy" name="default_privacy"> > [% SET default_privacy = 'default' %] >@@ -283,6 +290,7 @@ > <tr><th scope="row">Receives overdue notices: </th><td>[% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]</td></tr> > <tr><th scope="row">Lost items in staff client</th><td>[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]</td></tr> > <tr><th scope="row">Hold fee: </th><td>[% category.reservefee | $Price %]</td></tr> >+ <tr><th scope="row">Display in Quick Add Patron</th>></tr> > > [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] > <tr> >@@ -355,6 +363,7 @@ > <th scope="col">Messaging</th> > [% END %] > <th scope="col">Branches limitations</th> >+ <th scope="col">Display in Quick Add Patron</th> > [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] > <th scope="col">Check previous checkout?</th> > [% END %] >@@ -463,6 +472,11 @@ > </td> > [% END %] > <td> >+ [% IF category.quick_add_display %] Display >+ [% ELSE %] Don't Display >+ [% END %] >+ </td> >+ <td> > [% SWITCH category.default_privacy %] > [% CASE 'default' %] > Default >-- >2.7.4
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 18818
:
64422
|
70801
|
70802
|
70955
|
70956
|
70959
|
70960
|
70962
|
70963
|
70964
|
71227
|
71228
|
71229
|
72867
|
72868
|
72869
|
73604
|
74831
|
74832
|
74833
|
74834