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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-69 / +96 lines)
Lines 1002-1082 Link Here
1002
                                        [%- END %]
1002
                                        [%- END %]
1003
                                    [%- END -%]
1003
                                    [%- END -%]
1004
                            [% END %]
1004
                            [% END %]
1005
                            [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1005
1006
                                <p>
1006
                            <form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
1007
                                    <div class="btn-group">
1007
                                <input type="hidden" name="phase" value="Run this report"/>
1008
                                        <button class="btn btn-default dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
1008
                                <input type="hidden" name="reports" value="[% report_id | html %]"/>
1009
                                            Batch operations with [% IF unlimited_total > limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
1009
                                [% FOREACH p IN sql_params %]
1010
                                            <span class="caret"></span>
1010
                                    <input type="hidden" name="sql_params" value="[% p | html %]"/>
1011
                                        </button>
1011
                                [% END %]
1012
                                        <ul class="dropdown-menu" aria-labelledby="batch_mod_menu">
1012
                                [% FOREACH n IN param_names %]
1013
                                            [% FOREACH header_ro IN header_row %]
1013
                                    <input type="hidden" name="param_name" value="[% n | html %]"/>
1014
                                                [% IF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
1014
                                [% END %]
1015
                                                    <li class="dropdown-header">Bibliographic records</li>
1015
                                <input type="hidden" name="limit" id="limit" value="20" />
1016
                                                    <li>
1016
                            </form> <!-- /#limitselect -->
1017
                                                        <a href="#" data-submit="batch_record_modification" data-toggle="tooltip" data-placement="right" title="Send visible records to batch record modification" class="batch_op send_to_record_mod">Batch record modification</a>
1017
1018
                                                    </li>
1018
                            [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) || ( unlimited_total ) > limit %]
1019
                                                    <li>
1019
                                <div id="toolbar" class="btn-toolbar">
1020
                                                        <a href="#" data-submit="batch_record_deletion" data-toggle="tooltip" data-placement="right" title="Send visible records to batch record deletion" class="batch_op send_to_record_del">Batch record deletion</a>
1020
                                    [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1021
                                                    </li>
1021
                                        <div class="btn-group">
1022
                                                    <li>
1022
                                            <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
1023
                                                        <a href="#" data-submit="batch_add_to_list" data-toggle="tooltip" data-placement="right" title="Send visible records to a list" class="batch_op send_to_list">Add to list</a>
1023
                                                Batch operations with [% IF unlimited_total > limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
1024
                                                    </li>
1024
                                                <span class="caret"></span>
1025
                                                [% END %]
1025
                                            </button>
1026
                                                [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
1026
                                            <ul class="dropdown-menu" aria-labelledby="batch_mod_menu">
1027
                                                    [% IF ( batch_biblionumbers ) %]
1027
                                                [% FOREACH header_ro IN header_row %]
1028
                                                        <li role="separator" class="divider"></li>
1028
                                                    [% IF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
1029
                                                        <li class="dropdown-header">Bibliographic records</li>
1030
                                                        <li>
1031
                                                            <a href="#" data-submit="batch_record_modification" data-toggle="tooltip" data-placement="right" title="Send visible records to batch record modification" class="batch_op send_to_record_mod">Batch record modification</a>
1032
                                                        </li>
1033
                                                        <li>
1034
                                                            <a href="#" data-submit="batch_record_deletion" data-toggle="tooltip" data-placement="right" title="Send visible records to batch record deletion" class="batch_op send_to_record_del">Batch record deletion</a>
1035
                                                        </li>
1036
                                                        <li>
1037
                                                            <a href="#" data-submit="batch_add_to_list" data-toggle="tooltip" data-placement="right" title="Send visible records to a list" class="batch_op send_to_list">Add to list</a>
1038
                                                        </li>
1029
                                                    [% END %]
1039
                                                    [% END %]
1030
                                                    <li class="dropdown-header">Item records</li>
1040
                                                    [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
1031
                                                    <li>
1041
                                                        [% IF ( batch_biblionumbers ) %]
1032
                                                        <a href="#" data-submit="batch_item_modification" data-toggle="tooltip" data-placement="right" title="Send visible items to batch item modification" class="batch_op send_to_item_mod">Batch item modification</a>
1042
                                                            <li role="separator" class="divider"></li>
1033
                                                    </li>
1043
                                                        [% END %]
1034
                                                    <li>
1044
                                                        <li class="dropdown-header">Item records</li>
1035
                                                        <a href="#" data-submit="batch_item_deletion" data-toggle="tooltip" data-placement="right" title="Send visible items to batch item deletion" class="batch_op send_to_item_del">Batch item deletion</a>
1045
                                                        <li>
1036
                                                    </li>
1046
                                                            <a href="#" data-submit="batch_item_modification" data-toggle="tooltip" data-placement="right" title="Send visible items to batch item modification" class="batch_op send_to_item_mod">Batch item modification</a>
1047
                                                        </li>
1048
                                                        <li>
1049
                                                            <a href="#" data-submit="batch_item_deletion" data-toggle="tooltip" data-placement="right" title="Send visible items to batch item deletion" class="batch_op send_to_item_del">Batch item deletion</a>
1050
                                                        </li>
1051
                                                    [% END %]
1052
                                                    [% IF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
1053
                                                        [% IF ( batch_biblionumbers || batch_itemnumbers ) %]
1054
                                                            <li role="separator" class="divider"></li>
1055
                                                        [% END %]
1056
                                                        <li class="dropdown-header">Patron records</li>
1057
                                                        <li>
1058
                                                            <a href="#" data-submit="batch_patron_modification" data-toggle="tooltip" data-placement="right" title="Send visible results to batch patron modification" class="batch_op send_to_patron_mod">Batch patron modification</a>
1059
                                                        </li>
1060
                                                    [% END %]
1061
                                                [% END # /FOREACH header_ro %]
1062
                                            </ul> <!-- /.dropdown-menu -->
1063
                                        </div> <!-- /.dropdown -->
1064
                                    [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1065
1066
                                    [% IF ( unlimited_total > limit ) %]
1067
                                        <div class="btn-group">
1068
                                            <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
1069
                                                [% IF ( limit ) %]
1070
                                                    Rows per page: <strong>[% limit | html %]</strong>
1071
                                                [% ELSE %]
1072
                                                    Rows per page
1037
                                                [% END %]
1073
                                                [% END %]
1038
                                                [% IF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
1074
                                                <span class="caret"></span>
1039
                                                    [% IF ( batch_biblionumbers || batch_itemnumbers ) %]
1075
                                            </button>
1040
                                                        <li role="separator" class="divider"></li>
1076
                                            <ul class="dropdown-menu">
1077
                                                [% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %]
1078
                                                [% FOREACH l IN limits %]
1079
                                                    [% IF l == limit %]
1080
                                                        <li>
1081
                                                            <a class="limitselect" data-limit="[% l | html %]" href="#"><i class="fa fa-fw fa-check"></i> [% l | html %]</a>
1082
                                                        </li>
1083
                                                    [% ELSE %]
1084
                                                        <li>
1085
                                                            <a class="limitselect" data-limit="[% l | html %]" href="#"><i class="fa fa-fw"></i> [% l | html %]</a>
1086
                                                        </li>
1041
                                                    [% END %]
1087
                                                    [% END %]
1042
                                                    <li class="dropdown-header">Patron records</li>
1043
                                                    <li>
1044
                                                        <a href="#" data-submit="batch_patron_modification" data-toggle="tooltip" data-placement="right" title="Send visible results to batch patron modification" class="batch_op send_to_patron_mod">Batch patron modification</a>
1045
                                                    </li>
1046
                                                [% END %]
1088
                                                [% END %]
1047
                                            [% END %]
1089
                                            </ul>
1048
                                        </ul> <!-- /.dropdown-menu -->
1090
                                        </div>
1049
                                    </div> <!-- /.dropdown -->
1091
                                    [% END # /IF ( unlimited_total > limit ) %]
1050
                                </p>
1092
                                </div> <!-- /#toolbar.btn-toolbar -->
1051
                            [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1093
                            [% END # /IF batch operations || ( unlimited_total > limit ) %]
1052
                        [% END # UNLESS ( errors ) %]
1053
                    [% END # IF ( execute ) %]
1054
1055
                    <form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
1056
                        <input type="hidden" name="phase" value="Run this report"/>
1057
                        <input type="hidden" name="reports" value="[% report_id | html %]"/>
1058
1094
1059
                        [% FOREACH p IN sql_params %]
1095
                            <div class="pages">
1060
                            <input type="hidden" name="sql_params" value="[% p | html %]"/>
1096
                                [% pagination_bar | $raw %]
1061
                        [% END %]
1097
                            </div>
1062
                        [% FOREACH n IN param_names %]
1063
                            <input type="hidden" name="param_name" value="[% n | html %]"/>
1064
                        [% END %]
1065
1098
1066
                        <label for="limit">Rows per page: </label>
1099
                        [% END # UNLESS ( errors ) %]
1067
                        <select name="limit" id="limit">
1100
                    [% END # IF ( execute ) %]
1068
                            [% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %]
1069
                            [% FOREACH l IN limits %]
1070
                                [% IF l == limit %]
1071
                                    <option value="[% l | html %]" selected="selected">[% l | html %]</option>
1072
                                [% ELSE %]
1073
                                    <option value="[% l | html %]">[% l | html %]</option>
1074
                                [% END %]
1075
                            [% END %]
1076
                        </select>
1077
                    </form> <!-- /#limitselect -->
1078
1101
1079
                    <div class="pages">[% pagination_bar | $raw %]</div>
1080
                    [% UNLESS ( errors ) %]
1102
                    [% UNLESS ( errors ) %]
1081
                        <table>
1103
                        <table>
1082
                            <tr>
1104
                            <tr>
Lines 2023-2028 Link Here
2023
                var reportid = $(this).data("reportid");
2045
                var reportid = $(this).data("reportid");
2024
                previewSql( reportid );
2046
                previewSql( reportid );
2025
            });
2047
            });
2048
            $(".limitselect").on("click", function(){
2049
                var limit = $(this).data("limit");
2050
                $("#limit").val( limit );
2051
                $("#limitselect").submit();
2052
            });
2053
2026
        });
2054
        });
2027
2055
2028
        function tabsInit( ui, rtable ){
2056
        function tabsInit( ui, rtable ){
2029
- 

Return to bug 29186