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 1800-1805 Link Here
1800
                return false;
1806
                return false;
1801
            });
1807
            });
1802
1808
1809
            [% IF (!CAN_user_superlibrarian) %]
1810
                var user_branch = "[% Branches.GetLoggedInBranchcode %]";
1811
                if(user_branch !== undefined && user_branch !== ""){
1812
                    $('#patron_holds_table tbody tr').each(function() {
1813
                        var link = $(this).find('a[href*="member"]');
1814
                        var rankRequest = $(this).find("select[name='rank-request']");
1815
                        if (!link.length){
1816
                           $(this).find('.cancel-hold, .fa-trash').addClass('disabled_trash');
1817
                        }
1818
                        $(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');
1819
                        $('.select_hold_all, .hold-arrow').addClass('disabled').attr('disabled', 'disabled');
1820
                        $('.suspend-hold').prop('disabled', true);
1821
                    });
1822
               }
1823
            [% END %]
1824
1803
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %]
1825
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %]
1804
                [% IF ( PatronAutoComplete ) %]
1826
                [% IF ( PatronAutoComplete ) %]
1805
                    patron_autocomplete($(".search_patron_filter"), { 'link-to': 'reserve', 'url-params': '[% url_biblio_params | url %]' });
1827
                    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