Bugzilla – Attachment 19747 Details for
Bug 10429
branch filter not working in serial claims
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF
0001-SIGNED-OFF-Bug-10429-branch-filter-not-working-in-se.patch (text/plain), 3.94 KB, created by
David Cook
on 2013-07-18 06:46:28 UTC
(
hide
)
Description:
[SIGNED OFF
Filename:
MIME Type:
Creator:
David Cook
Created:
2013-07-18 06:46:28 UTC
Size:
3.94 KB
patch
obsolete
>From 401eb8ee15b647815fc2a5f5d2f24115debd7504 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 7 Jun 2013 14:55:18 +0200 >Subject: [PATCH] [SIGNED OFF] Bug 10429 - branch filter not working in serial > claims > >In serial claims page, the branch code is displayed in table instead of branch name and branch filter does not work. > >This patch adds the display of branch name by using branches template plugin. >It changes javascript branch filter to make it work. >Also sets "all" filter in template (like status filter) to allow translation and sets "all" as selected by default. Librairian branch was selected by default, but the table was not filtered with it. > >Test plan : >- Go to serials claim of a vendor with serials of multiple branches >=> You see branch filter with "(All)" and table shows libraries names >- Check that branch filter does its work > >Signed-off-by: David Cook <dcook@prosentient.com.au> > >Works as described. >--- > .../prog/en/modules/serials/claims.tt | 34 +++++++++++--------- > serials/claims.pl | 1 - > 2 files changed, 19 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index e309ab1..2882264 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -1,3 +1,5 @@ >+[% USE Branches %] >+ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Serials › Claims</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -80,16 +82,21 @@ > } > } > >- // Filter by branch >- function filterByBranch() { >- selectedBranch = $("#branchfilter").val(); >- if (selectedBranch == "all") { >- clearFilters(); >- } else { >- $("table#claimst tbody tr").hide(); >- $("table#claimst tbody tr:contains(" + selectedBranch + ")").show(); >- } >- } >+ // Filter by branch >+ function filterByBranch() { >+ selectedBranch = $("#branchfilter").val(); >+ if (selectedBranch == "all") { >+ clearFilters(); >+ } else { >+ $("table#claimst tbody tr").hide(); >+ $("table#claimst tbody tr").each( function() { >+ if ( $(this).find("span.branch-" + selectedBranch).size() > 0 ) { >+ $(this).show(); >+ } >+ }); >+ } >+ } >+ > // Filter by date > function filterByDate() { > var beginDate = Date_from_syspref($("#from").val()).getTime(); >@@ -219,12 +226,9 @@ > <li> > <label for="branchfilter">Library: </label> > <select id="branchfilter" onchange="filterByBranch();"> >+ <option value="all" selected="selected">(All)</option> > [% FOREACH branchloo IN branchloop %] >- [% IF ( branchloo.selected ) %] >- <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> >- [% ELSE %] > <option value="[% branchloo.value %]">[% branchloo.branchname %]</option> >- [% END %] > [% END %] > </select> > </li> >@@ -273,7 +277,7 @@ > [% missingissue.name %] > </td> > <td> >- [% missingissue.branchcode %] >+ <span class="branch-[% missingissue.branchcode %]">[% Branches.GetName( missingissue.branchcode ) %]</span> > </td> > <td> > <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% missingissue.subscriptionid %]">[% missingissue.title |html %]</a> >diff --git a/serials/claims.pl b/serials/claims.pl >index 5434b2a..341b6de 100755 >--- a/serials/claims.pl >+++ b/serials/claims.pl >@@ -72,7 +72,6 @@ if ($supplierid) { > } > > my $branchloop = GetBranchesLoop(); >-unshift @$branchloop, {value=> 'all',name=>''}; > > my $preview=0; > if($op && $op eq 'preview'){ >-- >1.7.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 10429
:
18745
|
19747
|
19748
|
19839
|
23864