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

(-)a/koha-tmpl/intranet-tmpl/prog/css/reports.css (-11 lines)
Lines 36-52 del { Link Here
36
    font-family: monospace;
36
    font-family: monospace;
37
}
37
}
38
38
39
.send_to_item_mod {
40
    background-color: #EBF3FF;
41
    border: 1px solid #88b0e8;
42
    border-radius: 5px;
43
    display: inline-block;
44
    font-size: 75%;
45
    margin: 3px 5px;
46
    padding: 3px 5px;
47
    white-space: nowrap;
48
}
49
50
.filter {
39
.filter {
51
    background-color: #EBF3FF;
40
    background-color: #EBF3FF;
52
    border-radius: 5px;
41
    border-radius: 5px;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-26 / +134 lines)
Lines 731-736 canned reports and writing custom SQL reports.</p> Link Here
731
</div>
731
</div>
732
<div id="chart" class="clearfix"></div>
732
<div id="chart" class="clearfix"></div>
733
733
734
[% IF ( execute ) %]
735
    [% UNLESS ( errors ) %]
736
        <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl" id="batch_record_modification">
737
            <input type="hidden" name="recordtype" value="biblio" />
738
            <input type="hidden" name="op" value="list" />
739
            [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
740
            <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">[% FOREACH result IN results %][% FOREACH cells IN result.cells %][% place = loop.index %][% IF header_row.$place.cell == 'biblionumber' %][% SET batch_biblionumbers = 1 %]
741
[% cells.cell | html %][% END %][% END %][% END %]</textarea>
742
        </form>
743
744
        <form method="POST" action="/cgi-bin/koha/tools/batch_delete_records.pl" id="batch_record_deletion">
745
            <input type="hidden" name="recordtype" value="biblio" />
746
            <input type="hidden" name="op" value="list" />
747
            [% # Preserve the whitespace of the following textarea in order to format the values correctly %]
748
            <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">[% FOREACH result IN results %][% FOREACH cells IN result.cells %][% place = loop.index %][% IF header_row.$place.cell == 'biblionumber' %][% SET batch_biblionumbers = 1 %]
749
[% cells.cell | html %][% END %][% END %][% END %]</textarea>
750
        </form>
751
752
        <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_modification">
753
            <input type="hidden" name="op" value="show" />
754
            [% FOREACH result IN results %]
755
                [% FOREACH cells IN result.cells %]
756
                    [% place = loop.index %]
757
                    [% IF header_row.$place.cell == 'itemnumber' %]
758
                        [% SET batch_itemnumbers = 1 %]
759
                        <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
760
                    [% END %]
761
                [% END %]
762
            [% END %]
763
        </form>
764
765
        <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_deletion">
766
            <input type="hidden" name="op" value="show" />
767
            <input type="hidden" name="del" value="1" />
768
            [% FOREACH result IN results %]
769
                [% FOREACH cells IN result.cells %]
770
                    [% place = loop.index %]
771
                    [% IF header_row.$place.cell == 'itemnumber' %]
772
                        [% SET batch_itemnumbers = 1 %]
773
                        <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
774
                    [% END %]
775
                [% END %]
776
            [% END %]
777
        </form>
778
779
        <form method="get" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" id="batch_add_to_list">
780
            [% FOREACH result IN results %]
781
                [% FOREACH cells IN result.cells %]
782
                    [% place = loop.index %]
783
                    [% IF header_row.$place.cell == 'biblionumber' %]
784
                        [% SET batch_biblionumbers = 1 %]
785
                        <input type="hidden" class="bib_to_list" name="biblionumber" value="[% cells.cell | html %]" />
786
                    [% END %]
787
                [% END %]
788
            [% END %]
789
        </form>
790
791
        [% IF ( batch_biblionumbers || batch_itemnumbers ) %]
792
            <p>
793
                <div class="dropdown">
794
                    <button class="btn btn-default dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
795
                        Batch operations with [% IF unlimited_total > limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
796
                        <span class="caret"></span>
797
                    </button>
798
                    <ul class="dropdown-menu" aria-labelledby="batch_mod_menu">
799
                        [% FOREACH header_ro IN header_row %]
800
                            [% IF header_ro.cell == 'biblionumber' %]
801
                                <li class="dropdown-header">Bibliographic records</li>
802
                                <li>
803
                                    <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>
804
                                </li>
805
                                <li>
806
                                    <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>
807
                                </li>
808
                                <li>
809
                                    <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>
810
                                </li>
811
                            [% END %]
812
                            [% IF header_ro.cell == 'itemnumber' %]
813
                                [% IF ( batch_biblionumbers ) %]
814
                                    <li role="separator" class="divider"></li>
815
                                [% END %]
816
                                <li class="dropdown-header">Item records</li>
817
                                <li>
818
                                    <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>
819
                                </li>
820
                                <li>
821
                                    <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>
822
                                </li>
823
                            [% END %]
824
                        [% END %]
825
                    </ul> <!-- /.dropdown-menu -->
826
                </div> <!-- /.dropdown -->
827
            </p>
828
        [% END %]
829
    [% END # UNLESS ( errors ) %]
830
[% END # IF ( execute ) %]
831
734
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
832
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
735
    <input type="hidden" name="phase" value="Run this report"/>
833
    <input type="hidden" name="phase" value="Run this report"/>
736
    <input type="hidden" name="reports" value="[% report_id | html %]"/>
834
    <input type="hidden" name="reports" value="[% report_id | html %]"/>
Lines 757-790 canned reports and writing custom SQL reports.</p> Link Here
757
855
758
<div class="pages">[% pagination_bar | $raw %]</div>
856
<div class="pages">[% pagination_bar | $raw %]</div>
759
[% UNLESS ( errors ) %]
857
[% UNLESS ( errors ) %]
760
    <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="report_results">
858
    <table>
761
        <input type="hidden" name="op" value="show" />
859
        <tr>
762
        <table>
860
            [% FOREACH header_ro IN header_row %]
861
                <th>[% header_ro.cell | html %]</th>
862
            [% END %]
863
        </tr>
864
        [% FOREACH result IN results %]
763
            <tr>
865
            <tr>
764
                [% FOREACH header_ro IN header_row %]
866
                [% FOREACH cells IN result.cells %]
765
                    [% IF header_ro.cell == 'itemnumber' %]
867
                    <td>[% cells.cell | $raw %]</td>
766
                        <th>
767
                            [% header_ro.cell | html %] <button type="submit" data-toggle="tooltip" title="Send visible items to batch modification" id="batchModify" class="btn btn-xs btn-default send_to_item_mod"><i class="fa fa-pencil"></i> Batch modify</button>
768
                        </th>
769
                    [% ELSE %]
770
                        <th>[% header_ro.cell | html %]</th>
771
                    [% END %]
772
                [% END %]
868
                [% END %]
773
            </tr>
869
            </tr>
774
            [% FOREACH result IN results %]
870
        [% END %]
775
                <tr>
871
    </table>
776
                    [% FOREACH cells IN result.cells %]
777
                        [% place = loop.index %]
778
                        [% IF header_row.$place.cell == 'itemnumber' %]
779
                            <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
780
                        [% END %]
781
                        <td>[% cells.cell | $raw %]</td>
782
                    [% END %]
783
                </tr>
784
            [% END %]
785
        </table>
786
    </form>
787
788
[% END %]
872
[% END %]
789
873
790
[% INCLUDE 'chart.inc' %]
874
[% INCLUDE 'chart.inc' %]
Lines 1426-1431 canned reports and writing custom SQL reports.</p> Link Here
1426
                $("#mana_result_content").html("");
1510
                $("#mana_result_content").html("");
1427
                $("#mana_search_field").val("");
1511
                $("#mana_search_field").val("");
1428
            });
1512
            });
1513
1514
            $(".batch_op").on("click", function(e){
1515
                e.preventDefault();
1516
                var target_form = $(this).data("submit");
1517
                $("#" + target_form ).submit();
1518
            });
1519
1520
            $("#batch_add_to_list").on("submit", function(e){
1521
                e.preventDefault();
1522
                addToList();
1523
            });
1429
        });
1524
        });
1430
1525
1431
        function addColumn() {
1526
        function addColumn() {
Lines 1502-1507 canned reports and writing custom SQL reports.</p> Link Here
1502
                    }
1597
                    }
1503
                });
1598
                });
1504
        }
1599
        }
1600
1601
        function addToList() {
1602
            var biblionumbers = [];
1603
            $(".bib_to_list").each(function() {
1604
                var biblionumber = Number( $(this).val() );
1605
                if( biblionumbers.indexOf( biblionumber ) < 0 ){
1606
                    biblionumbers.push( biblionumber );
1607
                }
1608
            });
1609
            bibs = biblionumbers.join("/");
1610
            var url = "/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumbers=" + bibs;
1611
            window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes');
1612
            return false;
1613
        }
1505
    </script>
1614
    </script>
1506
[% END %]
1615
[% END %]
1507
1616
1508
- 

Return to bug 23197