Bugzilla – Attachment 68089 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.61 KB, created by
Jonathan Druart
on 2017-10-13 18:04:13 UTC
(
hide
)
Description:
Bug 9573: Lost items report - Add a new "Export selected items" link
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-13 18:04:13 UTC
Size:
4.61 KB
patch
obsolete
>From b1b3fa1eb74dafdb24ae1b2ad277c44732294bf6 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 > >--- > .../prog/en/modules/reports/itemslost.tt | 60 +++++++++++++++++++++- > 1 file changed, 59 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 0f1537da14..1d24ddaf07 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -10,6 +10,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'> > //<![CDATA[ > $(document).ready(function() { >@@ -18,12 +19,56 @@ > "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'); >+ >+ $(document).ready(function() { >+ 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> >@@ -54,9 +99,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> >@@ -77,6 +132,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> >-- >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