Bugzilla – Attachment 106784 Details for
Bug 16314
Show upload link for upload plugin in basic MARC editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16314: Show upload link for upload plugin in basic MARC editor
Bug-16314-Show-upload-link-for-upload-plugin-in-ba.patch (text/plain), 4.76 KB, created by
Owen Leonard
on 2020-07-11 13:33:07 UTC
(
hide
)
Description:
Bug 16314: Show upload link for upload plugin in basic MARC editor
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-07-11 13:33:07 UTC
Size:
4.76 KB
patch
obsolete
>From a91b164e4becfbe8db5fd5c7a611d16e2e22a6fc Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Sat, 11 Jul 2020 13:25:11 +0000 >Subject: [PATCH] Bug 16314: Show upload link for upload plugin in basic MARC > editor > >This patch updates the basic MARC editor to provide a plugin name >variable to the template, allowing us to make a check on the name and >conditionally show an upload link if the "upload.pl" cataloging plugin >is selected. > >To test, apply the patch and rebuild the staff client CSS >(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). > > - Go do Administration -> MARC bibliographic framework -> MARC > structure -> 856 -> Edit subfields. > - Edit the "u" subfield and select "upload.pl" as the plugin under > "Other options." > - Go to Cataloging and create or edit a MARC record. > - Under tab 8 look for the 856 tag, subfield u. There should be an > "Upload" link corresponding to the form field. > - Click the upload link to confirm that it triggers a popup window with > the upload form. > - Confirm that other similar plugin links (for instance 100$a, 600$a) > display the old "tag editor" icon. >--- > cataloguing/addbiblio.pl | 1 + > cataloguing/value_builder/upload.pl | 1 + > koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 9 +++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 6 +++++- > 4 files changed, 16 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 7d48842c6a..3725bdfc3f 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -390,6 +390,7 @@ sub create_input { > size => 67, > maxlength => $subfield_data{maxlength}, > javascript => $plugin->javascript, >+ plugin => $plugin->name, > noclick => $plugin->noclick, > }; > } else { >diff --git a/cataloguing/value_builder/upload.pl b/cataloguing/value_builder/upload.pl >index e26bca7f99..85c6bc656e 100755 >--- a/cataloguing/value_builder/upload.pl >+++ b/cataloguing/value_builder/upload.pl >@@ -35,6 +35,7 @@ my $builder = sub { > return <<"SCRIPT"; > <script type=\"text/javascript\"> > function Click$params->{id}(event) { >+ event.preventDefault(); > var index = event.data.id; > var str = document.getElementById(index).value; > var myurl, term; >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index b55b97eea8..68c0627a67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -3386,6 +3386,15 @@ progress { > text-indent: 100%; > white-space: nowrap; > width: 16px; >+ >+ &.upload { >+ background: transparent none; >+ font-size: 90%; >+ height: unset; >+ overflow: unset; >+ text-indent: unset; >+ width: unset; >+ } > } > > .browse-controls { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 66d253e363..d48767e154 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -837,7 +837,11 @@ > [% IF mv.noclick %] > <span class="buttonDot tag_editor disabled" tabindex="-1" title="Field autofilled by plugin"></span> > [% ELSE %] >- <a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> >+ [% IF mv.plugin == "upload.pl" %] >+ <a href="#" id="buttonDot_[% mv.id | html %]" class="tag_editor upload framework_plugin" tabindex="1"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a> >+ [% ELSE %] >+ <a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> >+ [% END %] > [% END %] > </span> > [% mv.javascript | $raw %] >-- >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 16314
:
106784
|
109561
|
109792