Bugzilla – Attachment 11751 Details for
Bug 7919
Display of values depending on the connexion library (authorised values, patron categories, extended attributes)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7919: Followup FIX several behaviours
0001-Bug-7919-Followup-FIX-several-behaviours.patch (text/plain), 5.60 KB, created by
Jonathan Druart
on 2012-08-22 14:59:02 UTC
(
hide
)
Description:
Bug 7919: Followup FIX several behaviours
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-08-22 14:59:02 UTC
Size:
5.60 KB
patch
obsolete
>From ec2692495fc4c6bf98c8922cb5fcf0863e2dbc66 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 22 Aug 2012 16:53:39 +0200 >Subject: [PATCH 1/1] Bug 7919: Followup FIX several behaviours > >--- > C4/Input.pm | 2 +- > C4/Items.pm | 20 ++++++++++++++++++-- > .../prog/en/modules/admin/authorised_values.tt | 2 +- > .../prog/en/modules/admin/categorie.tt | 2 +- > .../prog/en/modules/admin/patron-attr-types.tt | 4 ++-- > 5 files changed, 23 insertions(+), 7 deletions(-) > >diff --git a/C4/Input.pm b/C4/Input.pm >index 2262750..ba30460 100644 >--- a/C4/Input.pm >+++ b/C4/Input.pm >@@ -137,7 +137,7 @@ sub buildCGIsort { > $query .= qq{ GROUP BY lib ORDER BY lib}; > > my $sth=$dbh->prepare($query); >- $sth->execute( $branch_limit ? $branch_limit : (), $name ); >+ $sth->execute( $name, $branch_limit ? $branch_limit : () ); > my $CGISort; > if ($sth->rows>0){ > my @values; >diff --git a/C4/Items.pm b/C4/Items.pm >index a9c0a16..08234ce 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2597,7 +2597,20 @@ sub PrepareItemrecordDisplay { > $itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum ); > } > my @loop_data; >- my $authorised_values_sth = $dbh->prepare( "SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib" ); >+ >+ my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : ""; >+ my $query = qq{ >+ SELECT authorised_value,lib FROM authorised_values >+ }; >+ $query .= qq{ >+ LEFT JOIN authorised_values_branches ON ( id = av_id ) >+ } if $branch_limit; >+ $query .= qq{ >+ WHERE category = ? >+ }; >+ $query .= qq{ AND ( branchcode = ? OR branchcode IS NULL )} if $branch_limit; >+ $query .= qq{ ORDER BY lib}; >+ my $authorised_values_sth = $dbh->prepare( $query ); > foreach my $tag ( sort keys %{$tagslib} ) { > my $previous_tag = ''; > if ( $tag ne '' ) { >@@ -2726,7 +2739,10 @@ sub PrepareItemrecordDisplay { > > #---- "true" authorised value > } else { >- $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value} ); >+ $authorised_values_sth->execute( >+ $tagslib->{$tag}->{$subfield}->{authorised_value}, >+ $branch_limit ? $branch_limit : () >+ ); > push @authorised_values, "" > unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); > while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index 2b56f21..f6a69c6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -270,7 +270,7 @@ > [% FOREACH branch IN loo.branches %] > [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] > [% END %] >- <a href="#" title="[% branches_str %]">[% loo.branches.size %] branches limitations</a> >+ <span href="#" title="[% branches_str %]">[% loo.branches.size %] branches limitations</span> > [% ELSE %] > No limitation > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >index 0c7c5dd..9398ca6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >@@ -371,7 +371,7 @@ Confirm deletion of category [% categorycode |html %][% END %]</legend> > [% FOREACH branch IN loo.branches %] > [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] > [% END %] >- <a href="#" title="[% branches_str %]">[% loo.branches.size %] branches limitations</a> >+ <span title="[% branches_str %]">[% loo.branches.size %] branches limitations</span> > [% ELSE %] > No limitation > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >index 5f63618..3fb9760 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >@@ -305,8 +305,8 @@ function CheckAttributeTypeForm(f) { > <tr> > <th>Code</th> > <th>Description</th> >- <th>Actions</th> > <th>Branches limitation</th> >+ <th>Actions</th> > </tr> > </thead> > <tbody> >@@ -320,7 +320,7 @@ function CheckAttributeTypeForm(f) { > [% FOREACH branch IN item.branches %] > [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] > [% END %] >- <a href="#" title="[% branches_str %]">[% item.branches.size %] branches limitations</a> >+ <span title="[% branches_str %]">[% item.branches.size %] branches limitations</span> > [% ELSE %] > No limitation > [% END %] >-- >1.7.10.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 7919
:
8939
|
9170
|
9973
|
9984
|
10424
|
11163
|
11168
|
11373
|
11751
|
13736
|
13862
|
13867
|
13868
|
13891
|
13901
|
13952
|
13953
|
14162
|
14163
|
14184
|
14287
|
14350
|
14372
|
14377