diff --git a/Koha/Plugin/PDFtoCover.pm b/Koha/Plugin/PDFtoCover.pm index 6d23be8..eba83e5 100644 --- a/Koha/Plugin/PDFtoCover.pm +++ b/Koha/Plugin/PDFtoCover.pm @@ -49,14 +49,14 @@ BEGIN { } our $dbh = C4::Context->dbh(); -our $VERSION = 2.0; +our $VERSION = 2.1; our $metadata = { name => 'PDFtoCover', - author => 'Mehdi Hamidi, Bouzid Fergani, Arthur Bousquet, The Minh Luong', + author => 'Mehdi Hamidi, Bouzid Fergani, Arthur Bousquet, The Minh Luong, Matthias Le Gac', description => 'Creates cover images for documents missing one', date_authored => '2016-06-08', - date_updated => '2024-03-18', - minimum_version => '23.05', + date_updated => '2024-03-19', + minimum_version => '23.05.08', version => $VERSION, namespace => 'pdftocover', }; @@ -356,6 +356,24 @@ sub background_tasks { }; } +sub template_include_paths { + my ($self, $args) = @_; + + if ( $args->{lang} eq 'fr' ) { + return [ + $self->mbf_path('inc/fr'), + ] + } elsif ( $args->{lang} eq 'fr-CA' ) { + return [ + $self->mbf_path('inc/fr-CA'), + ] + } else { + return [ + $self->mbf_path('inc/en'), + ] + } +} + #Supprimer le plugin avec toutes ses données sub uninstall() { my ( $self, $args ) = @_; diff --git a/Koha/Plugin/PDFtoCover/inc/en/background_jobs/plugin_pdftocover_greeter.inc b/Koha/Plugin/PDFtoCover/inc/en/background_jobs/plugin_pdftocover_greeter.inc new file mode 100644 index 0000000..03241eb --- /dev/null +++ b/Koha/Plugin/PDFtoCover/inc/en/background_jobs/plugin_pdftocover_greeter.inc @@ -0,0 +1,30 @@ +[% USE Koha %] + +[% BLOCK process %] +[% END %] + +[% SET report = job.decoded_data %] +[% BLOCK report %] + [% IF job.status == 'finished' %] + [% IF report %] +
+ [% ELSE %] + + [% END %] + [% ELSIF job.status == 'cancelled' %] + The job has been cancelled before it finished. + [% END %] +[% END %] + +[% BLOCK detail %] +[% END %] + +[% BLOCK js %] +[% END %] diff --git a/Koha/Plugin/PDFtoCover/inc/fr-CA/background_jobs/plugin_pdftocover_greeter.inc b/Koha/Plugin/PDFtoCover/inc/fr-CA/background_jobs/plugin_pdftocover_greeter.inc new file mode 100644 index 0000000..42aec44 --- /dev/null +++ b/Koha/Plugin/PDFtoCover/inc/fr-CA/background_jobs/plugin_pdftocover_greeter.inc @@ -0,0 +1,30 @@ +[% USE Koha %] + +[% BLOCK process %] +[% END %] + +[% SET report = job.decoded_data %] +[% BLOCK report %] + [% IF job.status == 'finished' %] + [% IF report %] + + [% ELSE %] + + + [% END %] + [% ELSIF job.status == 'cancelled' %] + La tâche a été annulée avant de finir. + [% END %] +[% END %] + +[% BLOCK detail %] +[% END %] + +[% BLOCK js %] +[% END %] diff --git a/Koha/Plugin/PDFtoCover/inc/fr/background_jobs/plugin_pdftocover_greeter.inc b/Koha/Plugin/PDFtoCover/inc/fr/background_jobs/plugin_pdftocover_greeter.inc new file mode 100644 index 0000000..42aec44 --- /dev/null +++ b/Koha/Plugin/PDFtoCover/inc/fr/background_jobs/plugin_pdftocover_greeter.inc @@ -0,0 +1,30 @@ +[% USE Koha %] + +[% BLOCK process %] +[% END %] + +[% SET report = job.decoded_data %] +[% BLOCK report %] + [% IF job.status == 'finished' %] + [% IF report %] + + [% ELSE %] + + + [% END %] + [% ELSIF job.status == 'cancelled' %] + La tâche a été annulée avant de finir. + [% END %] +[% END %] + +[% BLOCK detail %] +[% END %] + +[% BLOCK js %] +[% END %]