Bugzilla – Attachment 60613 Details for
Bug 12461
Add patron clubs feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12461 - Template updates
Bug-12461---Template-updates.patch (text/plain), 9.00 KB, created by
Kyle M Hall (khall)
on 2017-02-23 14:54:46 UTC
(
hide
)
Description:
Bug 12461 - Template updates
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-02-23 14:54:46 UTC
Size:
9.00 KB
patch
obsolete
>From 0b149b8f5dad392a82faeefe9cf3b709fd5f9917 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@kylehall.info> >Date: Thu, 23 Feb 2017 07:53:25 -0500 >Subject: [PATCH] Bug 12461 - Template updates > >--- > Koha/Template/Plugin/Branches.pm | 7 ----- > Koha/Template/Plugin/Koha.pm | 5 ---- > .../prog/en/modules/clubs/clubs-add-modify.tt | 8 +----- > .../intranet-tmpl/prog/en/modules/clubs/clubs.tt | 4 +-- > .../prog/en/modules/clubs/templates-add-modify.tt | 33 ++++------------------ > 5 files changed, 8 insertions(+), 49 deletions(-) > >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index 99e5694..3d17edc 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -27,13 +27,6 @@ use C4::Koha; > use C4::Context; > use Koha::Libraries; > >-sub GetBranches { >- my ($self) = @_; >- >- my $dbh = C4::Context->dbh; >- return $dbh->selectall_arrayref( "SELECT * FROM branches", { Slice => {} } ); >-} >- > sub GetName { > my ( $self, $branchcode ) = @_; > >diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm >index df38664..0532a04 100644 >--- a/Koha/Template/Plugin/Koha.pm >+++ b/Koha/Template/Plugin/Koha.pm >@@ -58,9 +58,4 @@ sub Version { > }; > } > >-sub UserEnv { >- my ( $self, $key ) = @_; >- my $userenv = C4::Context->userenv; >- return $userenv ? $userenv->{$key} : undef; >-} > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt >index e7230bd..f3398cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt >@@ -66,13 +66,7 @@ > <label for="name">Library:</label> > <select name="branchcode" id="club-template-branchcode"> > <option value=""> </option> >- [% FOREACH b IN Branches.GetBranches() %] >- [% IF b.branchcode == club.branch.branchcode %] >- <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option> >- [% ELSE %] >- <option value="[% b.branchcode %]">[% b.branchname %]</option> >- [% END %] >- [% END %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => club.branch.branchcode ) %] > </select> > </li> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >index cd69780..d706c27 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >@@ -4,7 +4,7 @@ > <title>Koha › Tools › Patron clubs</title> > [% INCLUDE 'doc-head-close.inc' %] > >-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'datatables.inc' %] > > <script type="text/javascript"> >@@ -153,7 +153,7 @@ > [% IF CAN_user_clubs_edit_clubs %] > <div class="btn-toolbar"> > <div class="btn-group"> >- <button class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button> >+ <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button> > <ul class="dropdown-menu"> > [% FOREACH t IN club_templates %] > <li><a href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id %]">[% t.name %]</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >index b311ff4..f7d6a90 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >@@ -1,6 +1,5 @@ > [% USE Branches %] > [% USE AuthorisedValues %] >-[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Patron clubs › Club template</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -69,13 +68,7 @@ > <label for="name">Library:</label> > <select name="branchcode" id="club-template-branchcode"> > <option value=""> </option> >- [% FOREACH b IN Branches.GetBranches() %] >- [% IF b.branchcode == club_template.branchcode %] >- <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option> >- [% ELSE %] >- <option value="[% b.branchcode %]">[% b.branchname %]</option> >- [% END %] >- [% END %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %] > </select> > <span class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</span> > </li> >@@ -102,13 +95,7 @@ > <label for="field-description-[% f.id %]">Authorised value category:</label> > <select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]"> > <option value=""> </option> >- [% FOREACH c IN AuthorisedValuesCategories %] >- [% IF f.authorised_value_category == c %] >- <option selected="selected" value="[% c %]">[% c %]</option> >- [% ELSE %] >- <option value="[% c %]">[% c %]</option> >- [% END %] >- [% END %] >+ [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] > </select> > </li> > >@@ -147,13 +134,7 @@ > <label for="enrollment-field-description-[% f.id %]">Authorised value category:</label> > <select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]"> > <option value=""> </option> >- [% FOREACH c IN AuthorisedValuesCategories %] >- [% IF f.authorised_value_category == c %] >- <option selected="selected" value="[% c %]">[% c %]</option> >- [% ELSE %] >- <option value="[% c %]">[% c %]</option> >- [% END %] >- [% END %] >+ [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] > </select> > </li> > >@@ -201,9 +182,7 @@ > <label for="club_template_field_authorised_value_category">Authorised value category:</label> > <select name="club_template_field_authorised_value_category"> > <option value=""> </option> >- [% FOREACH c IN AuthorisedValuesCategories %] >- <option value="[% c %]">[% c %]</option> >- [% END %] >+ [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] > </select> > </li> > >@@ -231,9 +210,7 @@ > <label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label> > <select name="club_template_enrollment_field_authorised_value_category"> > <option value=""> </option> >- [% FOREACH c IN AuthorisedValuesCategories %] >- <option value="[% c %]">[% c %]</option> >- [% END %] >+ [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] > </select> > </li> > >-- >2.1.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 12461
:
29105
|
30456
|
31567
|
35104
|
36098
|
36099
|
36192
|
38748
|
39181
|
43428
|
47821
|
47824
|
47825
|
47856
|
49110
|
49121
|
50422
|
50423
|
50426
|
50427
|
58818
|
58819
|
58820
|
59272
|
59273
|
60519
|
60520
|
60521
|
60610
|
60611
|
60612
|
60613
|
60614
|
60615
|
60616
|
60617
|
60618
|
60624
|
62778
|
62779
|
62813
|
62814
|
62815