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 / +72 lines)
Lines 44-49 Link Here
44
            [% WRAPPER breadcrumb_item bc_active= 1 %]
44
            [% WRAPPER breadcrumb_item bc_active= 1 %]
45
                <span>Request type disclaimer</span>
45
                <span>Request type disclaimer</span>
46
            [% END %]
46
            [% END %]
47
        [% ELSIF op == 'historycheck' %]
48
            [% WRAPPER breadcrumb_item %]
49
                <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
50
            [% END %]
51
            [% WRAPPER breadcrumb_item bc_active= 1 %]
52
                <span>Request history check</span>
53
            [% END %]
47
        [% ELSIF op == 'confirmautoill' %]
54
        [% ELSIF op == 'confirmautoill' %]
48
            [% WRAPPER breadcrumb_item %]
55
            [% WRAPPER breadcrumb_item %]
49
                <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
56
                <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
Lines 936-941 Link Here
936
                            </fieldset>
943
                            </fieldset>
937
                        </form>
944
                        </form>
938
                    </div>
945
                    </div>
946
                [% ELSIF op == 'historycheck' %]
947
                    <!-- historycheck -->
948
                    <h1>Request history check</h1>
949
                    <div id="results" class="page-section">
950
                    <form method="post" id="historycheck-form">
951
                            [% INCLUDE 'csrf-token.inc' %]
952
                            <h3>You are attempting to place the following request:</h3>
953
                                <table>
954
                                [% FOREACH key IN whole.keys %]
955
                                    [% value = whole.$key %]
956
                                    [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' && value %]
957
                                        <tr>
958
                                            <td>[% key_mapping(key) || key | html %]</td>
959
                                            <td>[% value | html %]</td>
960
                                        </tr>
961
                                    [% END %]
962
                                [% END %]
963
                                </table>
964
                                &nbsp;
965
                            <h3>This interlibrary loan has been requested before:</h3>
966
                            [% IF matching_requests_for_patron.size %]
967
                                <h4>By this patron [%- INCLUDE 'patron-title.inc' patron => request_patron_obj hide_patron_infos_if_needed => 1 -%]:</h4>
968
                                <ul class="list-unstyled">
969
                                    [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
970
                                        <li>
971
                                            <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>
972
                                        </li>
973
                                    [% END %]
974
                                </ul>
975
                            [% END %]
976
                            [% IF remaining_matching_requests.size %]
977
                                [% IF matching_requests_for_patron.size %]
978
                                    <h4>By other patrons:</h4>
979
                                [% END %]
980
                                <ul class="list-unstyled">
981
                                    [% FOREACH remaining_matching_request IN remaining_matching_requests %]
982
                                        <li>
983
                                            <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 -%]
984
                                        </li>
985
                                    [% END %]
986
                                </ul>
987
                            [% END %]
988
                            <fieldset class="action">
989
                                [% FOREACH key IN whole.keys %]
990
                                    [% value = whole.$key %]
991
                                    [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
992
                                        <input type="hidden" name="[% key | html %]" value="[% value | html %]">
993
                                    [% END %]
994
                                [% END %]
995
                                [% custom_keys = whole.custom_key.split('\0') %]
996
                                [% custom_values = whole.custom_value.split('\0') %]
997
                                [% i = 0 %]
998
                                [% FOREACH custom_key IN custom_keys %]
999
                                    <input type="hidden" name="custom_key" value="[% custom_key | html %]">
1000
                                    <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
1001
                                    [% i = i + 1 %]
1002
                                [% END %]
1003
                                <input type="hidden" name="op" value="cud-create" />
1004
                                <input type="hidden" name="stage" value="form">
1005
                                <input type="hidden" name="history_check_submitted" value="1">
1006
                                <input type="submit" class="btn btn-primary" value="Submit anyway" />
1007
                                <a class="cancel" href="ill-requests.pl">Cancel</a>
1008
                            </fieldset>
1009
                        </form>
1010
                    </div>
939
                    [% ELSIF op == 'confirmautoill' %]
1011
                    [% ELSIF op == 'confirmautoill' %]
940
                    <!-- confirmautoill -->
1012
                    <!-- confirmautoill -->
941
                    <h1>Confirm automatic request</h1>
1013
                    <h1>Confirm automatic request</h1>
942
- 

Return to bug 38441