Bugzilla – Attachment 147739 Details for
Bug 33133
Fast cataloging should be visible in cataloging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33133: Add fast cataloging to 'Cataloging' page
Bug-33133-Add-fast-cataloging-to-Cataloging-page.patch (text/plain), 4.87 KB, created by
Nick Clemens (kidclamp)
on 2023-03-03 20:30:23 UTC
(
hide
)
Description:
Bug 33133: Add fast cataloging to 'Cataloging' page
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-03 20:30:23 UTC
Size:
4.87 KB
patch
obsolete
>From 1142cf9feec3306b68b63cd30bed956a80c6873c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 3 Mar 2023 20:23:31 +0000 >Subject: [PATCH] Bug 33133: Add fast cataloging to 'Cataloging' page > >This patch adds a check for the existence of the Fast Add framework to >the Koha mainpage and the cataloging home page > >If it exists, and the user has fast cataloging permission then there >will be a link to Cataloging on the home page, and to Fast add on the >cataloging page > >To test: >1 - Have two patrons, one with superlibrarian and one with only > catalogue + fast_cataloging >2 - Make sure you have a fast add framework (code:FA) >3 - Have two windows/tabs one with each patron (one private/incognito or > use two browsers) >4 - View mainpage.pl for both >5 - Superlibrarian has Catalogue link, other does not >6 - Browse to http://localhost:8081/cgi-bin/koha/cataloguing/cataloging-home.pl >7 - Superlibrarian sees stuff, other can access page, but has no buttons >8 - Apply patch >9 - Repeat 4 - both have a link >10 - Repeat 7 - both have a link to fast add >11 - Confirm fast add link works >--- > cataloguing/cataloging-home.pl | 1 + > .../prog/en/modules/cataloguing/cataloging-home.tt | 8 +++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- > mainpage.pl | 4 ++++ > 4 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/cataloging-home.pl b/cataloguing/cataloging-home.pl >index 78327409ec..28c52939b3 100755 >--- a/cataloguing/cataloging-home.pl >+++ b/cataloguing/cataloging-home.pl >@@ -43,6 +43,7 @@ my $servers = Koha::Z3950Servers->search( > ); > > my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] }); >+$template->param( fast_cataloging => 1 ) if $frameworks->find({ frameworkcode => 'FA' }); > > $template->param( > servers => $servers, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >index 70c1a82214..b2203ccd46 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >@@ -158,7 +158,7 @@ > > <div class="col-sm-4 col-md-4"> > >- [% IF ( CAN_user_tools_label_creator || CAN_user_tools_upload_local_cover_images ) %] >+ [% IF ( CAN_user_tools_label_creator || CAN_user_tools_upload_local_cover_images || ( fast_cataloging && CAN_user_editcatalogue_fast_cataloging ) ) %] > <h3>Tools</h3> > <ul class="buttons-list"> > [% IF ( CAN_user_tools_label_creator ) %] >@@ -181,6 +181,12 @@ > </li> > [% END %] > >+ [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] >+ <li> >+ <a class="circ-button" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA"><i class="fa fa-plus"></i> Fast cataloging</a> >+ </li> >+ [% END %] >+ > </ul> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 4f4440e4ae..dec77b4852 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -124,7 +124,7 @@ > </li> > [% END %] > >- [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %] >+ [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || ( fast_cataloging && CAN_user_editcatalogue_fast_cataloging ) ) %] > <li> > <a class="icon_general icon_cataloging" href="/cgi-bin/koha/cataloguing/cataloging-home.pl"><i class="fa fa-fw fa-tag"></i>Cataloging</a> > </li> >diff --git a/mainpage.pl b/mainpage.pl >index f5872e65bb..4ca699bd43 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -30,6 +30,7 @@ use Koha::Patron::Modifications; > use Koha::Patron::Discharge; > use Koha::Reviews; > use Koha::ArticleRequests; >+use Koha::BiblioFrameworks; > use Koha::ProblemReports; > use Koha::Quotes; > use Koha::Suggestions; >@@ -49,6 +50,9 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( > > my $logged_in_user = Koha::Patrons->find($loggedinuser); > >+# Checking if there is a Fast Cataloging Framework >+$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); >+ > my $homebranch; > if (C4::Context->userenv) { > $homebranch = C4::Context->userenv->{'branch'}; >-- >2.30.2
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 33133
:
147739
|
147837
|
148165
|
148241
|
148242