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

(-)a/ill/ill-requests.pl (-1 / +10 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 134-139 if ( $backends_available ) { Link Here
134
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
135
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
135
136
136
        # Before request creation operations - Preparation
137
        # Before request creation operations - Preparation
138
        my $history_check =
139
          Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' );
137
        my $availability =
140
        my $availability =
138
          Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' );
141
          Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' );
139
        my $type_disclaimer =
142
        my $type_disclaimer =
Lines 141-148 if ( $backends_available ) { Link Here
141
        my $confirm_auto =
144
        my $confirm_auto =
142
        Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' );
145
        Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' );
143
146
147
        # ILLHistoryCheck operation
148
        if ($history_check->show_history_check($request)) {
149
            $op = 'historycheck';
150
            $template->param(
151
                $history_check->history_check_template_params($params)
152
            )
144
        # ILLCheckAvailability operation
153
        # ILLCheckAvailability operation
145
        if ($availability->show_availability($request)) {
154
        } elsif ($availability->show_availability($request)) {
146
            $op = 'availability';
155
            $op = 'availability';
147
            $template->param(
156
            $template->param(
148
                $availability->availability_template_params($params)
157
                $availability->availability_template_params($params)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-1 / +67 lines)
Lines 59-64 Link Here
59
                <span>Request type disclaimer</span>
59
                <span>Request type disclaimer</span>
60
            [% ELSIF op == 'confirmautoill' %]
60
            [% ELSIF op == 'confirmautoill' %]
61
                <span>Confirm automatic request</span>
61
                <span>Confirm automatic request</span>
62
            [% ELSIF op == 'historycheck' %]
63
                <span>Request history check</span>
62
            [% END %]
64
            [% END %]
63
        [% END %]
65
        [% END %]
64
    [% END #/ WRAPPER breadcrumbs %]
66
    [% END #/ WRAPPER breadcrumbs %]
Lines 945-950 Link Here
945
                            </fieldset>
947
                            </fieldset>
946
                        </form>
948
                        </form>
947
                    </div>
949
                    </div>
950
                [% ELSIF op == 'historycheck' %]
951
                    <!-- historycheck -->
952
                    <h1>Request history check</h1>
953
                    <div id="results" class="page-section">
954
                    <form method="post" id="historycheck-form">
955
                            [% INCLUDE 'csrf-token.inc' %]
956
                            <h3>You are attempting to place the following request:</h3>
957
                                <table>
958
                                [% FOREACH key IN whole.keys %]
959
                                    [% value = whole.$key %]
960
                                    [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' && value %]
961
                                        <tr>
962
                                            <td>[% key_mapping(key) || key | html %]</td>
963
                                            <td>[% value | html %]</td>
964
                                        </tr>
965
                                    [% END %]
966
                                [% END %]
967
                                </table>
968
                                &nbsp;
969
                            <h3>This interlibrary loan has been requested before:</h3>
970
                            [% IF matching_requests_for_patron.size %]
971
                                <h4>By this patron [%- INCLUDE 'patron-title.inc' patron => request_patron_obj hide_patron_infos_if_needed => 1 -%]:</h4>
972
                                <ul class="list-unstyled">
973
                                    [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
974
                                        <li>
975
                                            <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>
976
                                        </li>
977
                                    [% END %]
978
                                </ul>
979
                            [% END %]
980
                            [% IF remaining_matching_requests.size %]
981
                                [% IF matching_requests_for_patron.size %]
982
                                    <h4>By other patrons:</h4>
983
                                [% END %]
984
                                <ul class="list-unstyled">
985
                                    [% FOREACH remaining_matching_request IN remaining_matching_requests %]
986
                                        <li>
987
                                            <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 -%]
988
                                        </li>
989
                                    [% END %]
990
                                </ul>
991
                            [% END %]
992
                            <fieldset class="action">
993
                                [% FOREACH key IN whole.keys %]
994
                                    [% value = whole.$key %]
995
                                    [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
996
                                        <input type="hidden" name="[% key | html %]" value="[% value | html %]">
997
                                    [% END %]
998
                                [% END %]
999
                                [% custom_keys = whole.custom_key.split('\0') %]
1000
                                [% custom_values = whole.custom_value.split('\0') %]
1001
                                [% i = 0 %]
1002
                                [% FOREACH custom_key IN custom_keys %]
1003
                                    <input type="hidden" name="custom_key" value="[% custom_key | html %]">
1004
                                    <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
1005
                                    [% i = i + 1 %]
1006
                                [% END %]
1007
                                <input type="hidden" name="op" value="cud-create" />
1008
                                <input type="hidden" name="stage" value="form">
1009
                                <input type="hidden" name="history_check_submitted" value="1">
1010
                                <input type="submit" class="btn btn-primary" value="Submit anyway" />
1011
                                <a class="cancel" href="ill-requests.pl">Cancel</a>
1012
                            </fieldset>
1013
                        </form>
1014
                    </div>
948
                    [% ELSIF op == 'confirmautoill' %]
1015
                    [% ELSIF op == 'confirmautoill' %]
949
                    <!-- confirmautoill -->
1016
                    <!-- confirmautoill -->
950
                    <h1>Confirm automatic request</h1>
1017
                    <h1>Confirm automatic request</h1>
951
- 

Return to bug 38441