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

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+4 lines)
Lines 2860-2862 div.duration h5, div.blocks h5 { Link Here
2860
div.duration span, div.blocks div {
2860
div.duration span, div.blocks div {
2861
    display:block;
2861
    display:block;
2862
}
2862
}
2863
2864
div[class$="_table_controls"] {
2865
    padding: .7em 0;
2866
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-38 / +44 lines)
Lines 94-108 function verify_images() { Link Here
94
    }
94
    }
95
95
96
    [% IF StaffDetailItemSelection %]
96
    [% IF StaffDetailItemSelection %]
97
        function selectAllItems(div) {
98
            $("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked');
99
            itemSelectionBuildActionLinks(div);
100
        }
101
102
        function clearAllItems(div) {
103
            $("input[name='itemnumber'][type='checkbox']", div).removeAttr('checked');
104
            itemSelectionBuildActionLinks(div);
105
        }
106
97
107
        function itemSelectionBuildDeleteLink(div) {
98
        function itemSelectionBuildDeleteLink(div) {
108
            var itemnumbers = new Array();
99
            var itemnumbers = new Array();
Lines 114-122 function verify_images() { Link Here
114
                  url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
105
                  url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
115
                  url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]';
106
                  url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]';
116
                  $('a.itemselection_action_delete').attr('href', url);
107
                  $('a.itemselection_action_delete').attr('href', url);
117
                  $('a.itemselection_action_delete').show();
118
            } else {
108
            } else {
119
                $('a.itemselection_action_delete').hide();
120
                return false;
109
                return false;
121
            }
110
            }
122
            return true
111
            return true
Lines 132-146 function verify_images() { Link Here
132
                  url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
121
                  url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
133
                  url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]';
122
                  url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]';
134
                  $('a.itemselection_action_modify').attr('href', url);
123
                  $('a.itemselection_action_modify').attr('href', url);
135
                  $('a.itemselection_action_modify').show();
136
            } else {
124
            } else {
137
                $('a.itemselection_action_modify').hide();
138
                return false;
125
                return false;
139
            }
126
            }
140
            return true;
127
            return true;
141
        }
128
        }
