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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-269 / +269 lines)
Lines 908-1201 Link Here
908
908
909
                [% IF ( execute ) %]
909
                [% IF ( execute ) %]
910
                    <h1>[% name | html %] <span class="report_heading_id"><span class="report_label">Report ID:</span> <span class="report_number">[% id | html %]</span></span></h1>
910
                    <h1>[% name | html %] <span class="report_heading_id"><span class="report_label">Report ID:</span> <span class="report_number">[% id | html %]</span></span></h1>
911
                    [% IF ( notes ) %]
911
                    <div class="page-section">
912
                        <p><span class="label">Notes:</span> [% notes | html %]</p>
912
                        [% IF ( notes ) %]
913
                    [% END %]
913
                            <p><span class="label">Notes:</span> [% notes | html %]</p>
914
                    [% IF ( unlimited_total ) %]
914
                        [% END %]
915
                        <p>
915
                        [% IF ( unlimited_total ) %]
916
                            <span class="label">Total number of results:</span>
916
                            <p>
917
                            [% unlimited_total | html %]
917
                                <span class="label">Total number of results:</span>
918
                            [% IF unlimited_total >= limit %]
918
                                [% unlimited_total | html %]
919
                                ([% results.size | html %] shown)
919
                                [% IF unlimited_total >= limit %]
920
                            [% END %]
920
                                    ([% results.size | html %] shown)
921
                        </p>
921
                                [% END %]
922
                    [% END %]
922
                            </p>
923
923
                        [% END %]
924
                    <div id="sql_output" style="display:none;">
925
                        <span class="label">Report SQL:</span>
926
                        <textarea id="sql" readonly="readonly">[% sql | html %]</textarea>
927
                    </div>
928
924
929
                    <div>
925
                        <div id="sql_output" style="display:none;">
930
                        <a href="#" id="toggle_chart_settings_hid" class="toggle_chart_settings" style="display:none"><i class="fa fa-eye-slash"></i> Hide chart</a>
926
                            <span class="label">Report SQL:</span>
931
                        <a href="#" id="toggle_chart_settings_vis" class="toggle_chart_settings" style="display:none"><i class="fa fa fa-eye"></i> Show chart</a>
927
                            <textarea id="sql" readonly="readonly">[% sql | html %]</textarea>
932
                    </div>
928
                        </div>
933
                    <div id="chart" class="clearfix"></div>
934
929
935
                    [% IF ( execute ) %]
930
                        <div>
936
                        [% UNLESS ( errors ) %]
931
                            <a href="#" id="toggle_chart_settings_hid" class="toggle_chart_settings" style="display:none"><i class="fa fa-eye-slash"></i> Hide chart</a>
937
                            <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl" id="batch_record_modification">
932
                            <a href="#" id="toggle_chart_settings_vis" class="toggle_chart_settings" style="display:none"><i class="fa fa fa-eye"></i> Show chart</a>
938
                                <input type="hidden" name="recordtype" value="biblio" />
933
                        </div>
939
                                <input type="hidden" name="op" value="list" />
934
                        <div id="chart" class="clearfix"></div>
