Bugzilla – Attachment 123938 Details for
Bug 28843
Add view and edit buttons to result of MARC record import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28843: Add view and edit buttons to result of MARC record import
Bug-28843-Add-view-and-edit-buttons-to-result-of-M.patch (text/plain), 3.30 KB, created by
Owen Leonard
on 2021-08-18 11:24:36 UTC
(
hide
)
Description:
Bug 28843: Add view and edit buttons to result of MARC record import
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-08-18 11:24:36 UTC
Size:
3.30 KB
patch
obsolete
>From 35ab2df9f6874c81829c8538d61c712c8f20e65c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 11 Aug 2021 12:21:19 +0000 >Subject: [PATCH] Bug 28843: Add view and edit buttons to result of MARC record > import > >This patch adds "View" and "Edit" buttons to the output of the result of >a MARC record import. > >To test, apply the patch and go to Tools -> State MARC for import. > > - Import a file of MARC records. > - Click the "Manage staged records" button. > - In the table of staged records the last column labeled "Records" > should be empty. > - Click "Import this batch into the catalog." > - The table of records will be shown again, and this time the last > column should contain "View" and "Edit" buttons for each row. > - Confirm that the buttons work correctly, opening the correct record > for viewing and editing. > >Test with both bibliographic and authority records to confirm that the >correct view and edit pages open for each. > >EDIT: Add permission check for "Edit" link >--- > .../en/modules/tools/manage-marc-import.tt | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 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 601d0a3dbd..75777fc3a3 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 >@@ -508,6 +508,11 @@ > [% ELSE %] > var record_details_url = "/cgi-bin/koha/catalogue/detail.pl?biblionumber="; > [% END %] >+ [% IF(record_type == 'auth') %] >+ var record_edit_url = "/cgi-bin/koha/authorities/authorities.pl?authid="; >+ [% ELSE %] >+ var record_edit_url = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber="; >+ [% END %] > > var additional_details = ""; > if( aData['author'] ){ >@@ -559,10 +564,16 @@ > '<a href="' + aData['diff_url'] + '">' + _("View") + '</a>' > ); > } >- $('td:eq(6)', nRow).html( >- '<a target="_blank" href="' + record_details_url >- + aData['matched'] + '">' + aData['matched'] + '</a>' >- ); >+ if (aData['matched']) { >+ $('td:eq(6)', nRow).html( >+ '<a class="btn btn-default btn-xs" target="_blank" href="' + record_details_url >+ + aData['matched'] + '"><i class="fa fa-eye"></i> ' + _("View") + '</a> ' >+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >+ + '<a class="btn btn-default btn-xs" target="_blank" href="' + record_edit_url >+ + aData['matched'] + '"><i class="fa fa-pencil"></i> ' + _("Edit") + '</a>' >+ [% END %] >+ ); >+ } > }, > })); > $("#import_batch_form").on("submit", function() { >-- >2.20.1
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 28843
:
123791
|
123804
|
123938
|
123986
|
124220