Bugzilla – Attachment 103043 Details for
Bug 14229
Link to accounting tab from fines column in patron search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14229: Only show 'Create labels' link on staged records import when status is imported
Bug-14229-Only-show-Create-labels-link-on-staged-r.patch (text/plain), 4.79 KB, created by
Katrin Fischer
on 2020-04-15 23:25:29 UTC
(
hide
)
Description:
Bug 14229: Only show 'Create labels' link on staged records import when status is imported
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-15 23:25:29 UTC
Size:
4.79 KB
patch
obsolete
>From e3069de25f8ce18964f8f25fd4604235e20dfdd1 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 12 Apr 2020 22:06:05 +0000 >Subject: [PATCH] Bug 14229: Only show 'Create labels' link on staged records > import when status is imported > >The label creator won't be able to add a batch for items, if they are >not imported into the database (missing itemnumber). This patch hides >the link, when the status is not imported to avoid the error situation. > >To test: >- Export a record with items from your Koha installation >- Delete record an items >- Stage the record with the items - the "Create labels" link should be showing >- Try to create the labels - note error >- Apply patch >- Retry - the link should no longer show >- Import the records - the should show now >- Crate labels again - a new batch should have been created >- Verify the link on the batch # leads to the batch in the labels module > >Bonus: Moves the message from the .pl file to the template to make >it translatable. >--- > .../prog/en/modules/tools/manage-marc-import.tt | 16 +++++++++++++--- > tools/manage-marc-import.pl | 4 ++-- > 2 files changed, 15 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >index 0fde39f7a6..a3edfdf904 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >@@ -45,7 +45,13 @@ > [% ELSE %] > <div class="dialog message"> > [% END %] >- <b><p>[% label_batch_msg | html %]</p></b> >+ <p><b> >+ [% IF ( label_batch_msg == "error" ) %] >+ Error attempting to create label batch. Please ask your system administrator to check the log for more details. >+ [% ELSE %] >+ Label <a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=edit&element_id=[% label_batch_msg | uri %]" >batch #[% label_batch_msg | html %]</a> created. >+ [% END %] >+ </b></p> > </div> > [% END %] > >@@ -353,7 +359,11 @@ > </td> > <td>[% batch_lis.upload_timestamp | html %]</td> > <td>[% batch_lis.num_records | html %]</td> >- <td>[% batch_lis.num_items | html %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&op=create_labels">(Create label batch)</a>[% END %]</td> >+ <td>[% batch_lis.num_items | html %] >+ [% IF ( batch_lis.num_items && batch_lis.import_status == 'imported' ) %] >+ (<a href="[% batch_lis.script_name | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&op=create_labels">Create label batch</a>) >+ [% END %] >+ </td> > <td class="actions"> > [% IF ( batch_lis.can_clean ) %] > <form method="post" action="[% batch_lis.script_name | html %]" name="clean_batch_[% batch_lis.import_batch_id | html %]" id="clean_batch_[% batch_lis.import_batch_id | html %]" class="batch_form batch_clean"> >@@ -591,4 +601,4 @@ > [% END %] > </ul> > </nav> >-[% END %] >\ No newline at end of file >+[% END %] >diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl >index 4fea4005d7..6f9405d281 100755 >--- a/tools/manage-marc-import.pl >+++ b/tools/manage-marc-import.pl >@@ -69,12 +69,12 @@ if ($op eq "create_labels") { > #create a batch of labels, then lose $op & $import_batch_id so we get back to import batch list. > my $label_batch_id = create_labelbatch_from_importbatch($import_batch_id); > if ($label_batch_id == -1) { >- $template->param( label_batch_msg => "Error attempting to create label batch. Please ask your system administrator to check the log for more details.", >+ $template->param( label_batch_msg => "error", > message_type => 'alert', > ); > } > else { >- $template->param( label_batch_msg => "Label batch #$label_batch_id created.", >+ $template->param( label_batch_msg => $label_batch_id, > message_type => 'dialog', > ); > } >-- >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 14229
:
103041
|
103043
|
103222
|
103259
|
103260