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 102-107 Link Here
102
        :disabled{
102
        :disabled{
103
            opacity:0.5
103
            opacity:0.5
104
        }
104
        }
105
106
        .disabled_trash{       
107
            pointer-events: none;       
108
            cursor: not-allowed ;
109
            color: #777;  
110
        }
105
    </style>
111
    </style>
106
[% END %]
112
[% END %]
107
</head>
113
</head>
Lines 1859-1864 Link Here
1859
                return false;
1865
                return false;
1860
            });
1866
            });
1861
1867
1868
            [% IF (!is_super_librarian) %]  
1869
                var user_branch = "[% user_branch %]";
1870
                if(user_branch !== undefined && user_branch !== ""){
1871
                    $('#patron_holds_table tbody tr').each(function() {
1872
                        var link = $(this).find('a[href*="member"]');
1873
                        var rankRequest = $(this).find("select[name='rank-request']");
1874
                        if (!link.length){
1875
                           $(this).find('.cancel-hold, .fa-trash').addClass('disabled_trash');
1876
                        }
1877
                        $(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');
1878
                        $('.select_hold_all, .hold-arrow').addClass('disabled').attr('disabled', 'disabled');
1879
                        $('.suspend-hold').prop('disabled', true);
1880
                    });
1881
               }
1882
            [% END %]
1883
1862
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %]
1884
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %]
1863
                [% IF ( PatronAutoComplete ) %]
1885
                [% IF ( PatronAutoComplete ) %]
1864
                    patron_autocomplete($(".search_patron_filter"), { 'link-to': 'reserve', 'url-params': '[% url_biblio_params | url %]' });
1886
                    patron_autocomplete($(".search_patron_filter"), { 'link-to': 'reserve', 'url-params': '[% url_biblio_params | url %]' });
(-)a/reserve/request.pl (-5 / +13 lines)
Lines 40-45 use C4::Serials qw( CountSubscriptionFromBiblionumber ); Link Here
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
use C4::Search qw( enabled_staff_search_views );
42
use C4::Search qw( enabled_staff_search_views );
43
use C4::Context;
43
44
44
use Koha::Biblios;
45
use Koha::Biblios;
45
use Koha::Checkouts;
46
use Koha::Checkouts;
Lines 64-69 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( Link Here
64
    }
65
    }
65
);
66
);
66
67
68
my $is_super_librarian = C4::Context->IsSuperLibrarian();
69
my $user_branch = C4::Context->preference("IndependentBranches") ? C4::Context->userenv->{'branch'}: undef;
70
71
$template->param(
72
    is_super_librarian => $is_super_librarian,
73
    user_branch => $user_branch,
74
);
75
67
my $showallitems = $input->param('showallitems');
76
my $showallitems = $input->param('showallitems');
68
my $pickup = $input->param('pickup');
77
my $pickup = $input->param('pickup');
69
78
Lines 111-120 if ( $op eq 'cud-move' ) { Link Here
111
    }
120
    }
112
}
121
}
113
elsif ( $op eq 'cud-cancel' ) {
122
elsif ( $op eq 'cud-cancel' ) {
114
    my $reserve_id          = $input->param('reserve_id');
123
        my $reserve_id          = $input->param('reserve_id');
115
    my $cancellation_reason = $input->param("cancellation-reason");
124
        my $cancellation_reason = $input->param("cancellation-reason");
116
    my $hold                = Koha::Holds->find($reserve_id);
125
        my $hold                = Koha::Holds->find($reserve_id);
117
    $hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold;
126
        $hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold;
118
}
127
}
119
elsif ( $op eq 'cud-setLowestPriority' ) {
128
elsif ( $op eq 'cud-setLowestPriority' ) {
120
    my $reserve_id = $input->param('reserve_id');
129
    my $reserve_id = $input->param('reserve_id');
121
- 

Return to bug 38040