View | Details | Raw Unified | Return to bug 32773
Collapse All | Expand All

(-)a/Koha/Biblio.pm (-1 / +6 lines)
Lines 264-271 sub can_be_edited { Link Here
264
    Koha::Exceptions::MissingParameter->throw( error => "The patron parameter is missing or invalid" )
264
    Koha::Exceptions::MissingParameter->throw( error => "The patron parameter is missing or invalid" )
265
        unless $patron && ref($patron) eq 'Koha::Patron';
265
        unless $patron && ref($patron) eq 'Koha::Patron';
266
266
267
    my $is_fast_add =
268
        defined $self->frameworkcode && $self->frameworkcode ne ''
269
        ? Koha::BiblioFrameworks->find( $self->frameworkcode )->is_fast_add
270
        : 0;
271
267
    my $editcatalogue =
272
    my $editcatalogue =
268
        $self->frameworkcode eq 'FA'
273
        $self->frameworkcode eq 'FA' || $is_fast_add
269
        ? [ 'fast_cataloging', 'edit_catalogue' ]
274
        ? [ 'fast_cataloging', 'edit_catalogue' ]
270
        : 'edit_catalogue';
275
        : 'edit_catalogue';
271
276
(-)a/catalogue/detail.pl (+7 lines)
Lines 48-53 use Koha::AuthorisedValues; Link Here
48
use Koha::Biblios;
48
use Koha::Biblios;
49
use Koha::Biblio::ItemGroup::Items;
49
use Koha::Biblio::ItemGroup::Items;
50
use Koha::Biblio::ItemGroups;
50
use Koha::Biblio::ItemGroups;
51
use Koha::BiblioFrameworks;
51
use Koha::CoverImages;
52
use Koha::CoverImages;
52
use Koha::DateUtils;
53
use Koha::DateUtils;
53
use Koha::ILL::Requests;
54
use Koha::ILL::Requests;
Lines 90-99 my $activetab = $query->param('activetab'); Link Here
90
my $biblionumber = $query->param('biblionumber');
91
my $biblionumber = $query->param('biblionumber');
91
$biblionumber = HTML::Entities::encode($biblionumber);
92
$biblionumber = HTML::Entities::encode($biblionumber);
92
my $biblio = Koha::Biblios->find( $biblionumber );
93
my $biblio = Koha::Biblios->find( $biblionumber );
94
my $frameworkcode = &GetFrameworkCode($biblionumber);
95
my $is_fast_add =
96
    defined $frameworkcode && $frameworkcode ne ''
97
    ? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add
98
    : 0;
93
99
94
$template->param(
100
$template->param(
95
    biblio    => $biblio,
101
    biblio    => $biblio,
96
    activetab => $activetab,
102
    activetab => $activetab,
103
    is_fast_add => $is_fast_add,
97
);
104
);
98
105
99
unless ( $biblio ) {
106
unless ( $biblio ) {
(-)a/catalogue/moredetail.pl (+3 lines)
Lines 33-38 use C4::Search qw( enabled_staff_search_views z3950_search_args ); Link Here
33
use Koha::Acquisition::Booksellers;
33
use Koha::Acquisition::Booksellers;
34
use Koha::AuthorisedValues;
34
use Koha::AuthorisedValues;
35
use Koha::Biblios;
35
use Koha::Biblios;
36
use Koha::BiblioFrameworks;
36
use Koha::Items;
37
use Koha::Items;
37
use Koha::Patrons;
38
use Koha::Patrons;
38
39
Lines 108-113 output_and_exit( $query, $cookie, $template, 'unknown_biblio') Link Here
108
    unless $biblio && $record;
109
    unless $biblio && $record;
109
110
110
my $fw = GetFrameworkCode($biblionumber);
111
my $fw = GetFrameworkCode($biblionumber);
112
my $is_fast_add = Koha::BiblioFrameworks->find($fw)->is_fast_add;
111
my $all_items = $biblio->items->search_ordered;
113
my $all_items = $biblio->items->search_ordered;
112
114
113
my @items;
115
my @items;
Lines 315-320 $template->param( Link Here
315
    itemnumber          => $itemnumber,
317
    itemnumber          => $itemnumber,
316
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
318
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
317
    biblio              => $biblio,
319
    biblio              => $biblio,
320
    is_fast_add         => $is_fast_add,
318
);
321
);
319
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
322
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
320
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
323
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-5 / +5 lines)
Lines 35-45 Link Here
35
    </div>
35
    </div>
36
[% END %]
36
[% END %]
37
37
38
[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
38
[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
39
    <div class="btn-group">
39
    <div class="btn-group">
40
    <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</button>
40
    <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</button>
41
        <ul class="dropdown-menu">
41
        <ul class="dropdown-menu">
42
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
42
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
43
                [% IF biblio.can_be_edited(logged_in_user) %]
43
                [% IF biblio.can_be_edited(logged_in_user) %]
44
                    <li><a class="dropdown-item" id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li>
44
                    <li><a class="dropdown-item" id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li>
45
                [% ELSE %]
45
                [% ELSE %]
Lines 59-65 Link Here
59
                </li>
59
                </li>
60
            [% END %]
60
            [% END %]
61
61
62
            [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
62
            [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
63
                <li><a class="dropdown-item" id="manageitems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Manage items</a></li>
63
                <li><a class="dropdown-item" id="manageitems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Manage items</a></li>
64
            [% END %]
64
            [% END %]
65
65
Lines 128-134 Link Here
128
                <li><a class="dropdown-item" href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li>
128
                <li><a class="dropdown-item" href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li>
129
            [% END %]
129
            [% END %]
130
130
131
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
131
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
132
                [% IF ( count ) %]
132
                [% IF ( count ) %]
133
                    <li data-bs-toggle="tooltip" data-bs-placement="left" title="[% count | html %] item(s) are attached to this record. You must delete all items before deleting this record">
133
                    <li data-bs-toggle="tooltip" data-bs-placement="left" title="[% count | html %] item(s) are attached to this record. You must delete all items before deleting this record">
134
                        <a class="dropdown-item disabled" aria-disabled="true" id="deletebiblio" href="#">Delete record</a>
134
                        <a class="dropdown-item disabled" aria-disabled="true" id="deletebiblio" href="#">Delete record</a>
Lines 150-156 Link Here
150
                [% END %]
150
                [% END %]
151
            [% END %]
151
            [% END %]
152
152
153
            [% IF CAN_user_editcatalogue_delete_all_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
153
            [% IF CAN_user_editcatalogue_delete_all_items or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
154
                [% IF ( count ) %]
154
                [% IF ( count ) %]
155
                    <li>
155
                    <li>
156
                        <form action="/cgi-bin/koha/cataloguing/additem.pl" method="post">
156
                        <form action="/cgi-bin/koha/cataloguing/additem.pl" method="post">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-2 / +1 lines)
Lines 122-128 Link Here
122
                                <h4>
122
                                <h4>
123
                                    Item information
123
                                    Item information
124
                                    [% UNLESS ( ITEM_DAT.nomod ) %]
124
                                    [% UNLESS ( ITEM_DAT.nomod ) %]
125
                                        [% IF ( CAN_user_editcatalogue_edit_items ) %]
125
                                        [% IF ( CAN_user_editcatalogue_edit_items || CAN_user_editcatalogue_fast_cataloging && is_fast_add ) %]
126
                                            <a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=[% ITEM_DAT.biblionumber | uri %]&amp;itemnumber=[% ITEM_DAT.itemnumber | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit item</a>
126
                                            <a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=[% ITEM_DAT.biblionumber | uri %]&amp;itemnumber=[% ITEM_DAT.itemnumber | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit item</a>
127
                                        [% END %]
127
                                        [% END %]
128
                                    [% END %]
128
                                    [% END %]
129
- 

Return to bug 32773