Bugzilla – Attachment 71279 Details for
Bug 9573
Ability to download items lost report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9573: Lost items report - Add a new "Export selected items" link
Bug-9573-Lost-items-report---Add-a-new-Export-sele.patch (text/plain), 4.95 KB, created by
Jonathan Druart
on 2018-02-07 14:27:04 UTC
(
hide
)
Description:
Bug 9573: Lost items report - Add a new "Export selected items" link
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-02-07 14:27:04 UTC
Size:
4.95 KB
patch
obsolete
>From 2e1acb9ec89afc868f08bd709b62e7ccd75e74d2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 5 Oct 2017 16:29:48 -0300 >Subject: [PATCH] Bug 9573: Lost items report - Add a new "Export selected > items" link >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > .../prog/en/modules/reports/itemslost.tt | 58 +++++++++++++++++++++- > 1 file changed, 57 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >index cfae816aee..d09aa86567 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -34,9 +34,19 @@ > </div> > > [% IF items.count %] >+ <div class="lostitems-table_table_controls"> >+ | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> | >+ <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> >+ <span class="itemselection_actions"> >+ | Actions: >+ <a class="itemselection_action_export"><i class="fa fa-trash"></i> Export selected items</a> >+ </span> >+ </div> >+ > <table id="lostitems-table"> > <thead> > <tr> >+ <th class="NoSort"></th> > <th>Title</th> > <th>Author</th> > <th>Lost status</th> >@@ -57,6 +67,9 @@ > <tbody> > [% FOREACH item IN items %] > <tr> >+ <td style="text-align:center;vertical-align:middle"> >+ <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> >+ </td> > <td> > <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a> > </td> >@@ -146,6 +159,7 @@ > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> > [% INCLUDE 'columns_settings.inc' %] > <script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters.js"></script> >+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type='text/javascript'> > $(document).ready(function() { > var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %]; >@@ -153,12 +167,54 @@ > "dom": 'B<"clearfix">t', > "aaSorting": [], > "aoColumnDefs": [ >- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, > { "sType": "title-string", "aTargets" : [ "title-string" ] } > ], > 'bAutoWidth': false, > "bPaginate": false, > }, columns_settings, 'with_filters'); >+ >+ function itemSelectionBuildExportLink() { >+ var itemnumbers = new Array(); >+ $("input[name='itemnumber'][type='checkbox']:checked").each(function() { >+ itemnumbers.push($(this).val()); >+ }); >+ if (itemnumbers.length > 0) { >+ var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; >+ url += '&itemnumber=' + itemnumbers.join('&itemnumber='); >+ $('a.itemselection_action_export').attr('href', url); >+ } else { >+ return false; >+ } >+ return true; >+ } >+ >+ function itemSelectionBuildActionLinks() { >+ var export_link_ok = itemSelectionBuildExportLink(); >+ if (export_link_ok) { >+ $('.itemselection_actions').show(); >+ } else { >+ $('.itemselection_actions').hide(); >+ } >+ } >+ >+ itemSelectionBuildActionLinks(); >+ >+ $("input[name='itemnumber'][type='checkbox']").change(function() { >+ itemSelectionBuildActionLinks(); >+ }); >+ >+ $(".SelectAll").on("click",function(e){ >+ e.preventDefault(); >+ $("#lostitems-table").checkCheckboxes(); >+ itemSelectionBuildActionLinks(); >+ }); >+ >+ $(".ClearAll").on("click",function(e){ >+ e.preventDefault(); >+ $("#lostitems-table").unCheckCheckboxes(); >+ itemSelectionBuildActionLinks(); >+ }); > }); > </script> > [% END %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9573
:
68085
|
68086
|
68087
|
68088
|
68089
|
68090
|
68184
|
68283
|
68351
|
68352
|
68353
|
68354
|
68355
|
68356
|
68357
|
68358
|
68398
|
68399
|
68400
|
68401
|
68402
|
68403
|
68404
|
68405
|
71275
|
71276
|
71277
|
71278
|
71279
|
71280
|
71281
|
71282
|
71872
|
71873
|
71874
|
71875
|
71876
|
71877
|
71878
|
71879
|
71880
|
71887
|
71888
|
71889
|
71890
|
71891
|
71892
|
71893
|
71894
|
71895