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

Return to bug 38441