Bugzilla – Attachment 173052 Details for
Bug 36320
Clicking 'Edit items' from detail page in staff interface leads to 'Add item' screen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36320: Clicking Edit items from catalogue/detail.pl leads to 'Add item' screen
Bug-36320-Clicking-Edit-items-from-cataloguedetail.patch (text/plain), 4.37 KB, created by
Owen Leonard
on 2024-10-21 14:15:17 UTC
(
hide
)
Description:
Bug 36320: Clicking Edit items from catalogue/detail.pl leads to 'Add item' screen
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-10-21 14:15:17 UTC
Size:
4.37 KB
patch
obsolete
>From 41d5fbda3938b58c0687370b3ce6a19a3e3874e0 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 16 Oct 2024 17:24:55 +0000 >Subject: [PATCH] Bug 36320: Clicking Edit items from catalogue/detail.pl leads > to 'Add item' screen > >This patch updates the catalog toolbar so that the "Edit items" >choice under the "Edit" menu is replaced with a new option: "Manage >items," which takes you to the top of the add/edit items page. The "New >item" menu item has been modified to add the anchor so that the link >jumps the user directly to add item form (past the existing items). > >The patch also adds a "Jump to add item form" link at the top of the >add/edit items page. > >To test, apply the patch and search for a bibliographic record in the >staff interface. > >- View the detail page for the record. >- Click the "Edit" menu button in the toolbar. >- You should see the new menu item, "Manage items." >- Clicking the "Manage items" button should take you to the top > of the add/edit items page in cataloging. > - You should see a "Jump to add item form" limk under the page > heading. > - Clicking it should jump you to the "Add item" form. >- Clicking the "New item" menu item from the bibliographic detail "New" > menu should take you directly to the add item form, scrolling down > past the existing items. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> >--- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- > .../prog/en/modules/cataloguing/additem.tt | 1 + > .../intranet-tmpl/prog/js/cataloging_additem.js | 13 +++++++++++++ > 3 files changed, 15 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index 4b99bbea27..36d924b952 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -60,7 +60,7 @@ > [% END %] > > [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] >- <li><a class="dropdown-item" id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Edit items</a></li> >+ <li><a class="dropdown-item" id="manageitems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Manage items</a></li> > [% END %] > > [% IF ( CAN_user_tools_items_batchmod ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index ae6da07854..7d966bee25 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -77,6 +77,7 @@ > </div> > [% END %] > <h1>Items for [% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</h1> >+<a id="newitem_jump" href="#additema"><i class="fa fa-arrow-down"></i> Jump to add item form</a> > > [% IF ( barcode_not_unique ) %]<div class="alert alert-warning"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %] > [% IF ( no_next_barcode ) %]<div class="alert alert-warning"><strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted.</div>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index c8a2189b83..d4f28bbf84 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -138,6 +138,19 @@ $(document).ready(function(){ > return $("#" + $(this).data("item") + "-delete-item-form").submit(); > } > }) ; >+ >+ /* On page load, check for location.hash in the page URL */ >+ /* If present the location hash will be used to scroll to the relevant anchor */ >+ var hash = location.hash; >+ var hashPieces = hash.split('?'); >+ if( hashPieces[0] !== "" ){ >+ $( hashPieces[0] )[0].scrollIntoView(); >+ } >+ >+ $("#newitem_jump").on("click", function(e){ >+ e.preventDefault(); >+ document.getElementById("additema").scrollIntoView(); >+ }); > }); > > function CheckTemplateForm(f) { >-- >2.39.5
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 36320
:
172830
|
172832
|
172870
|
172889
|
173052
|
173505