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 request</span>
63
                <span>Confirm 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 886-891 Link Here
886
                        </fieldset>
888
                        </fieldset>
887
                    </form>
889
                    </form>
888
                </div>
890
                </div>
891
            [% ELSIF op == 'historycheck' %]
892
                <!-- historycheck -->
893
                <h1>Request history check</h1>
894
                <div id="results" class="page-section">
895
                    <form method="post" id="historycheck-form">
896
                        [% INCLUDE 'csrf-token.inc' %]
897
                        <h3>You are attempting to place the following request:</h3>
898
                        <table>
899
                            [% FOREACH key IN whole.keys %]
900
                                [% value = whole.$key %]
901
                                [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' && value %]
902
                                    <tr>
903
                                        <td>[% key_mapping(key) || key | html %]</td>
904
                                        <td>[% value | html %]</td>
905
                                    </tr>
906
                                [% END %]
907
                            [% END %]
908
                        </table>
909
                        &nbsp;
910
                        <h3>This interlibrary loan has been requested before:</h3>
911
                        [% IF matching_requests_for_patron.size %]
912
                            <h4>By this patron [%- INCLUDE 'patron-title.inc' patron => request_patron_obj hide_patron_infos_if_needed => 1 -%]:</h4>
913
                            <ul class="list-unstyled">
914
                                [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
915
                                    <li>
916
                                        <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>
917
                                    </li>
918
                                [% END %]
919
                            </ul>
920
                        [% END %]
921
                        [% IF remaining_matching_requests.size %]
922
                            [% IF matching_requests_for_patron.size %]
923
                                <h4>By other patrons:</h4>
924
                            [% END %]
925
                            <ul class="list-unstyled">
926
                                [% FOREACH remaining_matching_request IN remaining_matching_requests %]
927
                                    <li>
928
                                        <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 -%]
929
                                    </li>
930
                                [% END %]
931
                            </ul>
932
                        [% END %]
933
                        <fieldset class="action">
934
                            [% FOREACH key IN whole.keys %]
935
                                [% value = whole.$key %]
936
                                [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
937
                                    <input type="hidden" name="[% key | html %]" value="[% value | html %]" />
938
                                [% END %]
939
                            [% END %]
940
                            [% custom_keys = whole.custom_key.split('\0') %]
941
                            [% custom_values = whole.custom_value.split('\0') %]
942
                            [% i = 0 %]
943
                            [% FOREACH custom_key IN custom_keys %]
944
                                <input type="hidden" name="custom_key" value="[% custom_key | html %]" />
945
                                <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
946
                                [% i = i + 1 %]
947
                            [% END %]
948
                            <input type="hidden" name="op" value="cud-create" />
949
                            <input type="hidden" name="stage" value="form" />
950
                            <input type="hidden" name="history_check_submitted" value="1" />
951
                            <input type="submit" class="btn btn-primary" value="Submit anyway" />
952
                            <a class="cancel" href="ill-requests.pl">Cancel</a>
953
                        </fieldset>
954
                    </form>
955
                </div>
889
            [% ELSIF op == 'confirmautoill' %]
956
            [% ELSIF op == 'confirmautoill' %]
890
                <!-- confirmautoill -->
957
                <!-- confirmautoill -->
891
                <h1>Confirm request</h1>
958
                <h1>Confirm request</h1>
892
- 

Return to bug 38441