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
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85cfdb1f5b
)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
2630deea5b
commit
d65cf822ea
4 changed files with 13 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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 %]
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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'};
|
||||
|
|
Loading…
Reference in a new issue