940
                                [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
935
941
                                <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">
936
                        [% IF ( execute ) %]
942
                                    [%- recordnumbers = PROCESS batch_list results=results batch_type='biblionumber' | trim | html %][% IF recordnumbers %][% SET batch_biblionumbers = 1 %][% recordnumbers | html %][% END -%]
937
                            [% UNLESS ( errors ) %]
943
                                </textarea>
938
                                <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl" id="batch_record_modification">
944
                            </form>
939
                                    <input type="hidden" name="recordtype" value="biblio" />
945
940
                                    <input type="hidden" name="op" value="list" />
946
                            <form method="POST" action="/cgi-bin/koha/tools/batch_delete_records.pl" id="batch_record_deletion">
941
                                    [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
947
                                <input type="hidden" name="recordtype" value="biblio" />
942
                                    <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">
948
                                <input type="hidden" name="op" value="list" />
943
                                        [%- recordnumbers = PROCESS batch_list results=results batch_type='biblionumber' | trim | html %][% IF recordnumbers %][% SET batch_biblionumbers = 1 %][% recordnumbers | html %][% END -%]
949
                                [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
944
                                    </textarea>
950
                                <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">
945
                                </form>
951
                                    [%- recordnumbers = PROCESS batch_list results=results batch_type='biblionumber' | trim | html %][% IF recordnumbers %][% SET batch_biblionumbers = 1 %][% recordnumbers | html %][% END -%]
946
952
                                </textarea>
947
                                <form method="POST" action="/cgi-bin/koha/tools/batch_delete_records.pl" id="batch_record_deletion">
953
                            </form>
948
                                    <input type="hidden" name="recordtype" value="biblio" />
954
949
                                    <input type="hidden" name="op" value="list" />
955
                            <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_modification">
950
                                    [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
956
                                <input type="hidden" name="op" value="show" />
951
                                    <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">
957
                                [% FOREACH result IN results %]
952
                                        [%- recordnumbers = PROCESS batch_list results=results batch_type='biblionumber' | trim | html %][% IF recordnumbers %][% SET batch_biblionumbers = 1 %][% recordnumbers | html %][% END -%]
958
                                    [% FOREACH cells IN result.cells %]
953
                                    </textarea>
959
                                        [% place = loop.index %]
954
                                </form>
960
                                        [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
955
961
                                        [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber'  %]
956
                                <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_modification">
962
                                            [% SET batch_itemnumbers = 1 %]
957
                                    <input type="hidden" name="op" value="show" />
963
                                            [% SET header_row.$place.has_itemnumbers = 1 %]
958
                                    [% FOREACH result IN results %]
964
                                            <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
959
                                        [% FOREACH cells IN result.cells %]
960
                                            [% place = loop.index %]
961
                                            [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
962
                                            [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber'  %]
963
                                                [% SET batch_itemnumbers = 1 %]
964
                                                [% SET header_row.$place.has_itemnumbers = 1 %]
965
                                                <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
966
                                            [% END %]
965
                                        [% END %]
967
                                        [% END %]
966
                                    [% END %]
968
                                    [% END %]
967
                                [% END %]
969
                                </form>
968
                            </form>
970
969
971
                                <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_deletion">
970
                            <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_deletion">
972
                                    <input type="hidden" name="op" value="show" />
971
                                <input type="hidden" name="op" value="show" />
973
                                    <input type="hidden" name="del" value="1" />
972
                                <input type="hidden" name="del" value="1" />
974
                                    [% FOREACH result IN results %]
973
                                [% FOREACH result IN results %]
975
                                        [% FOREACH cells IN result.cells %]
974
                                    [% FOREACH cells IN result.cells %]
976
                                            [% place = loop.index %]
975
                                        [% place = loop.index %]
977
                                            [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
976
                                        [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
978
                                            [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber'  %]
977
                                        [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber'  %]
979
                                                [% SET batch_itemnumbers = 1 %]
978
                                            [% SET batch_itemnumbers = 1 %]
980
                                                [% SET header_row.$place.has_itemnumbers = 1 %]
979
                                            [% SET header_row.$place.has_itemnumbers = 1 %]
981
                                                <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
980
                                            <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
982
                                            [% END %]
981
                                        [% END %]
983
                                        [% END %]
982
                                    [% END %]
984
                                    [% END %]
983
                                [% END %]
985
                                </form>
984
                            </form>
986
985
987
                                <form method="get" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" id="batch_add_to_list">
986
                            <form method="get" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" id="batch_add_to_list">
988
                                    [% FOREACH result IN results %]
987
                                [% FOREACH result IN results %]
989
                                        [% FOREACH cells IN result.cells %]
988
                                    [% FOREACH cells IN result.cells %]
990
                                            [% place = loop.index %]
989
                                        [% place = loop.index %]
991
                                            [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
990
                                        [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
992
                                            [% IF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %]
991
                                        [% IF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %]
993
                                                [% SET batch_biblionumbers = 1 %]
992
                                            [% SET batch_biblionumbers = 1 %]
994
                                                [% SET header_row.$place.has_biblionumbers = 1 %]
993
                                            [% SET header_row.$place.has_biblionumbers = 1 %]
995
                                                <input type="hidden" class="bib_to_list" name="biblionumber" value="[% cells.cell | html %]" />
994
                                            <input type="hidden" class="bib_to_list" name="biblionumber" value="[% cells.cell | html %]" />
996
                                            [% END %]
995
                                        [% END %]
997
                                        [% END %]
996
                                    [% END %]
998
                                    [% END %]
997
                                [% END %]
999
                                </form>
998
                            </form>
1000
999
1001
                                <form method="POST" action="/cgi-bin/koha/tools/modborrowers.pl" id="batch_patron_modification">
1000
                            <form method="POST" action="/cgi-bin/koha/tools/modborrowers.pl" id="batch_patron_modification">
1002
                                    <input type="hidden" name="op" value="show" />
1001
                                <input type="hidden" name="op" value="show" />
1003
                                    [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
1002
                                [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
1004
                                    <textarea style="display:none" name="cardnumberlist" id="cardnumberlist">
1003
                                <textarea style="display:none" name="cardnumberlist" id="cardnumberlist">
1005
                                        [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %][% IF cardnumbers %][% SET batch_cardnumbers = 1 %][% cardnumbers | html %][% END -%]
1004
                                    [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %][% IF cardnumbers %][% SET batch_cardnumbers = 1 %][% cardnumbers | html %][% END -%]
1006
                                    </textarea>
1005
                                </textarea>
1007
                                </form>
1006
                            </form>
1008
1007
1009
                                [% BLOCK batch_list %]
1008
                            [% BLOCK batch_list %]
1010
                                        [%- FOREACH result IN results %]
1009
                                    [%- FOREACH result IN results %]
1011
                                            [%- FOREACH cells IN result.cells %]
1010
                                        [%- FOREACH cells IN result.cells %]
1012
                                                [%- place = loop.index %]
1011
                                            [%- place = loop.index %]
1013
                                                [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type %]
1012
                                            [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type %]
1014
    [%# We must not add whitespace to the cardnumbers %][% cells.cell | html %]
1013
[%# We must not add whitespace to the cardnumbers %][% cells.cell | html %]
1015
                                                [%- END %]
1014
                                            [%- END %]
1016
                                            [%- END %]
1015
                                        [%- END %]
1017
                                        [%- END -%]
1016
                                    [%- END -%]
1017
                            [% END %]
1018
1019
                            <form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
1020
                                <input type="hidden" name="phase" value="Run this report"/>
1021
                                <input type="hidden" name="reports" value="[% report_id | html %]"/>
1022
                                [% FOREACH p IN sql_params %]
1023
                                    <input type="hidden" name="sql_params" value="[% p | html %]"/>
1024
                                [% END %]
1025
                                [% FOREACH n IN param_names %]
1026
                                    <input type="hidden" name="param_name" value="[% n | html %]"/>
1027
                                [% END %]
1018
                                [% END %]
1028
                                <input type="hidden" name="limit" id="limit" value="20" />
1019
1029
                            </form> <!-- /#limitselect -->
1020
                                <form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
1030
1021
                                    <input type="hidden" name="phase" value="Run this report"/>
1031
                            [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) || ( unlimited_total > 10 && limit <= 1000 ) %]
1022
                                    <input type="hidden" name="reports" value="[% report_id | html %]"/>
1032
                                <div id="toolbar" class="btn-toolbar">
1023
                                    [% FOREACH p IN sql_params %]
1033
                                    [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1024
                                        <input type="hidden" name="sql_params" value="[% p | html %]"/>
1034
                                        <div class="btn-group">
1025
                                    [% END %]
1035
                                            <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
1026
                                    [% FOREACH n IN param_names %]
1036
                                                Batch operations with [% IF unlimited_total >= limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
1027
                                        <input type="hidden" name="param_name" value="[% n | html %]"/>
1037
                                                <span class="caret"></span>
1028
                                    [% END %]
1038
                                            </button>
1029
                                    <input type="hidden" name="limit" id="limit" value="20" />
1039
                                            <ul class="dropdown-menu" aria-labelledby="batch_mod_menu">
1030
                                </form> <!-- /#limitselect -->
1040
                                                [% FOREACH header_ro IN header_row %]
1031
1041
                                                    [% IF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
1032
                                [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) || ( unlimited_total > 10 && limit <= 1000 ) %]
1042
                                                        <li class="dropdown-header">Bibliographic records</li>
1033
                                    <div id="toolbar" class="btn-toolbar">
1043
                                                        <li>
1034
                                        [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1044
                                                            <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>
1035
                                            <div class="btn-group">
1045
                                                        </li>
1036
                                                <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
1046
                                                        <li>
1037
                                                    Batch operations with [% IF unlimited_total >= limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
1047
                                                            <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>
1038
                                                    <span class="caret"></span>
1048
                                                        </li>
1039
                                                </button>
1049
                                                        <li>
1040
                                                <ul class="dropdown-menu" aria-labelledby="batch_mod_menu">
1050
                                                            <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>
1041
                                                    [% FOREACH header_ro IN header_row %]
1051
                                                        </li>
1042
                                                        [% IF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
1052
                                                    [% END %]
1043
                                                            <li class="dropdown-header">Bibliographic records</li>
1053
                                                    [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
1044
                                                            <li>
1054
                                                        <li class="dropdown-header">Item records</li>
1045
                                                                <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>
1055
                                                        <li>
1046
                                                            </li>
1056
                                                            <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>
1057
                                                        </li>
1048
                                                                <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>
1058
                                                        <li>
1049
                                                            </li>
1059
                                                            <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>
1060
                                                        </li>
1051
                                                                <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>
1061
                                                    [% END %]
1052
                                                            </li>
1062
                                                    [% IF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
1053
                                                        [% END %]
1063
                                                        <li class="dropdown-header">Patron records</li>
1054
                                                        [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
1064
                                                        <li>
1055
                                                            <li class="dropdown-header">Item records</li>
1065
                                                            <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>
1056
                                                            <li>
1066
                                                        </li>
1057
                                                                <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>
1067
                                                    [% END %]
1058
                                                            </li>
1068
                                                [% END # /FOREACH header_ro %]
1059
                                                            <li>
1069
                                            </ul> <!-- /.dropdown-menu -->
1060
                                                                <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>
1070
                                        </div> <!-- /.dropdown -->
1061
                                                            </li>
1071
                                    [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1062
                                                        [% END %]
1072
1063
                                                        [% IF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
1073
                                    [% IF ( unlimited_total > 10 && limit <= 1000 ) %]
1064
                                                            <li class="dropdown-header">Patron records</li>
1074
                                        <div class="btn-group">
1065
                                                            <li>
1075
                                            <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
1066
                                                                <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>
1076
                                                [% IF ( limit ) %]
1067
                                                            </li>
1077
                                                    Rows per page: <strong>[% limit | html %]</strong>
1068
                                                        [% END %]
1078
                                                [% ELSE %]
1069
                                                    [% END # /FOREACH header_ro %]
1079
                                                    Rows per page
1070
                                                </ul> <!-- /.dropdown-menu -->
1080
                                                [% END %]
1071
                                            </div> <!-- /.dropdown -->
1081
                                                <span class="caret"></span>
1072
                                        [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1082
                                            </button>
1073
1083
                                            <ul class="dropdown-menu">
1074
                                        [% IF ( unlimited_total > 10 && limit <= 1000 ) %]
1084
                                                [% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %]
1075
                                            <div class="btn-group">
1085
                                                [% FOREACH l IN limits %]
1076
                                                <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
1086
                                                    [% IF l == limit %]
1077
                                                    [% IF ( limit ) %]
1087
                                                        <li>
1078
                                                        Rows per page: <strong>[% limit | html %]</strong>
1088
                                                            <a class="limitselect" data-limit="[% l | html %]" href="#"><i class="fa fa-fw fa-check"></i> [% l | html %]</a>
1089
                                                        </li>
1090
                                                    [% ELSE %]
1079
                                                    [% ELSE %]
1091
                                                        <li>
1080
                                                        Rows per page
1092
                                                            <a class="limitselect" data-limit="[% l | html %]" href="#"><i class="fa fa-fw"></i> [% l | html %]</a>
1093
                                                        </li>
1094
                                                    [% END %]
1081
                                                    [% END %]
1095
                                                [% END %]
1082
                                                    <span class="caret"></span>
1096
                                            </ul>
1083
                                                </button>
1097
                                        </div>
1084
                                                <ul class="dropdown-menu">
1098
                                    [% END # /IF ( unlimited_total > 10 && limit <= 1000 ) %]
1085
                                                    [% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %]
1099
1086
                                                    [% FOREACH l IN limits %]
1100
                                    [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1087
                                                        [% IF l == limit %]
1101
                                        <a href="#" class="btn btn-link" id="toggle_auto_links">
1088
                                                            <li>
1102
                                            <i class="fa fa-eye autolink" style="display:none"></i>
1089
                                                                <a class="limitselect" data-limit="[% l | html %]" href="#"><i class="fa fa-fw fa-check"></i> [% l | html %]</a>
1103
                                            <i class="fa fa-eye-slash autolink"></i>
1090
                                                            </li>
1104
                                            <span class="autolink" style="display:none">Show data menus</span>
1091
                                                        [% ELSE %]
1105
                                            <span class="autolink">Hide data menus</span>
1092
                                                            <li>
1106
                                        </a>
1093
                                                                <a class="limitselect" data-limit="[% l | html %]" href="#"><i class="fa fa-fw"></i> [% l | html %]</a>
1107
                                    [% END %]
1094
                                                            </li>
1108
                                </div> <!-- /#toolbar.btn-toolbar -->
1095
                                                        [% END %]
1109
                            [% END # /IF batch operations || ( unlimited_total > 10 && limit <= 1000 ) %]
1096
                                                    [% END %]
1097
                                                </ul>
1098
                                            </div>
1099
                                        [% END # /IF ( unlimited_total > 10 && limit <= 1000 ) %]
1100
1101
                                        [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
1102
                                            <a href="#" class="btn btn-link" id="toggle_auto_links">
1103
                                                <i class="fa fa-eye autolink" style="display:none"></i>
1104
                                                <i class="fa fa-eye-slash autolink"></i>
1105
                                                <span class="autolink" style="display:none">Show data menus</span>
1106
                                                <span class="autolink">Hide data menus</span>
1107
                                            </a>
1108
                                        [% END %]
1109
                                    </div> <!-- /#toolbar.btn-toolbar -->
1110
                                [% END # /IF batch operations || ( unlimited_total > 10 && limit <= 1000 ) %]
1110
1111
1111
                            <div class="pages">
1112
                                <div class="pages">
1112
                                [% pagination_bar | $raw %]
1113
                                    [% pagination_bar | $raw %]
1113
                            </div>
1114
                                </div>
1114
1115
1115
                        [% END # UNLESS ( errors ) %]
1116
                            [% END # UNLESS ( errors ) %]
1116
                    [% END # IF ( execute ) %]
1117
                        [% END # IF ( execute ) %]
1117
1118
1118
                    [% UNLESS ( errors ) %]
1119
                        [% UNLESS ( errors ) %]
1119
                        <table id="report_results">
1120
                            <table id="report_results">
1120
                            <thead>
1121
                                <thead>
1121
                                <tr>
1122
                                    [% FOREACH header_ro IN header_row %]
1123
                                        [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
1124
                                            <th class="itemnumber">[% header_ro.cell | html %]</th>
1125
                                        [% ELSIF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
1126
                                            <th class="biblionumber">[% header_ro.cell | html %]</th>
1127
                                        [% ELSIF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
1128
                                            <th class="cardnumber">[% header_ro.cell | html %]</th>
1129
                                        [% ELSIF header_ro.cell == 'borrowernumber' || header_types.item( header_ro.cell ) == 'borrowernumber' %]
1130
                                            <th class="borrowernumber">[% header_ro.cell | html %]</th>
1131
                                        [% ELSE %]
1132
                                            <th>[% header_ro.cell | html %]</th>
1133
                                        [% END %]
1134
                                    [% END %]
1135
                                </tr>
1136
                            </thead>
1137
                            <tbody>
1138
                                [% FOREACH result IN results %]
1139
                                    <tr>
1122
                                    <tr>
1140
                                        [% FOREACH cells IN result.cells %]
1123
                                        [% FOREACH header_ro IN header_row %]
1141
                                            [% place = loop.index %]
1124
                                            [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
1142
                                            [%- IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
1125
                                                <th class="itemnumber">[% header_ro.cell | html %]</th>
1143
                                                <td class="batch-op itemnumber" data-number="itemnumber">
1126
                                            [% ELSIF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
1144
                                                    <span class="data-plain">[% cells.cell | $raw %]</span>
1127
                                                <th class="biblionumber">[% header_ro.cell | html %]</th>
1145
                                                    <div id="itemnumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1128
                                            [% ELSIF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
1146
                                                        <ul class="dropdown-menu pull-right" role="menu">
1129
                                                <th class="cardnumber">[% header_ro.cell | html %]</th>
1147
                                                            <li><a target="_blank" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&itemnumber=[% cells.cell | $raw %]"><i class="fa fa-fw fa-pencil"></i> Edit record</a></li>
1130
                                            [% ELSIF header_ro.cell == 'borrowernumber' || header_types.item( header_ro.cell ) == 'borrowernumber' %]
1148
                                                            <li role="separator" class="divider"></li>
1131
                                                <th class="borrowernumber">[% header_ro.cell | html %]</th>
1149
                                                            <li><a target="_blank" href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cells.cell | $raw %]"><i class="fa fa-fw fa-eye"></i> View record</a></li>
1150
                                                        </ul>
1151
                                                    </div>
1152
                                                </td>
1153
                                            [% ELSIF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %]
1154
                                                <td class="batch-op biblionumber" data-number="biblionumber">
1155
                                                    <span class="data-plain">[% cells.cell | $raw %]</span>
1156
                                                    <div id="biblionumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1157
                                                        <ul class="dropdown-menu pull-right" role="menu">
1158
                                                            <li><a target="_blank" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% cells.cell | $raw %]"><i class="fa fa-pencil"></i> Edit record</a></li>
1159
                                                            <li role="separator" class="divider"></li>
1160
                                                            <li><a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cells.cell | $raw %]"><i class="fa fa-eye"></i> View record</a></li>
1161
                                                        </ul>
1162
                                                    </div>
1163
                                                </td>
1164
                                            [% ELSIF header_row.$place.cell == 'borrowernumber' || header_types.item(header_row.$place.cell) == 'borrowernumber' %]
1165
                                                <td class="batch-op borrowernumber" data-number="borrowernumber">
1166
                                                    <span class="data-plain">[% cells.cell | $raw %]</span>
1167
                                                    <div id="borrowernumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1168
                                                        <ul class="dropdown-menu pull-right" role="menu">
1169
                                                            <li><a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% cells.cell | $raw %]"><i class="fa fa-eye"></i> View patron</a></li>
1170
                                                            <li role="separator" class="divider"></li>
1171
                                                            <li><a target="_blank" href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=[% cells.cell | $raw %]"><i class="fa fa-pencil"></i> Edit patron</a></li>
1172
                                                            <li role="separator" class="divider"></li>
1173
                                                            <li><a target="_blank" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% cells.cell | $raw %]"><i class="fa fa-barcode"></i> Check out</a></li>
1174
                                                        </ul>
1175
                                                    </div>
1176
                                                </td>
1177
                                            [% ELSIF header_row.$place.cell == 'cardnumber' || header_types.item(header_row.$place.cell) == 'cardnumber' %]
1178
                                                <td class="batch-op cardnumber" data-number="cardnumber">
1179
                                                    <span class="data-plain">[% cells.cell | $raw %]</span>
1180
                                                    <div id="cardnumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1181
                                                        <ul class="dropdown-menu pull-right" role="menu">
1182
                                                            <li><a target="_blank" href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cells.cell | $raw %]"><i class="fa fa-barcode"></i> Check out</a></li>
1183
                                                        </ul>
1184
                                                    </div>
1185
                                                </td>
1186
                                            [% ELSE %]
1132
                                            [% ELSE %]
1187
                                                <td>
1133
                                                <th>[% header_ro.cell | html %]</th>
1188
                                                    [% cells.cell | $raw %]
1189
                                                </td>
1190
                                            [% END %]
1134
                                            [% END %]
1191
                                        [% END %]
1135
                                        [% END %]
1192
                                    </tr>
1136
                                    </tr>
1193
                                [% END %]
1137
                                </thead>
1194
                            </tbody>
1138
                                <tbody>
1195
                        </table>
1139
                                    [% FOREACH result IN results %]
1196
                    [% END %]
1140
                                        <tr>
1197
                    <div class="pages">[% pagination_bar | $raw %]</div>
1141
                                            [% FOREACH cells IN result.cells %]
1198
1142
                                                [% place = loop.index %]
1143
                                                [%- IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
1144
                                                    <td class="batch-op itemnumber" data-number="itemnumber">
1145
                                                        <span class="data-plain">[% cells.cell | $raw %]</span>
1146
                                                        <div id="itemnumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1147
                                                            <ul class="dropdown-menu pull-right" role="menu">
1148
                                                                <li><a target="_blank" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&itemnumber=[% cells.cell | $raw %]"><i class="fa fa-fw fa-pencil"></i> Edit record</a></li>
1149
                                                                <li role="separator" class="divider"></li>
1150
                                                                <li><a target="_blank" href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cells.cell | $raw %]"><i class="fa fa-fw fa-eye"></i> View record</a></li>
1151
                                                            </ul>
1152
                                                        </div>
1153
                                                    </td>
1154
                                                [% ELSIF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %]
1155
                                                    <td class="batch-op biblionumber" data-number="biblionumber">
1156
                                                        <span class="data-plain">[% cells.cell | $raw %]</span>
1157
                                                        <div id="biblionumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1158
                                                            <ul class="dropdown-menu pull-right" role="menu">
1159
                                                                <li><a target="_blank" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% cells.cell | $raw %]"><i class="fa fa-pencil"></i> Edit record</a></li>
1160
                                                                <li role="separator" class="divider"></li>
1161
                                                                <li><a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cells.cell | $raw %]"><i class="fa fa-eye"></i> View record</a></li>
1162
                                                            </ul>
1163
                                                        </div>
1164
                                                    </td>
1165
                                                [% ELSIF header_row.$place.cell == 'borrowernumber' || header_types.item(header_row.$place.cell) == 'borrowernumber' %]
1166
                                                    <td class="batch-op borrowernumber" data-number="borrowernumber">
1167
                                                        <span class="data-plain">[% cells.cell | $raw %]</span>
1168
                                                        <div id="borrowernumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1169
                                                            <ul class="dropdown-menu pull-right" role="menu">
1170
                                                                <li><a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% cells.cell | $raw %]"><i class="fa fa-eye"></i> View patron</a></li>
1171
                                                                <li role="separator" class="divider"></li>
1172
                                                                <li><a target="_blank" href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=[% cells.cell | $raw %]"><i class="fa fa-pencil"></i> Edit patron</a></li>
1173
                                                                <li role="separator" class="divider"></li>
1174
                                                                <li><a target="_blank" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% cells.cell | $raw %]"><i class="fa fa-barcode"></i> Check out</a></li>
1175
                                                            </ul>
1176
                                                        </div>
1177
                                                    </td>
1178
                                                [% ELSIF header_row.$place.cell == 'cardnumber' || header_types.item(header_row.$place.cell) == 'cardnumber' %]
1179
                                                    <td class="batch-op cardnumber" data-number="cardnumber">
1180
                                                        <span class="data-plain">[% cells.cell | $raw %]</span>
1181
                                                        <div id="cardnumber_autolink" class="btn-group dropup autolink"><a class="btn btn-link dropdown-toggle" role="button" data-toggle="dropdown" href="#">[% cells.cell | $raw %] <b class="caret"></b></a>
1182
                                                            <ul class="dropdown-menu pull-right" role="menu">
1183
                                                                <li><a target="_blank" href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cells.cell | $raw %]"><i class="fa fa-barcode"></i> Check out</a></li>
1184
                                                            </ul>
1185
                                                        </div>
1186
                                                    </td>
1187
                                                [% ELSE %]
1188
                                                    <td>
1189
                                                        [% cells.cell | $raw %]
1190
                                                    </td>
1191
                                                [% END %]
1192
                                            [% END %]
1193
                                        </tr>
1194
                                    [% END %]
1195
                                </tbody>
1196
                            </table>
1197
                        [% END %]
1198
                        <div class="pages">[% pagination_bar | $raw %]</div>
1199
                    </div>
1199
                    [% INCLUDE 'chart.inc' %]
1200
                    [% INCLUDE 'chart.inc' %]
1200
1201
1201
                [% END #/IF ( execute ) %]
1202
                [% END #/IF ( execute ) %]
1202
- 

Return to bug 32368