View | Details | Raw Unified | Return to bug 7919
Collapse All | Expand All

(-)a/C4/Input.pm (-1 / +1 lines)
Lines 137-143 sub buildCGIsort { Link Here
137
    $query .= qq{ GROUP BY lib ORDER BY lib};
137
    $query .= qq{ GROUP BY lib ORDER BY lib};
138
138
139
    my $sth=$dbh->prepare($query);
139
    my $sth=$dbh->prepare($query);
140
    $sth->execute( $branch_limit ? $branch_limit : (), $name );
140
    $sth->execute( $name, $branch_limit ? $branch_limit : () );
141
    my $CGISort;
141
    my $CGISort;
142
    if ($sth->rows>0){
142
    if ($sth->rows>0){
143
        my @values;
143
        my @values;
(-)a/C4/Items.pm (-2 / +18 lines)
Lines 2597-2603 sub PrepareItemrecordDisplay { Link Here
2597
        $itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum );
2597
        $itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum );
2598
    }
2598
    }
2599
    my @loop_data;
2599
    my @loop_data;
2600
    my $authorised_values_sth = $dbh->prepare( "SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib" );
2600
2601
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
2602
    my $query = qq{
2603
        SELECT authorised_value,lib FROM authorised_values
2604
    };
2605
    $query .= qq{
2606
        LEFT JOIN authorised_values_branches ON ( id = av_id )
2607
    } if $branch_limit;
2608
    $query .= qq{
2609
        WHERE category = ?
2610
    };
2611
    $query .= qq{ AND ( branchcode = ? OR branchcode IS NULL )} if $branch_limit;
2612
    $query .= qq{ ORDER BY lib};
2613
    my $authorised_values_sth = $dbh->prepare( $query );
2601
    foreach my $tag ( sort keys %{$tagslib} ) {
2614
    foreach my $tag ( sort keys %{$tagslib} ) {
2602
        my $previous_tag = '';
2615
        my $previous_tag = '';
2603
        if ( $tag ne '' ) {
2616
        if ( $tag ne '' ) {
Lines 2726-2732 sub PrepareItemrecordDisplay { Link Here
2726
2739
2727
                        #---- "true" authorised value
2740
                        #---- "true" authorised value
2728
                    } else {
2741
                    } else {
2729
                        $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value} );
2742
                        $authorised_values_sth->execute(
2743
                            $tagslib->{$tag}->{$subfield}->{authorised_value},
2744
                            $branch_limit ? $branch_limit : ()
2745
                        );
2730
                        push @authorised_values, ""
2746
                        push @authorised_values, ""
2731
                          unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
2747
                          unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
2732
                        while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
2748
                        while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-1 / +1 lines)
Lines 270-276 Link Here
270
            [% FOREACH branch IN loo.branches %]
270
            [% FOREACH branch IN loo.branches %]
271
                [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
271
                [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
272
            [% END %]
272
            [% END %]
273
            <a href="#" title="[% branches_str %]">[% loo.branches.size %] branches limitations</a>
273
            <span href="#" title="[% branches_str %]">[% loo.branches.size %] branches limitations</span>
274
        [% ELSE %]
274
        [% ELSE %]
275
            No limitation
275
            No limitation
276
        [% END %]
276
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt (-1 / +1 lines)
Lines 371-377 Confirm deletion of category [% categorycode |html %][% END %]</legend> Link Here
371
                                [% FOREACH branch IN loo.branches %]
371
                                [% FOREACH branch IN loo.branches %]
372
                                    [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
372
                                    [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
373
                                [% END %]
373
                                [% END %]
374
                                <a href="#" title="[% branches_str %]">[% loo.branches.size %] branches limitations</a>
374
                                <span title="[% branches_str %]">[% loo.branches.size %] branches limitations</span>
375
                            [% ELSE %]
375
                            [% ELSE %]
376
                                No limitation
376
                                No limitation
377
                            [% END %]
377
                            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-3 / +2 lines)
Lines 305-312 function CheckAttributeTypeForm(f) { Link Here
305
        <tr>
305
        <tr>
306
          <th>Code</th>
306
          <th>Code</th>
307
          <th>Description</th>
307
          <th>Description</th>
308
          <th>Actions</th>
309
          <th>Branches limitation</th>
308
          <th>Branches limitation</th>
309
          <th>Actions</th>
310
        </tr>
310
        </tr>
311
      </thead>
311
      </thead>
312
      <tbody>
312
      <tbody>
Lines 320-326 function CheckAttributeTypeForm(f) { Link Here
320
                    [% FOREACH branch IN item.branches %]
320
                    [% FOREACH branch IN item.branches %]
321
                        [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
321
                        [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
322
                    [% END %]
322
                    [% END %]
323
                    <a href="#" title="[% branches_str %]">[% item.branches.size %] branches limitations</a>
323
                    <span title="[% branches_str %]">[% item.branches.size %] branches limitations</span>
324
                [% ELSE %]
324
                [% ELSE %]
325
                    No limitation
325
                    No limitation
326
                [% END %]
326
                [% END %]
327
- 

Return to bug 7919