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

(-)a/admin/columns_settings.yml (+23 lines)
Lines 644-649 modules: Link Here
644
        -
644
        -
645
          columnname: action
645
          columnname: action
646
646
647
    holdsratios:
648
      holds-ratios:
649
        -
650
          columnname: holds
651
        -
652
          columnname: items
653
        -
654
          columnname: holds_ratio
655
        -
656
          columnname: title
657
        -
658
          columnname: home_libraries
659
        -
660
          columnname: holding_libraries
661
        -
662
          columnname: location
663
        -
664
          columnname: itemtype
665
        -
666
          columnname: call_numbers
667
        -
668
          columnname: items_needed
669
647
  opac:
670
  opac:
648
    biblio-detail:
671
    biblio-detail:
649
      holdingst:
672
      holdingst:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-22 / +23 lines)
Lines 4-9 Link Here
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE ItemTypes %]
6
[% USE ItemTypes %]
7
[% USE ColumnsSettings %]
7
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
10
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
Lines 12-18 Link Here
12
<style>
13
<style>
13
    .sql { display: none; }
14
    .sql { display: none; }
14
    .ulined { text-decoration: underline; }
15
    .ulined { text-decoration: underline; }
15
    .ratiolimit { color: blue; cursor: pointer; }
16
    .ratiolimit:link { color: blue; cursor: pointer; }
17
    .ratiolimit:hover { color: blue; text-decoration: underline; }
16
    #holdst ul li {  list-style: outside url("[% interface | html %]/[% theme | html %]/img/item-bullet.gif") disc; }
18
    #holdst ul li {  list-style: outside url("[% interface | html %]/[% theme | html %]/img/item-bullet.gif") disc; }
17
</style>
19
</style>
18
</head>
20
</head>
Lines 55-61 Link Here
55
        <tr>
57
        <tr>
56
            <td><p>[% reserveloo.reservecount | html %]</p></td>
58
            <td><p>[% reserveloo.reservecount | html %]</p></td>
57
            <td><p>[% reserveloo.itemcount | html %]</p></td>
59
            <td><p>[% reserveloo.itemcount | html %]</p></td>
58
            <td><p class="ratiolimit">[% reserveloo.thisratio | html %]</p></td>
60
            <td><a href="#" class="ratiolimit">[% reserveloo.thisratio | html %]</a></td>
59
            <td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title | html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
61
            <td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title | html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
60
            </td>
62
            </td>
61
            <td>
63
            <td>
Lines 152-176 Link Here
152
     </div> <!-- /.row -->
154
     </div> <!-- /.row -->
153
155
154
[% MACRO jsinclude BLOCK %]
156
[% MACRO jsinclude BLOCK %]
155
  [% INCLUDE 'calendar.inc' %]
157
    [% INCLUDE 'calendar.inc' %]
156
  [% INCLUDE 'datatables.inc' %]
158
    [% INCLUDE 'datatables.inc' %]
157
  <script>
159
    [% INCLUDE 'columns_settings.inc' %]
158
       $(document).ready(function() {
160
    <script>
159
          $(".ratiolimit").click(function () {
161
        var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
160
              $("#ratio").val($(this).html());
162
        $(document).ready(function() {
161
          });
163
            $(".ratiolimit").on("click", function(e) {
162
          $(".ratiolimit").hover(
164
                e.preventDefault();
163
              function () { $(this).toggleClass("ulined") },
165
                $("#ratio").val($(this).html());
164
              function () { $(this).toggleClass("ulined") }
166
            });
165
          );
167
            KohaTable("holdst", {
166
          $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
168
                "aaSorting": [ [2,'desc'], [3,'asc'] ],
167
              "aaSorting": [ [2,'desc'], [3,'asc'] ],
169
                  "aoColumnDefs": [
168
              "aoColumnDefs": [
170
                      { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
169
                  { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
171
                      { "aTargets": [ 3 ], "sType": "anti-the" },
170
                  { "aTargets": [ 3 ], "sType": "anti-the" },
172
                    ],
171
              ],
173
                "sPaginationType": "four_button",
172
              "sPaginationType": "four_button"
174
                "autoWidth": false
173
          }));
175
            }, columns_settings);
174
       });
176
       });
175
  </script>
177
  </script>
176
[% END %]
178
[% END %]
177
- 

Return to bug 21785