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

(-)a/Koha/Template/Plugin/Branches.pm (+9 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use Template::Plugin;
23
use Template::Plugin;
24
use base qw( Template::Plugin );
24
use base qw( Template::Plugin );
25
use Encode qw( encode decode );
25
26
26
use C4::Koha;
27
use C4::Koha;
27
use C4::Context;
28
use C4::Context;
29
use C4::Branch qw( GetIndependentGroupModificationRights );
28
30
29
sub GetName {
31
sub GetName {
30
    my ( $self, $branchcode ) = @_;
32
    my ( $self, $branchcode ) = @_;
Lines 83-86 sub all { Link Here
83
    return $branches;
85
    return $branches;
84
}
86
}
85
87
88
sub HasRights {
89
    my( $self, $for ) = @_;
90
91
    my $has_rights = GetIndependentGroupModificationRights({ for => $for });
92
    return $has_rights;
93
}
94
86
1;
95
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 807-813 function verify_images() { Link Here
807
                    </td>
808
                    </td>
808
                [% END %]
809
                [% END %]
809
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
810
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
810
                    <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a></td>
811
                    [% IF !Koha.Preference('IndependentBranches') || Branches.HasRights( item.homebranchcode ) %]
812
                        <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a></td>
813
                    [% ELSE %]
814
                        <td>&nbsp;</td>
815
                    [% END %]
811
                [% END %]
816
                [% END %]
812
                </tr>
817
                </tr>
813
            [% END %]
818
            [% END %]
814
- 

Return to bug 10276