Bugzilla – Attachment 95441 Details for
Bug 12502
Add columns for note, order number and ISBN to late orders page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12502: (follow-up) Adds formatting for datatables export
Bug-12502-follow-up-Adds-formatting-for-datatables.patch (text/plain), 6.30 KB, created by
Séverine Queune
on 2019-11-14 16:51:15 UTC
(
hide
)
Description:
Bug 12502: (follow-up) Adds formatting for datatables export
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2019-11-14 16:51:15 UTC
Size:
6.30 KB
patch
obsolete
>From 110041ef5c171051726a8f2a8ae8d20673b2d1d7 Mon Sep 17 00:00:00 2001 >From: Maryse Simard <maryse.simard@inlibro.com> >Date: Thu, 14 Nov 2019 08:50:30 -0500 >Subject: [PATCH] Bug 12502: (follow-up) Adds formatting for datatables export >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Add a format option to the datatables export that remove .noExport >elements present in a data cell, just as .noExport columns are >not exported. > >To test: >1. For late orders (which uses .noExport elements in data cells) : > Export data in any format using the export button at the top > of the datatable. > => data should exclude "Add/Edit note" label, but > otherwise look the same as before the patch. >2. Try exporting data in other datatables in Koha and make sure >exported data is the same before and after applying the patch. > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > .../prog/en/includes/columns_settings.inc | 25 ++++++++++++++++++---- > .../prog/en/modules/acqui/lateorders.tt | 8 +++---- > 2 files changed, 25 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index f02ad89..1117050 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -27,33 +27,50 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > exportColumns = dt_parameters["exportColumns"]; > } > >+ var export_format = { >+ body: function ( data, row, column, node ) { >+ var newnode = $(node); >+ >+ if ( newnode.find(".noExport").length > 0 ) { >+ newnode = newnode.clone(); >+ newnode.find(".noExport").remove(); >+ } >+ >+ return newnode.text().replace( /\n/g, ' ' ).trim(); >+ } >+ } >+ > var export_buttons = [ > { > extend: 'excelHtml5', > text: _("Excel"), > exportOptions: { >- columns: exportColumns >+ columns: exportColumns, >+ format: export_format > }, > }, > { > extend: 'csvHtml5', > text: _("CSV"), > exportOptions: { >- columns: exportColumns >+ columns: exportColumns, >+ format: export_format > }, > }, > { > extend: 'copyHtml5', > text: _("Copy"), > exportOptions: { >- columns: exportColumns >+ columns: exportColumns, >+ format: export_format > }, > }, > { > extend: 'print', > text: _("Print"), > exportOptions: { >- columns: exportColumns >+ columns: exportColumns, >+ format: export_format > }, > } > ]; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index 31fc3ab..5096922 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -142,12 +142,12 @@ > [% IF ( lateorder.internalnote ) %] > <p class="ordernote"> > <span id="internal-note-[% lateorder.ordernumber | html %]">[% lateorder.internalnote | html %]</span> >- <a class="edit_note" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=internal" title="Edit internal note"> >+ <a class="edit_note noExport" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=internal" title="Edit internal note"> > <i class="fa fa-pencil"></i> Edit internal note > </a> > </p> > [% ELSE %] >- <a class="edit_note" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=internal" title="Add internal note"> >+ <a class="edit_note noExport" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=internal" title="Add internal note"> > <i class="fa fa-plus"></i> Add internal note > </a> > [% END %] >@@ -156,12 +156,12 @@ > [% IF ( lateorder.vendornote ) %] > <p class="ordernote"> > <span id="vendor-note-[% lateorder.ordernumber | html %]">[% lateorder.vendornote | html %]</span> >- <a class="edit_note" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=vendor" title="Edit vendor note"> >+ <a class="edit_note noExport" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=vendor" title="Edit vendor note"> > <i class="fa fa-pencil"></i> Edit vendor note > </a> > </p> > [% ELSE %] >- <a class="edit_note" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=vendor" title="Add vendor note"> >+ <a class="edit_note noExport" data-ordernumber="[% lateorder.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% lateorder.ordernumber | html %]&type=vendor" title="Add vendor note"> > <i class="fa fa-plus"></i> Add vendor note > </a> > [% END %] >-- >2.1.4
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 12502
:
67349
|
67354
|
67586
|
67587
|
72168
|
72169
|
72170
|
73499
|
73500
|
73501
|
73502
|
73503
|
79231
|
80160
|
80602
|
87236
|
91564
|
95418
|
95419
|
95438
|
95439
|
95440
|
95441
|
97427
|
97428
|
97429
|
97430