142
129
143
        function itemSelectionBuildActionLinks(div) {
130
        function itemSelectionBuildActionLinks(tab) {
131
            var div = $("#" + tab);
144
          var delete_link_ok = itemSelectionBuildDeleteLink(div);
132
          var delete_link_ok = itemSelectionBuildDeleteLink(div);
145
          var modify_link_ok = itemSelectionBuildModifyLink(div);
133
          var modify_link_ok = itemSelectionBuildModifyLink(div);
146
          if (modify_link_ok || delete_link_ok) {
134
          if (modify_link_ok || delete_link_ok) {
Lines 151-164 function verify_images() { Link Here
151
        }
139
        }
152
140
153
        $(document).ready(function() {
141
        $(document).ready(function() {
142
154
          $('table.items_table').each(function() {
143
          $('table.items_table').each(function() {
155
            var div = $(this).parent().parent();
144
            var div = $(this).parent().attr("id");
156
            itemSelectionBuildActionLinks(div);
145
            itemSelectionBuildActionLinks(div);
157
          });
146
          });
147
158
          $("input[name='itemnumber'][type='checkbox']").change(function() {
148
          $("input[name='itemnumber'][type='checkbox']").change(function() {
159
            var div = $(this).parents('table').parent().parent();
149
            var div = $(this).parents('table').parent().parent().attr("id");
160
            itemSelectionBuildActionLinks(div);
150
            itemSelectionBuildActionLinks(div);
161
          });
151
          });
152
153
            $(".SelectAll").on("click",function(e){
154
                e.preventDefault();
155
                var tab = $(this).data("tab");
156
                $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
157
                itemSelectionBuildActionLinks(tab);
158
            });
159
160
            $(".ClearAll").on("click",function(e){
161
                e.preventDefault();
162
                var tab = $(this).data("tab");
163
                $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
164
                itemSelectionBuildActionLinks(tab);
165
            });
166
162
        });
167
        });
163
    [% END %]
168
    [% END %]
164
169
Lines 236-242 function verify_images() { Link Here
236
        }
241
        }
237
242
238
        $('#' + id + '_activate_filters')
243
        $('#' + id + '_activate_filters')
239
            .text(_("Deactivate filters"))
244
            .html('<i class="fa fa-filter"></i> ' + _("Deactivate filters") )
240
            .unbind('click')
245
            .unbind('click')
241
            .click(function() {
246
            .click(function() {
242
                deactivate_filters(id);
247
                deactivate_filters(id);
Lines 254-260 function verify_images() { Link Here
254
        filters_row.hide();
259
        filters_row.hide();
255
260
256
        $('#' + id + '_activate_filters')
261
        $('#' + id + '_activate_filters')
257
            .text(_("Activate filters"))
262
            .html('<i class="fa fa-filter"></i> ' + _("Activate filters") )
258
            .unbind('click')
263
            .unbind('click')
259
            .click(function() {
264
            .click(function() {
260
                activate_filters(id);
265
                activate_filters(id);
Lines 288-294 function verify_images() { Link Here
288
            link = $('<a>')
293
            link = $('<a>')
289
                .attr('href', '#')
294
                .attr('href', '#')
290
                .attr('id', id + '_activate_filters');
295
                .attr('id', id + '_activate_filters');
291
            table.before(link);
296
            $("." + id + "_table_controls").prepend(link);
292
            deactivate_filters(id);
297
            deactivate_filters(id);
293
        }
298
        }
294
        [% IF Koha.Preference('AcquisitionDetails') %]
299
        [% IF Koha.Preference('AcquisitionDetails') %]
Lines 561-579 function verify_images() { Link Here
561
[% items_table_block_iter = 0 %]
566
[% items_table_block_iter = 0 %]
562
[% BLOCK items_table %]
567
[% BLOCK items_table %]
563
    [% items_table_block_iter = items_table_block_iter + 1 %]
568
    [% items_table_block_iter = items_table_block_iter + 1 %]
564
    [% IF (StaffDetailItemSelection) %]
569
    <div class="[% tab %]_table_controls">
565
        <a href="#" onclick="selectAllItems($(this).parent()); return false;">Select all</a> |
570
        [% IF (StaffDetailItemSelection) %]
566
        <a href="#" onclick="clearAllItems($(this).parent()); return false;">Clear all</a>
571
            | <a href="#" class="SelectAll" data-tab="[% tab %]"><i class="fa fa-check"></i> Select all</a> |
567
        <span class="itemselection_actions">
572
            <a href="#" class="ClearAll" data-tab="[% tab %]"><i class="fa fa-remove"></i> Clear all</a>
568
          | Actions:
573
            <span class="itemselection_actions">
569
          [% IF CAN_user_tools_items_batchdel %]
574
              | Actions:
570
            <a class="itemselection_action_delete">Delete selected items</a>
575
              [% IF CAN_user_tools_items_batchdel %]
571
          [% END %]
576
                <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
572
          [% IF CAN_user_tools_items_batchmod %]
577
              [% END %]
573
            <a class="itemselection_action_modify">Modify selected items</a>
578
              [% IF CAN_user_tools_items_batchmod %]
574
          [% END %]
579
                <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
575
        </span>
580
              [% END %]
576
    [% END %]
581
            </span>
582
        [% END %]
583
    </div>
577
    <table class="items_table">
584
    <table class="items_table">
578
        <thead>
585
        <thead>
579
            <tr>
586
            <tr>
Lines 597-603 function verify_images() { Link Here
597
                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
604
                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
598
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
605
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
599
                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
606
                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
600
                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">Edit</th>[% END %]
607
                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">&nbsp;</th>[% END %]
601
            </tr>
608
            </tr>
602
        </thead>
609
        </thead>
603
        <tbody>
610
        <tbody>
Lines 803-811 function verify_images() { Link Here
803
                    </td>
810
                    </td>
804
                [% END %]
811
                [% END %]
805
                [% IF CAN_user_editcatalogue_edit_items %]
812
                [% IF CAN_user_editcatalogue_edit_items %]
806
                    <td>
813
                    <td class="actions">
807
                        [% UNLESS item.cannot_be_edited %]
814
                        [% UNLESS item.cannot_be_edited %]
808
                            <a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem">Edit</a>
815
                            <a class="btn btn-mini" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem"><i class="fa fa-pencil"></i> Edit</a>
809
                        [% END %]
816
                        [% END %]
810
                    </td>
817
                    </td>
811
                [% END %]
818
                [% END %]
Lines 818-824 function verify_images() { Link Here
818
<div id="holdings">
825
<div id="holdings">
819
[% IF ( count ) %]
826
[% IF ( count ) %]
820
    [% IF ( showncount ) %]
827
    [% IF ( showncount ) %]
821
        [% PROCESS items_table items=itemloop %]
828
        [% PROCESS items_table tab="holdings" items=itemloop %]
822
        [% END %]
829
        [% END %]
823
                [% IF ( hiddencount ) %]
830
                [% IF ( hiddencount ) %]
824
                   <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
831
                   <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
Lines 845-851 function verify_images() { Link Here
845
[% IF (SeparateHoldings) %]
852
[% IF (SeparateHoldings) %]
846
    <div id="otherholdings">
853
    <div id="otherholdings">
847
        [% IF (otheritemloop.size) %]
854
        [% IF (otheritemloop.size) %]
848
            [% PROCESS items_table items=otheritemloop %]
855
            [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
849
        [% ELSE %]
856
        [% ELSE %]
850
            No other items.
857
            No other items.
851
        [% END %]
858
        [% END %]
852
- 

Return to bug 16341