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

(-)a/Koha/Template/Plugin/Branches.pm (-1 / +9 lines)
Lines 21-30 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
use Encode qw( encode decode );
25
25
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Context;
27
use C4::Context;
28
use C4::Branch qw( GetIndependentGroupModificationRights );
28
29
29
sub GetName {
30
sub GetName {
30
    my ( $self, $branchcode ) = @_;
31
    my ( $self, $branchcode ) = @_;
Lines 44-47 sub GetLoggedInBranchcode { Link Here
44
        '';
45
        '';
45
}
46
}
46
47
48
sub HasRights {
49
    my( $self, $for ) = @_;
50
51
    my $has_rights = GetIndependentGroupModificationRights({ for => $for });
52
    return $has_rights;
53
}
54
47
1;
55
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
[% USE KohaDates %]
5
[% USE KohaDates %]
Lines 723-729 function verify_images() { Link Here
723
                    </td>
724
                    </td>
724
                [% END %]
725
                [% END %]
725
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
726
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
726
                    <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a></td>
727
                    [% IF !Koha.Preference('IndependentBranches') || Branches.HasRights( item.homebranchcode ) %]
728
                        <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a></td>
729
                    [% ELSE %]
730
                        <td>&nbsp;</td>
731
                    [% END %]
727
                [% END %]
732
                [% END %]
728
                </tr>
733
                </tr>
729
            [% END %]
734
            [% END %]
730
- 

Return to bug 10276