is_nullable: 1
size: 255
+=head2 opac_option
+
+ data_type: 'tinyint'
+ default_value: 0
+ is_nullable: 0
+
=cut
__PACKAGE__->add_columns(
is_nullable => 1,
size => 255,
},
+ "opac_option",
+ { data_type => "tinyint", default_value => 0, is_nullable => 0 },
);
=head1 PRIMARY KEY
__PACKAGE__->set_primary_key("export_format_id");
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YSQshI3mJfO0LsOlwvdIdg
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-20 20:08:25
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:J2VDj9yI8uanFR9EGv2sXw
sub koha_object_class {
'Koha::CsvProfile';
'Koha::CsvProfiles';
}
+__PACKAGE__->add_columns(
+ '+opac_option' => { is_boolean => 1 },
+);
+
1;
--- /dev/null
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+ unless( column_exists( 'export_format', 'opac_option' ) ) {
+ $dbh->do(q|ALTER TABLE export_format ADD opac_option TINYINT(1) NOT NULL DEFAULT 0 AFTER used_for|);
+ }
+
+ NewVersion( $DBversion, 5087, "Add export_format.opac_option" );
+}
`encoding` varchar(255) NOT NULL DEFAULT 'utf8',
`type` varchar(255) DEFAULT 'marc',
`used_for` varchar(255) DEFAULT 'export_records',
- PRIMARY KEY (`export_format_id`)
+ `opac_option` TINYINT(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`export_format_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Used for CSV export';
--
</li>
<li class="marc_specific">
+ <label for="opac_option">Show option in OPAC: </label>
+ [% IF csv_profile.opac_option %]
+ <input type="checkbox" name="opac_option" id="opac_option" value="1" checked="checked">
+ [% ELSE %]
+ <input type="checkbox" name="opac_option" id="opac_option" value="1">
+ [% END %]
+ </li>
+
+ <li class="marc_specific">
<label for="marc_content" class="required">Profile MARC fields: </label>
<textarea cols="50" rows="2" name="marc_content" id="marc_content">[% csv_profile.content | html %]</textarea>
<span class="required">Required</span>
print $output;
} else {
- $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' }) ]);
+ $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records', opac_option => 1 }) ]);
$template->param(bib_list => $bib_list);
output_html_with_http_headers $query, $cookie, $template->output;
}
my $field_separator = $input->param("field_separator");
my $subfield_separator = $input->param("subfield_separator");
my $encoding = $input->param("encoding");
+ my $opac_option = $input->param("opac_option");
if ($export_format_id) {
my $csv_profile = Koha::CsvProfiles->find($export_format_id)
$csv_profile->encoding($encoding);
$csv_profile->type($type);
$csv_profile->used_for($used_for);
+ $csv_profile->opac_option($opac_option);
eval { $csv_profile->store; };
if ($@) {
encoding => $encoding,
type => $type,
used_for => $used_for,
+ opac_option => $opac_option
}
);
eval { $csv_profile->store; };