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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (+22 lines)
Lines 105-110 Link Here
105
        :disabled {
105
        :disabled {
106
            opacity: 0.5;
106
            opacity: 0.5;
107
        }
107
        }
108
109
        .disabled_trash{
110
            pointer-events: none;
111
            cursor: not-allowed ;
112
            color: #777;
113
        }
108
    </style>
114
    </style>
109
[% END %]
115
[% END %]
110
</head>
116
</head>
Lines 1801-1806 Link Here
1801
                return false;
1807
                return false;
1802
            });
1808
            });
1803
1809
1810
            [% IF (!CAN_user_superlibrarian) %]
1811
                var user_branch = "[% Branches.GetLoggedInBranchcode %]";
1812
                if(user_branch !== undefined && user_branch !== ""){
1813
                    $('#patron_holds_table tbody tr').each(function() {
1814
                        var link = $(this).find('a[href*="member"]');
1815
                        var rankRequest = $(this).find("select[name='rank-request']");
1816
                        if (!link.length){
1817
                           $(this).find('.cancel-hold, .fa-trash').addClass('disabled_trash');
1818
                        }
1819
                        $(this).find('.select_hold, .rank-request, td a[data-op="cud-move"], .flatpickr, .toggle-suspend, .clear_date, [name*="change_hold_type_"]').addClass('disabled').attr('disabled', 'disabled');
1820
                        $('.select_hold_all, .hold-arrow').addClass('disabled').attr('disabled', 'disabled');
1821
                        $('.suspend-hold').prop('disabled', true);
1822
                    });
1823
               }
1824
            [% END %]
1825
1804
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %]
1826
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %]
1805
                [% IF ( PatronAutoComplete ) %]
1827
                [% IF ( PatronAutoComplete ) %]
1806
                    patron_autocomplete($(".search_patron_filter"), { 'link-to': 'reserve', 'url-params': '[% url_biblio_params | url %]' });
1828
                    patron_autocomplete($(".search_patron_filter"), { 'link-to': 'reserve', 'url-params': '[% url_biblio_params | url %]' });
(-)a/reserve/request.pl (-1 / +13 lines)
Lines 39-45 use C4::Koha qw( getitemtypeimagelocation ); Link Here
39
use C4::Serials     qw( CountSubscriptionFromBiblionumber );
39
use C4::Serials     qw( CountSubscriptionFromBiblionumber );
40
use C4::Circulation qw( _GetCircControlBranch GetBranchItemRule );
40
use C4::Circulation qw( _GetCircControlBranch GetBranchItemRule );
41
use Koha::DateUtils qw( dt_from_string );
41
use Koha::DateUtils qw( dt_from_string );
42
<<<<<<< HEAD
42
use C4::Search      qw( enabled_staff_search_views );
43
use C4::Search      qw( enabled_staff_search_views );
44
=======
45
use C4::Search qw( enabled_staff_search_views );
46
use C4::Context;
47
>>>>>>> Bug 38040: Prevent editing other libraries' holds when IndependentBranches is enabled
43
48
44
use Koha::Biblios;
49
use Koha::Biblios;
45
use Koha::Checkouts;
50
use Koha::Checkouts;
Lines 64-69 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( Link Here
64
    }
69
    }
65
);
70
);
66
71
72
my $is_super_librarian = C4::Context->IsSuperLibrarian();
73
my $user_branch = C4::Context->preference("IndependentBranches") ? C4::Context->userenv->{'branch'}: undef;
74
75
$template->param(
76
    is_super_librarian => $is_super_librarian,
77
    user_branch => $user_branch,
78
);
79
67
my $showallitems = $input->param('showallitems');
80
my $showallitems = $input->param('showallitems');
68
my $pickup       = $input->param('pickup');
81
my $pickup       = $input->param('pickup');
69
82
70
- 

Return to bug 38040