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

(-)a/Koha/Template/Plugin/Branches.pm (+9 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use Template::Plugin;
22
use Template::Plugin;
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
use Encode qw( encode decode );
24
25
25
use C4::Koha;
26
use C4::Koha;
26
use C4::Context;
27
use C4::Context;
28
use C4::Branch qw( GetIndependentGroupModificationRights );
27
29
28
sub GetName {
30
sub GetName {
29
    my ( $self, $branchcode ) = @_;
31
    my ( $self, $branchcode ) = @_;
Lines 53-56 sub GetURL { Link Here
53
    return $b->{branchurl};
55
    return $b->{branchurl};
54
}
56
}
55
57
58
sub HasRights {
59
    my( $self, $for ) = @_;
60
61
    my $has_rights = GetIndependentGroupModificationRights({ for => $for });
62
    return $has_rights;
63
}
64
56
1;
65
1;
(-)a/catalogue/detail.pl (-1 / +2 lines)
Lines 199-205 if ($currentbranch and C4::Context->preference('SeparateHoldings')) { Link Here
199
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
199
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
200
foreach my $item (@items) {
200
foreach my $item (@items) {
201
    my $itembranchcode = $item->{$separatebranch};
201
    my $itembranchcode = $item->{$separatebranch};
202
    $item->{homebranch}        = GetBranchName($item->{homebranch});
202
    $item->{homebranchcode} = $item->{homebranch};
203
    $item->{homebranch}     = GetBranchName( $item->{homebranch} );
203
204
204
    # can place holds defaults to yes
205
    # can place holds defaults to yes
205
    $norequests = 0 unless ( ( $item->{'notforloan'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) );
206
    $norequests = 0 unless ( ( $item->{'notforloan'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +6 lines)
Lines 1-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE KohaDates %]
3
[% USE KohaDates %]
3
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
4
5
Lines 767-773 function verify_images() { Link Here
767
                    </td>
768
                    </td>
768
                [% END %]
769
                [% END %]
769
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
770
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
770
                    <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a></td>
771
                    [% IF !Koha.Preference('IndependentBranches') || Branches.HasRights( item.homebranchcode ) %]
772
                        <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a></td>
773
                    [% ELSE %]
774
                        <td>&nbsp;</td>
775
                    [% END %]
771
                [% END %]
776
                [% END %]
772
                </tr>
777
                </tr>
773
            [% END %]
778
            [% END %]
774
- 

Return to bug 10276