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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-19 / +18 lines)
Lines 736-742 Link Here
736
                                        <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a>
736
                                        <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a>
737
                                    </p>
737
                                    </p>
738
738
739
                                    <table id="table_[% loop.count | html %]" class="sorted" data-table-number=[% loop.count | html %]>
739
                                    <table id="table_[% suggestion.suggestiontype | html %]" class="sorted" data-tab-name="[% suggestion.suggestiontype | html %]">
740
                                        <thead>
740
                                        <thead>
741
                                            <tr>
741
                                            <tr>
742
                                                <th class="NoSort noExport">&nbsp;</th>
742
                                                <th class="NoSort noExport">&nbsp;</th>
Lines 888-894 Link Here
888
                                                </tr>
888
                                                </tr>
889
                                            [% END # /FOREACH s %]
889
                                            [% END # /FOREACH s %]
890
                                        </tbody>
890
                                        </tbody>
891
                                    </table> <!-- /#table_[% loop.count | html %] -->
891
                                    </table> <!-- /#table_[% suggestion.suggestiontype | html %] -->
892
892
893
                                    <div class="row">
893
                                    <div class="row">
894
                                        <div class="col-sm-12">
894
                                        <div class="col-sm-12">
Lines 899-907 Link Here
899
                                        [% IF CAN_user_suggestions_suggestions_manage %]
899
                                        [% IF CAN_user_suggestions_suggestions_manage %]
900
                                        <div class="col-sm-4">
900
                                        <div class="col-sm-4">
901
                                            <fieldset class="brief">
901
                                            <fieldset class="brief">
902
                                                <div id="select-reason[% loop.index | html %]">
902
                                                <div id="select-reason-[% suggestion.suggestiontype | html %]">
903
                                                    <label for="STATUSreason[% loop.index | html %]">Mark selected as: </label>
903
                                                    <label for="STATUSreason-[% suggestion.suggestiontype | html %]">Mark selected as: </label>
904
                                                    <select name="STATUS" id="STATUSreason[% loop.index | html %]">
904
                                                    <select name="STATUS" id="STATUSreason-[% suggestion.suggestiontype | html %]">
905
                                                        <option value=""> -- Choose a status --</option>
905
                                                        <option value=""> -- Choose a status --</option>
906
906
907
                                                        [% IF (statusselected_ASKED ) %]
907
                                                        [% IF (statusselected_ASKED ) %]
Lines 939-946 Link Here
939
                                                        [% END %]
939
                                                        [% END %]
940
                                                    </select>
940
                                                    </select>
941
941
942
                                                    <label for="choosereason[% loop.index | html %]">with this reason:</label>
942
                                                    <label for="choosereason-[% suggestion.suggestiontype | html %]">with this reason:</label>
943
                                                    <select name="reason" id="choosereason[% loop.index | html %]">
943
                                                    <select name="reason" id="choosereason-[% suggestion.suggestiontype | html %]">
944
                                                        <option value=""> -- Choose a reason -- </option>
944
                                                        <option value=""> -- Choose a reason -- </option>
945
                                                        [% FOREACH reasonsloo IN suggestion.reasonsloop %]
945
                                                        [% FOREACH reasonsloo IN suggestion.reasonsloop %]
946
                                                            <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
946
                                                            <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
Lines 979-989 Link Here
979
                                        <div class="col-sm-2">
979
                                        <div class="col-sm-2">
980
                                            <fieldset class="brief">
980
                                            <fieldset class="brief">
981
                                                <span class="label">Update manager</span>
981
                                                <span class="label">Update manager</span>
982
                                                <a href="#patron_search_modal_manager_[% loop.count | uri %]" id="set_manager_[% loop.count | uri %]" data-tab="[% loop.count | uri %]" class="set_manager" data-bs-toggle="modal"><i class="fa fa-search"></i> Select manager</a>
982
                                                <a href="#patron_search_modal_manager_[% suggestion.suggestiontype | uri %]" id="set_manager_[% suggestion.suggestiontype | uri %]" data-tab="[% suggestion.suggestiontype | uri %]" class="set_manager" data-bs-toggle="modal"><i class="fa fa-search"></i> Select manager</a>
983
                                                <span id="managedby_name[% loop.count | html %]"></span>
983
                                                <span id="managedby_name-[% suggestion.suggestiontype | html %]"></span>
984
                                            </fieldset>
984
                                            </fieldset>
985
                                            <fieldset class="action">
985
                                            <fieldset class="action">
986
                                                <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
986
                                                <input type="hidden" name="suggestion_managedby" id="managedby-[% suggestion.suggestiontype | html %]" value="[% logged_in_user.borrowernumber | html %]" />
987
                                                <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
987
                                                <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
988
                                                <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
988
                                                <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
989
                                                <button type="submit" data-op="cud-update_manager" class="btn btn-primary">Submit</button>
989
                                                <button type="submit" data-op="cud-update_manager" class="btn btn-primary">Submit</button>
Lines 1116-1123 Link Here
1116
                                    <fieldset class="brief suggestion_information">
1116
                                    <fieldset class="brief suggestion_information">
1117
                                        <ol>
1117
                                        <ol>
1118
                                            <li>
1118
                                            <li>
1119
                                                <label for="STATUS[% loop.index | html %]"> Status:</label>
1119
                                                <label for="STATUS-[% suggestion.suggestiontype | html %]"> Status:</label>
1120
                                                <select name="STATUS" id="STATUS[% loop.index | html %]">
1120
                                                <select name="STATUS" id="STATUS-[% suggestion.suggestiontype | html %]">
1121
                                                    <option value="">Any</option>
1121
                                                    <option value="">Any</option>
1122
                                                    [% IF (statusselected_ASKED ) %]
1122
                                                    [% IF (statusselected_ASKED ) %]
1123
                                                        <option value="ASKED" selected="selected">Pending</option>
1123
                                                        <option value="ASKED" selected="selected">Pending</option>
Lines 1300-1308 Link Here
1300
1300
1301
    <script>
1301
    <script>
1302
        function select_manager(borrowernumber, borrower) {
1302
        function select_manager(borrowernumber, borrower) {
1303
            let tab = $('#suggestiontabs .active table').data('table-number');
1303
            let tab = $('#suggestiontabs .active table').data('tab-name');
1304
            var managedby_name = $("#managedby_name"+tab);
1304
            var managedby_name = $("#managedby_name-"+tab);
1305
            var managedby = $("#managedby"+tab);
1305
            var managedby = $("#managedby-"+tab);
1306
            managedby_name.empty();
1306
            managedby_name.empty();
1307
            managedby.val('');
1307
            managedby.val('');
1308
            var borrowername = borrower.firstname + ' ' + borrower.surname;
1308
            var borrowername = borrower.firstname + ' ' + borrower.surname;
Lines 1392-1398 Link Here
1392
1392
1393
                [% FOREACH suggestion IN suggestions %]
1393
                [% FOREACH suggestion IN suggestions %]
1394
                    [% IF suggestion.suggestions.size %]
1394
                    [% IF suggestion.suggestions.size %]
1395
                        KohaTable("table_[% loop.count| html %]", {
1395
                        KohaTable("table_[% suggestion.suggestiontype | html %]", {
1396
                            "sorting": [[ 4, "asc" ]],
1396
                            "sorting": [[ 4, "asc" ]],
1397
                            "autoWidth": false,
1397
                            "autoWidth": false,
1398
                            "stateSave": true,
1398
                            "stateSave": true,
Lines 1542-1549 Link Here
1542
    [% ELSIF op == 'else' %]
1542
    [% ELSIF op == 'else' %]
1543
        [% FOREACH suggestion IN suggestions %]
1543
        [% FOREACH suggestion IN suggestions %]
1544
            [% SET filter = "suggestions_managers" %]
1544
            [% SET filter = "suggestions_managers" %]
1545
            [% PROCESS patron_search_modal columns => columns, modal_title => t("Select manager"), patron_search_modal_id => 'patron_search_modal_manager_' _ loop.count, table_id => 'patron_search_modal_manager_table_' _ loop.count %]
1545
            [% PROCESS patron_search_modal columns => columns, modal_title => t("Select manager"), patron_search_modal_id => 'patron_search_modal_manager_' _ suggestion.suggestiontype, table_id => 'patron_search_modal_manager_table_' _ suggestion.suggestiontype %]
1546
            [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1, table_id => 'patron_search_modal_manager_table_' _ loop.count, callback => 'select_manager' %]
1546
            [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1, table_id => 'patron_search_modal_manager_table_' _ suggestion.suggestiontype, callback => 'select_manager' %]
1547
        [% END %]
1547
        [% END %]
1548
    [% END %]
1548
    [% END %]
1549
1549
1550
- 

Return to bug 38192