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

(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 336-342 sub can_be_edited { Link Here
336
        : 0;
336
        : 0;
337
337
338
    my $editcatalogue =
338
    my $editcatalogue =
339
        $self->frameworkcode eq 'FA' || $is_fast_add
339
        $is_fast_add
340
        ? [ 'fast_cataloging', 'edit_catalogue' ]
340
        ? [ 'fast_cataloging', 'edit_catalogue' ]
341
        : 'edit_catalogue';
341
        : 'edit_catalogue';
342
342
(-)a/Koha/Schema/Result/BiblioFramework.pm (-1 / +1 lines)
Lines 48-54 the description/name given to the framework Link Here
48
  default_value: 0
48
  default_value: 0
49
  is_nullable: 0
49
  is_nullable: 0
50
50
51
the ability to be used as a Fast Add framework
51
the ability to be used as a Fast add framework
52
52
53
=cut
53
=cut
54
54
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 90-96 my $activetab = $query->param('activetab'); Link Here
90
my $biblionumber = $query->param('biblionumber');
90
my $biblionumber = $query->param('biblionumber');
91
$biblionumber = HTML::Entities::encode($biblionumber);
91
$biblionumber = HTML::Entities::encode($biblionumber);
92
my $biblio        = Koha::Biblios->find($biblionumber);
92
my $biblio        = Koha::Biblios->find($biblionumber);
93
my $frameworkcode = &GetFrameworkCode($biblionumber);
93
my $frameworkcode = $biblio->frameworkcode;
94
my $is_fast_add =
94
my $is_fast_add =
95
    defined $frameworkcode && $frameworkcode ne ''
95
    defined $frameworkcode && $frameworkcode ne ''
96
    ? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add
96
    ? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add
(-)a/catalogue/moredetail.pl (-1 / +1 lines)
Lines 107-113 my $record = $biblio ? $biblio->metadata->record : undef; Link Here
107
output_and_exit( $query, $cookie, $template, 'unknown_biblio' )
107
output_and_exit( $query, $cookie, $template, 'unknown_biblio' )
108
    unless $biblio && $record;
108
    unless $biblio && $record;
109
109
110
my $fw          = GetFrameworkCode($biblionumber);
110
my $fw          = $biblio->frameworkcode;
111
my $is_fast_add = Koha::BiblioFrameworks->find($fw)->is_fast_add;
111
my $is_fast_add = Koha::BiblioFrameworks->find($fw)->is_fast_add;
112
my $all_items   = $biblio->items->search_ordered;
112
my $all_items   = $biblio->items->search_ordered;
113
113
(-)a/installer/data/mysql/atomicupdate/bug_32773.pl (-2 / +2 lines)
Lines 3-9 use Koha::Installer::Output qw(say_warning say_failure say_success say_info); Link Here
3
3
4
return {
4
return {
5
    bug_number  => "32773",
5
    bug_number  => "32773",
6
    description => "Add ability to have more than 1 Fast Add framework",
6
    description => "Add ability to have more than 1 Fast add framework",
7
    up          => sub {
7
    up          => sub {
8
        my ($args) = @_;
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
Lines 12-18 return { Link Here
12
            $dbh->do(
12
            $dbh->do(
13
                q{
13
                q{
14
                ALTER TABLE biblio_framework
14
                ALTER TABLE biblio_framework
15
                ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0
15
                ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast add framework'
16
                AFTER frameworktext;
16
                AFTER frameworktext;
17
            }
17
            }
18
            );
18
            );
(-)a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_sample_fastadd_framework.yml (-2 / +2 lines)
Lines 23-29 Link Here
23
# *************************************************************
23
# *************************************************************
24
24
25
description:
25
description:
26
  - "'FA', a 'Fast Add' minimal MARC21 framework suitable for ILL or on-the-fly cataloguing."
26
  - "'FA', a 'Fast add' minimal MARC21 framework suitable for ILL or on-the-fly cataloguing."
27
27
28
tables:
28
tables:
29
  - biblio_framework:
29
  - biblio_framework:
Lines 31-37 tables: Link Here
31
      multiline: []
31
      multiline: []
32
      rows:
32
      rows:
33
        - frameworkcode: FA
33
        - frameworkcode: FA
34
          frameworktext: "Fast Add Framework"
34
          frameworktext: "Fast add Framework"
35
35
36
sql_statements:
36
sql_statements:
37
  - "INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
37
  - "INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/en/marcflavour/unimarc/optional/unimarc_sample_fastadd_framework.yml (-2 / +2 lines)
Lines 23-29 Link Here
23
# *************************************************************
23
# *************************************************************
24
24
25
description:
25
description:
26
  - "'FA', a 'Fast Add' minimal UNIMARC framework suitable for ILL or on-the-fly cataloguing."
26
  - "'FA', a 'Fast add' minimal UNIMARC framework suitable for ILL or on-the-fly cataloguing."
27
27
28
tables:
28
tables:
29
  - biblio_framework:
29
  - biblio_framework:
Lines 31-37 tables: Link Here
31
      multiline: []
31
      multiline: []
32
      rows:
32
      rows:
33
        - frameworkcode: FA
33
        - frameworkcode: FA
34
          frameworktext: "Fast Add Framework"
34
          frameworktext: "Fast add Framework"
35
35
36
sql_statements:
36
sql_statements:
37
  - "INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
37
  - "INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1125-1131 DROP TABLE IF EXISTS `biblio_framework`; Link Here
1125
CREATE TABLE `biblio_framework` (
1125
CREATE TABLE `biblio_framework` (
1126
  `frameworkcode` varchar(4) NOT NULL DEFAULT '' COMMENT 'the unique code assigned to the framework',
1126
  `frameworkcode` varchar(4) NOT NULL DEFAULT '' COMMENT 'the unique code assigned to the framework',
1127
  `frameworktext` varchar(255) NOT NULL DEFAULT '' COMMENT 'the description/name given to the framework',
1127
  `frameworktext` varchar(255) NOT NULL DEFAULT '' COMMENT 'the description/name given to the framework',
1128
  `is_fast_add` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast Add framework',
1128
  `is_fast_add` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast add framework',
1129
  PRIMARY KEY (`frameworkcode`)
1129
  PRIMARY KEY (`frameworkcode`)
1130
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1130
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1131
/*!40101 SET character_set_client = @saved_cs_client */;
1131
/*!40101 SET character_set_client = @saved_cs_client */;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-5 / +5 lines)
Lines 34-44 Link Here
34
        </div>
34
        </div>
35
    [% END %]
35
    [% END %]
36
36
37
    [% 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 ) %]
37
    [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %]
38
        <div class="btn-group">
38
        <div class="btn-group">
39
            <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>
39
            <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
            <ul class="dropdown-menu">
40
            <ul class="dropdown-menu">
41
                [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
41
                [% IF CAN_user_editcatalogue_edit_catalogue || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %]
42
                    [% IF biblio.can_be_edited(logged_in_user) %]
42
                    [% IF biblio.can_be_edited(logged_in_user) %]
43
                        <li><a class="dropdown-item" id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li>
43
                        <li><a class="dropdown-item" id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li>
44
                    [% ELSE %]
44
                    [% ELSE %]
Lines 58-64 Link Here
58
                    </li>
58
                    </li>
59
                [% END %]
59
                [% END %]
60
60
61
                [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
61
                [% IF CAN_user_editcatalogue_edit_items || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %]
62
                    <li><a class="dropdown-item" id="manageitems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Manage items</a></li>
62
                    <li><a class="dropdown-item" id="manageitems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Manage items</a></li>
63
                [% END %]
63
                [% END %]
64
64
Lines 127-133 Link Here
127
                    <li><a class="dropdown-item" href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li>
127
                    <li><a class="dropdown-item" href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li>
128
                [% END %]
128
                [% END %]
129
129
130
                [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
130
                [% IF CAN_user_editcatalogue_edit_catalogue || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %]
131
                    [% IF ( count ) %]
131
                    [% IF ( count ) %]
132
                        <li
132
                        <li
133
                            data-bs-toggle="tooltip"
133
                            data-bs-toggle="tooltip"
Lines 158-164 Link Here
158
                    [% END %]
158
                    [% END %]
159
                [% END %]
159
                [% END %]
160
160
161
                [% IF CAN_user_editcatalogue_delete_all_items or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %]
161
                [% IF CAN_user_editcatalogue_delete_all_items || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %]
162
                    [% IF ( count ) %]
162
                    [% IF ( count ) %]
163
                        <li>
163
                        <li>
164
                            <form action="/cgi-bin/koha/cataloguing/additem.pl" method="post">
164
                            <form action="/cgi-bin/koha/cataloguing/additem.pl" method="post">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-2 / +2 lines)
Lines 136-142 Link Here
136
                        <span class="required">Required</span>
136
                        <span class="required">Required</span>
137
                    </li>
137
                    </li>
138
                    <li>
138
                    <li>
139
                        <label for="is_fast_add">Use as a Fast Add framework: </label>
139
                        <label for="is_fast_add">Use as a Fast add framework: </label>
140
                        [% IF framework.frameworkcode == 'FA' %]
140
                        [% IF framework.frameworkcode == 'FA' %]
141
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked disabled />
141
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked disabled />
142
                        [% ELSIF framework.is_fast_add %]
142
                        [% ELSIF framework.is_fast_add %]
Lines 305-311 Link Here
305
                            <td>
305
                            <td>
306
                                [% loo.frameworktext | html %]
306
                                [% loo.frameworktext | html %]
307
                                [% IF loo.is_fast_add %]
307
                                [% IF loo.is_fast_add %]
308
                                    <span class="badge rounded-pill bg-secondary float-end">Fast Add</span>
308
                                    <span class="badge rounded-pill bg-secondary float-end">Fast add</span>
309
                                [% END %]
309
                                [% END %]
310
                            </td>
310
                            </td>
311
                            <td>
311
                            <td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-3 / +3 lines)
Lines 901-907 Link Here
901
                [% END %]
901
                [% END %]
902
902
903
                <div id="toolbar" class="btn-toolbar sticky">
903
                <div id="toolbar" class="btn-toolbar sticky">
904
                    [% IF CAN_user_editcatalogue_edit_items or ( ( frameworkcode == 'FA' || is_fast_add ) and CAN_user_editcatalogue_fast_cataloging ) %]
904
                    [% IF CAN_user_editcatalogue_edit_items || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %]
905
                        [% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
905
                        [% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
906
                            <!-- Action is under fast cataloging - Save button redirecting to items -->
906
                            <!-- Action is under fast cataloging - Save button redirecting to items -->
907
                            <div class="btn-group"><a href="#" id="saveanditems" class="btn btn-primary"><i class="fa fa-save"></i> Save</a></div>
907
                            <div class="btn-group"><a href="#" id="saveanditems" class="btn btn-primary"><i class="fa fa-save"></i> Save</a></div>
Lines 956-962 Link Here
956
                                        [% ELSE %]
956
                                        [% ELSE %]
957
                                            <i class="fa fa-fw">&nbsp;</i>
957
                                            <i class="fa fa-fw">&nbsp;</i>
958
                                        [% END %]
958
                                        [% END %]
959
                                        [% !framework ? 'Default' : framework.frameworktext | html %]
959
                                        [% ( !framework ? 'Default' : framework.frameworktext ) | html %]
960
                                    </a>
960
                                    </a>
961
                                </li>
961
                                </li>
962
                            [% END %]
962
                            [% END %]
Lines 968-974 Link Here
968
                                [% END %]
968
                                [% END %]
969
                            [% END %]
969
                            [% END %]
970
                            [% IF CAN_user_editcatalogue_fast_cataloging %]
970
                            [% IF CAN_user_editcatalogue_fast_cataloging %]
971
                                <li><h6 class="dropdown-header">Change Fast Add framework</h6></li>
971
                                <li><h6 class="dropdown-header">Change Fast add framework</h6></li>
972
                                [% FOREACH framework IN frameworks %]
972
                                [% FOREACH framework IN frameworks %]
973
                                    [% IF framework.is_fast_add %][% INCLUDE framework_link %][% END %]
973
                                    [% IF framework.is_fast_add %][% INCLUDE framework_link %][% END %]
974
                                [% END %]
974
                                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt (-3 / +2 lines)
Lines 42-48 Link Here
42
                        [% IF !framework.is_fast_add %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>[% END %]
42
                        [% IF !framework.is_fast_add %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>[% END %]
43
                    [% END %]
43
                    [% END %]
44
                    [% FOREACH framework IN frameworks %]
44
                    [% FOREACH framework IN frameworks %]
45
                        [% IF loop.first %]<li><h6 class="dropdown-header">Fast Add frameworks</h6></li>[% END %]
45
                        [% IF loop.first %]<li><h6 class="dropdown-header">Fast add frameworks</h6></li>[% END %]
46
                        [% IF framework.is_fast_add %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>[% END %]
46
                        [% IF framework.is_fast_add %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>[% END %]
47
                    [% END %]
47
                    [% END %]
48
                </ul>
48
                </ul>
Lines 57-63 Link Here
57
                            [% IF !framework.is_fast_add %]<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a class="dropdown-item" href="#">[% framework.frameworktext | html %]</a></li>[% END %]
57
                            [% IF !framework.is_fast_add %]<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a class="dropdown-item" href="#">[% framework.frameworktext | html %]</a></li>[% END %]
58
                        [% END %]
58
                        [% END %]
59
                        [% FOREACH framework IN frameworks %]
59
                        [% FOREACH framework IN frameworks %]
60
                            [% IF loop.first %]<li><h6 class="dropdown-header">Fast Add frameworks</h6></li>[% END %]
60
                            [% IF loop.first %]<li><h6 class="dropdown-header">Fast add frameworks</h6></li>[% END %]
61
                            [% IF framework.is_fast_add %]<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a class="dropdown-item" href="#">[% framework.frameworktext | html %]</a></li>[% END %]
61
                            [% IF framework.is_fast_add %]<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a class="dropdown-item" href="#">[% framework.frameworktext | html %]</a></li>[% END %]
62
                        [% END %]
62
                        [% END %]
63
                    </ul>
63
                    </ul>
64
- 

Return to bug 32773