Bugzilla – Attachment 83423 Details for
Bug 12759
Add ability to pass list contents to batch record modification/deletion tools
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12759: Pass records from selected tab
Bug-12759-Pass-records-from-selected-tab.patch (text/plain), 8.53 KB, created by
Katrin Fischer
on 2018-12-20 20:45:38 UTC
(
hide
)
Description:
Bug 12759: Pass records from selected tab
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-12-20 20:45:38 UTC
Size:
8.53 KB
patch
obsolete
>From 98d5fd63a624fa46de1278ffeee2843cca1c7c1b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 12 Nov 2018 14:50:31 -0300 >Subject: [PATCH] Bug 12759: Pass records from selected tab > >To remove ambiguity we should not process the records from other tabs. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/tools/batch_delete_records.tt | 65 ++++++++++++++-------- > .../en/modules/tools/batch_record_modification.tt | 64 +++++++++++++-------- > 2 files changed, 81 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >index 63df143b72..0b9ffd8032 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >@@ -57,7 +57,7 @@ > </div> > [% END %] > [% IF op == 'form' %] >- <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_delete_records.pl"> >+ <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_delete_records.pl" id="record_ids_selection"> > <fieldset class="rows"> > <legend>Record type</legend> > <ol> >@@ -70,12 +70,12 @@ > > <div id="batch_del_form" class="toptabs"> > <ul> >- <li><a href="#uploadfile">Upload a file</a></li> >- [% IF lists.count %]<li id="show_list_option"><a href="#shelves">Select a list of records</a></li>[% END %] >- <li><a href="#enterlist">Enter a list of record numbers</a></li> >+ <li><a href="#uploadfile_tab">Upload a file</a></li> >+ [% IF lists.count %]<li id="show_list_option"><a href="#shelves_tab">Select a list of records</a></li>[% END %] >+ <li><a href="#enterlist_tab">Enter a list of record numbers</a></li> > </ul> > >- <div id="uploadfile"> >+ <div id="uploadfile_tab"> > <fieldset class="rows"> > <legend>Use a file</legend> > <ol> >@@ -85,26 +85,28 @@ > > </div> > >- <div id="shelves"> >- <fieldset class="rows"> >- <legend>Or select a list of records</legend> >- <ol> >- <li> >- <label for="shelf_number">Use records from the following list: </label> >- <select name="shelf_number" id="shelf_number"> >- <option value="">Select a list</option> >- [% FOREACH list IN lists %] >- <option value="[% list.shelfnumber %]">[% list.shelfname %]</option> >- [% END %] >- </option> >- </select> >- </li> >- </ol> >- </fieldset> >- >- </div> >+ [% IF lists.count %] >+ <div id="shelves_tab"> >+ <fieldset class="rows"> >+ <legend>Or select a list of records</legend> >+ <ol> >+ <li> >+ <label for="shelf_number">Use records from the following list: </label> >+ <select name="shelf_number" id="shelf_number"> >+ <option value="">Select a list</option> >+ [% FOREACH list IN lists %] >+ <option value="[% list.shelfnumber %]">[% list.shelfname %]</option> >+ [% END %] >+ </option> >+ </select> >+ </li> >+ </ol> >+ </fieldset> >+ >+ </div> >+ [% END %] > >- <div id="enterlist"> >+ <div id="enterlist_tab"> > <fieldset class="rows"> > <legend>Or enter a list of record numbers</legend> > <ol> >@@ -306,6 +308,21 @@ > return false; > } > }); >+ >+ $("#record_ids_selection").on("submit", function(e){ >+ var tab = $(this).find('.ui-tabs-active:first a').attr('href'); >+ if ( tab == '#uploadfile_tab' ) { >+ $("#shelf_number").empty(''); >+ $("#recordnumber_list").val(''); >+ } else if ( tab == '#shelves_tab' ) { >+ $("#uploadfile").val('') >+ $("#recordnumber_list").val(''); >+ } else { // enterlist >+ $("#uploadfile").val('') >+ $("#shelf_number").empty(''); >+ } >+ }); >+ > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >index a8f9b7cc53..652c74e53f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >@@ -61,7 +61,7 @@ > [% END %] > > [% IF view == 'form' %] >- <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl"> >+ <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl" id="record_ids_selection"> > <fieldset class="rows"> > <legend>Record type</legend> > <ol> >@@ -74,12 +74,12 @@ > > <div id="batch_mod_form" class="toptabs"> > <ul> >- <li><a href="#uploadfile">Upload a file</a></li> >- [% IF lists.count %]<li id="show_list_option"><a href="#shelves">Select a list of records</a></li>[% END %] >- <li><a href="#enterlist">Enter a list of record numbers</a></li> >+ <li><a href="#uploadfile_tab">Upload a file</a></li> >+ [% IF lists.count %]<li id="show_list_option"><a href="#shelves_tab">Select a list of records</a></li>[% END %] >+ <li><a href="#enterlist_tab">Enter a list of record numbers</a></li> > </ul> > >- <div id="uploadfile"> >+ <div id="uploadfile_tab"> > <fieldset class="rows"> > <legend>Use a file</legend> > <ol> >@@ -89,26 +89,28 @@ > > </div> > >- <div id="shelves"> >- <fieldset class="rows"> >- <legend>Or select a list of records</legend> >- <ol> >- <li> >- <label for="shelf_number">Use records from the following list: </label> >- <select name="shelf_number" id="shelf_number"> >- <option value="">Select a list</option> >- [% FOREACH list IN lists %] >- <option value="[% list.shelfnumber %]">[% list.shelfname %]</option> >- [% END %] >- </option> >- </select> >- </li> >- </ol> >- </fieldset> >- >- </div> >+ [% IF lists.count %] >+ <div id="shelves_tab"> >+ <fieldset class="rows"> >+ <legend>Or select a list of records</legend> >+ <ol> >+ <li> >+ <label for="shelf_number">Use records from the following list: </label> >+ <select name="shelf_number" id="shelf_number"> >+ <option value="">Select a list</option> >+ [% FOREACH list IN lists %] >+ <option value="[% list.shelfnumber %]">[% list.shelfname %]</option> >+ [% END %] >+ </option> >+ </select> >+ </li> >+ </ol> >+ </fieldset> >+ >+ </div> >+ [% END %] > >- <div id="enterlist"> >+ <div id="enterlist_tab"> > <fieldset class="rows"> > <legend>Or enter a list of record numbers</legend> > <ol> >@@ -338,6 +340,20 @@ > return submitBackgroundJob(document.getElementById("process")); > }); > >+ $("#record_ids_selection").on("submit", function(e){ >+ var tab = $(this).find('.ui-tabs-active:first a').attr('href'); >+ if ( tab == '#uploadfile_tab' ) { >+ $("#shelf_number").empty(''); >+ $("#recordnumber_list").val(''); >+ } else if ( tab == '#shelves_tab' ) { >+ $("#uploadfile").val('') >+ $("#recordnumber_list").val(''); >+ } else { // enterlist >+ $("#uploadfile").val('') >+ $("#shelf_number").empty(''); >+ } >+ }); >+ > $("#marc_modification_template_id").change(function(){ > var url = "/cgi-bin/koha/svc/records/preview?" > var mmtid = $(this).val(); >-- >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 12759
:
60297
|
60362
|
60367
|
60489
|
61337
|
75548
|
75572
|
76802
|
76803
|
82228
|
82229
|
82230
|
83421
|
83422
|
83423
|
83424
|
84672
|
84875
|
84876
|
84877
|
84878