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

(-)a/Koha/Item/Templates.pm (+2 lines)
Lines 28-33 use base qw(Koha::Objects); Link Here
28
28
29
Koha::Item::Templates - Koha Item Template Object set class
29
Koha::Item::Templates - Koha Item Template Object set class
30
30
31
=head2 METHODS
32
31
=head3 get_available
33
=head3 get_available
32
34
33
Returns a hashref with keys 'owned' and 'shared' pointing to Koha::Item::Templats objects
35
Returns a hashref with keys 'owned' and 'shared' pointing to Koha::Item::Templats objects
(-)a/Koha/Schema/Result/ItemEditorTemplate.pm (+17 lines)
Lines 114-122 __PACKAGE__->belongs_to( Link Here
114
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-28 16:49:35
114
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-28 16:49:35
115
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JIe4z78F9oMOAnAZdqmtA
115
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JIe4z78F9oMOAnAZdqmtA
116
116
117
__PACKAGE__->add_columns(
118
    '+is_shared' => { is_boolean => 1 },
119
);
120
121
=head2 koha_object_class
122
123
  Koha Object class
124
125
=cut
126
117
sub koha_object_class {
127
sub koha_object_class {
118
    'Koha::Item::Template';
128
    'Koha::Item::Template';
119
}
129
}
130
131
=head2 koha_objects_class
132
133
  Koha Objects class
134
135
=cut
136
120
sub koha_objects_class {
137
sub koha_objects_class {
121
    'Koha::Item::Templates';
138
    'Koha::Item::Templates';
122
}
139
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-2 / +1 lines)
Lines 272-278 Link Here
272
            <option value="0" selected="selected">Save as new template</option>
272
            <option value="0" selected="selected">Save as new template</option>
273
            <optgroup label="Update existing template">
273
            <optgroup label="Update existing template">
274
                [% FOREACH t IN item_templates.owned %]
274
                [% FOREACH t IN item_templates.owned %]
275
                    <option data-editor="1" data-shared="[% t.is_shared %]" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option>
275
                    <option data-editor="1" data-shared="[% t.is_shared | html %]" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option>
276
                [% END %]
276
                [% END %]
277
                [% IF CAN_user_editcatalogue_manage_item_editor_templates && item_templates.shared.count %]
277
                [% IF CAN_user_editcatalogue_manage_item_editor_templates && item_templates.shared.count %]
278
                    <optgroup label="Update shared template">
278
                    <optgroup label="Update shared template">
279
- 

Return to bug 24606