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

(-)a/ill/ill-requests.pl (-2 / +9 lines)
Lines 30-35 use Koha::ILL::Requests; Link Here
30
use Koha::ILL::Request;
30
use Koha::ILL::Request;
31
use Koha::ILL::Batches;
31
use Koha::ILL::Batches;
32
use Koha::ILL::Request::Workflow::Availability;
32
use Koha::ILL::Request::Workflow::Availability;
33
use Koha::ILL::Request::Workflow::HistoryCheck;
33
use Koha::ILL::Request::Workflow::TypeDisclaimer;
34
use Koha::ILL::Request::Workflow::TypeDisclaimer;
34
use Koha::ILL::Request::Workflow::ConfirmAuto;
35
use Koha::ILL::Request::Workflow::ConfirmAuto;
35
use Koha::Libraries;
36
use Koha::Libraries;
Lines 133-144 if ($backends_available) { Link Here
133
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
134
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
134
135
135
        # Before request creation operations - Preparation
136
        # Before request creation operations - Preparation
137
        my $history_check   = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' );
136
        my $availability    = Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' );
138
        my $availability    = Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' );
137
        my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'staff' );
139
        my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'staff' );
138
        my $confirm_auto    = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' );
140
        my $confirm_auto    = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' );
139
141
140
        # ILLCheckAvailability operation
142
        # ILLHistoryCheck operation
141
        if ( $availability->show_availability($request) ) {
143
        if ( $history_check->show_history_check($request) ) {
144
            $op = 'historycheck';
145
            $template->param( $history_check->history_check_template_params($params) )
146
147
                # ILLCheckAvailability operation
148
        } elsif ( $availability->show_availability($request) ) {
142
            $op = 'availability';
149
            $op = 'availability';
143
            $template->param( $availability->availability_template_params($params) )
150
            $template->param( $availability->availability_template_params($params) )
144
151
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-1 / +67 lines)
Lines 61-66 Link Here
61
                <span>Request type disclaimer</span>
61
                <span>Request type disclaimer</span>
62
            [% ELSIF op == 'confirmautoill' %]
62
            [% ELSIF op == 'confirmautoill' %]
63
                <span>Confirm automatic request</span>
63
                <span>Confirm automatic request</span>
64
            [% ELSIF op == 'historycheck' %]
65
                <span>Request history check</span>
64
            [% END %]
66
            [% END %]
65
        [% END %]
67
        [% END %]
66
    [% END #/ WRAPPER breadcrumbs %]
68
    [% END #/ WRAPPER breadcrumbs %]
Lines 858-863 Link Here
858
                        </fieldset>
860
                        </fieldset>
859
                    </form>
861
                    </form>
860
                </div>
862
                </div>
863
            [% ELSIF op == 'historycheck' %]
864
                <!-- historycheck -->
865
                <h1>Request history check</h1>
866
                <div id="results" class="page-section">
867
                    <form method="post" id="historycheck-form">
868
                        [% INCLUDE 'csrf-token.inc' %]
869
                        <h3>You are attempting to place the following request:</h3>
870
                        <table>
871
                            [% FOREACH key IN whole.keys %]
872
                                [% value = whole.$key %]
873
                                [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' && value %]
874
                                    <tr>
875
                                        <td>[% key_mapping(key) || key | html %]</td>
876
                                        <td>[% value | html %]</td>
877
                                    </tr>
878
                                [% END %]
879
                            [% END %]
880
                        </table>
881
                        &nbsp;
882
                        <h3>This interlibrary loan has been requested before:</h3>
883
                        [% IF matching_requests_for_patron.size %]
884
                            <h4>By this patron [%- INCLUDE 'patron-title.inc' patron => request_patron_obj hide_patron_infos_if_needed => 1 -%]:</h4>
885
                            <ul class="list-unstyled">
886
                                [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
887
                                    <li>
888
                                        <a href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% matching_request_for_patron.illrequest_id %]">ILL Request #[% matching_request_for_patron.illrequest_id %]</a>
889
                                    </li>
890
                                [% END %]
891
                            </ul>
892
                        [% END %]
893
                        [% IF remaining_matching_requests.size %]
894
                            [% IF matching_requests_for_patron.size %]
895
                                <h4>By other patrons:</h4>
896
                            [% END %]
897
                            <ul class="list-unstyled">
898
                                [% FOREACH remaining_matching_request IN remaining_matching_requests %]
899
                                    <li>
900
                                        <a href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% remaining_matching_request.illrequest_id %]">ILL Request #[% remaining_matching_request.illrequest_id %]</a> by [%- INCLUDE 'patron-title.inc' patron => remaining_matching_request.patron hide_patron_infos_if_needed => 1 -%]
901
                                    </li>
902
                                [% END %]
903
                            </ul>
904
                        [% END %]
905
                        <fieldset class="action">
906
                            [% FOREACH key IN whole.keys %]
907
                                [% value = whole.$key %]
908
                                [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
909
                                    <input type="hidden" name="[% key | html %]" value="[% value | html %]" />
910
                                [% END %]
911
                            [% END %]
912
                            [% custom_keys = whole.custom_key.split('\0') %]
913
                            [% custom_values = whole.custom_value.split('\0') %]
914
                            [% i = 0 %]
915
                            [% FOREACH custom_key IN custom_keys %]
916
                                <input type="hidden" name="custom_key" value="[% custom_key | html %]" />
917
                                <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
918
                                [% i = i + 1 %]
919
                            [% END %]
920
                            <input type="hidden" name="op" value="cud-create" />
921
                            <input type="hidden" name="stage" value="form" />
922
                            <input type="hidden" name="history_check_submitted" value="1" />
923
                            <input type="submit" class="btn btn-primary" value="Submit anyway" />
924
                            <a class="cancel" href="ill-requests.pl">Cancel</a>
925
                        </fieldset>
926
                    </form>
927
                </div>
861
            [% ELSIF op == 'confirmautoill' %]
928
            [% ELSIF op == 'confirmautoill' %]
862
                <!-- confirmautoill -->
929
                <!-- confirmautoill -->
863
                <h1>Confirm automatic request</h1>
930
                <h1>Confirm automatic request</h1>
864
- 

Return to bug 38441