Bugzilla – Attachment 21222 Details for
Bug 10901
Filters is needed on the add item page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10901: Add datatables to the add item page
Bug-10901-Add-datatables-to-the-add-item-page.patch (text/plain), 5.82 KB, created by
Biblibre Sandboxes
on 2013-09-19 08:00:32 UTC
(
hide
)
Description:
Bug 10901: Add datatables to the add item page
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2013-09-19 08:00:32 UTC
Size:
5.82 KB
patch
obsolete
>From 42e3db3e724c331af5c17816556c3f280206da17 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 17 Sep 2013 16:31:46 +0200 >Subject: [PATCH] Bug 10901: Add datatables to the add item page > >For a biblio with a lot of items, it is not easy to find the one you >want to edit. > >Test plan: >Try to edit/delete item from the add item page. >Verify there is no regression on this page. > >Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> >--- > .../prog/en/modules/cataloguing/additem.tt | 40 +++++++++++++++++--- > 1 files changed, 34 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index f5fecef..b60cd71 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -1,6 +1,8 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cataloging › [% title |html %] [% IF ( author ) %] by [% author %][% END %] (Record #[% biblionumber %]) › Items</title> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script> > [% INCLUDE 'browser-strings.inc' %] > <!--[if lt IE 9]> >@@ -30,6 +32,16 @@ $(document).ready(function(){ > $(this).append("<span class=\"linktools\"><a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"#edititem\">" + _("Edit item") + "</a> <a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=delitem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"\" onclick=\"confirm_deletion([% biblionumber %],"+num_rowid+"); return false;\">" + _("Delete item") + "</a></span>"); > } > }); >+ >+ var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ 0, 1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ 'bPaginate': false, >+ 'bInfo': false, >+ "bAutoWidth": false >+ } ) ); >+ > }); > function active(numlayer) > { >@@ -122,15 +134,18 @@ $(document).ready(function() { > <div id="cataloguing_additem_itemlist"> > [% IF ( item_loop ) %] > <div> >- <table> >+ <table id="itemst"> >+ <thead> > <tr> >- <th colspan="2"> </th> >+ <th> </th> > [% FOREACH item_header_loo IN item_header_loop %] > <th> > [% item_header_loo.header_value %] > </th> > [% END %] > </tr> >+ </thead> >+ <tbody> > [% FOREACH item_loo IN item_loop %] > [% IF ( item_loo.itemnumber == itemnumber) %] > [% IF item_loo.nomod %] >@@ -145,15 +160,28 @@ $(document).ready(function() { > <tr id="row[% item_loo.itemnumber %]" class="editable"> > [% END %] > [% END %] >- [% IF ( item_loo.nomod ) %] <td colspan="2"> </td>[% ELSE %][% IF ( item_loo.hostitemflag ) %]<td><a href="additem.pl?op=edititem&biblionumber=[% item_loo.hostbiblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit in host</a></td> >-<td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=[% biblionumber %]&hostitemnumber=[% item_loo.itemnumber %]">Delink</a></td> >-[% ELSE %]<td><a href="additem.pl?op=edititem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td> >- <td>[% IF ( item_loo.countanalytics ) %]<a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=% item_loo.itemnumber %]">View analytics</a>[% ELSE %]<a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a>[% END %]</td>[% END %][% END %] >+ [% IF ( item_loo.nomod ) %] >+ <td> </td> >+ [% ELSE %] >+ <td> >+ [% IF ( item_loo.hostitemflag ) %] >+ <a href="additem.pl?op=edititem&biblionumber=[% item_loo.hostbiblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit in host</a><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=[% biblionumber %]&hostitemnumber=[% item_loo.itemnumber %]">Delink</a> >+ [% ELSE %] >+ <a href="additem.pl?op=edititem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a> >+ [% IF ( item_loo.countanalytics ) %] >+ <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=% item_loo.itemnumber %]">View analytics</a> >+ [% ELSE %] >+ <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a> >+ [% END %] >+ [% END %] >+ </td> >+ [% END %] > [% FOREACH item_valu IN item_loo.item_value %] > <td>[% item_valu.field |html %]</td> > [% END %] > </tr> > [% END %] >+ </tbody> > </table> > </div> > [% END %] >-- >1.7.2.5
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 10901
:
21139
|
21222
|
21309
|
21336
|
21392
|
21393