From f6def32ea26a7fafd1693deeadb46c327af572d6 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 10 Dec 2020 10:50:03 +0100 Subject: [PATCH] Bug 27188: Show current class in plugins home In plugins home, when searching on a specific class, you see the table but no reminder which class is displayed. Only when there are no results you see it in message. I propose to show it in H1 title and remove it from no results message. Sort of what is asked in Bug 16391. This change adds missing specific message to class 'ill_availability_services'. This change removed the message 'Unknown plugin type'. Seems useless to me since you must change manually method in URL to get it. And this may be usefull for unlisted classes like hooks 'opac_js', ... Test plan : 1) Enable plugins 2) Install a tool plugin like InLibro Carrousel 3) Go to Administration > Manage plugins 4) Check you see the plugin and title 'All plugins' 5) In menu select 'View tool plugins' 6) Check you see the plugin and title 'Plugins that can be used as a tool' 7) In menu select 'View report plugins' 6) Check you see message 'No plugins installed' and title 'Plugins that can create a report' 7) Edit URL and go to /cgi-bin/koha/plugins/plugins-home.pl?method=opac_js 8) Check you see message 'No plugins installed' and title 'Plugins with class opac_js' --- .../prog/en/modules/plugins/plugins-home.tt | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index 700c8d167b..74d53233fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -57,7 +57,27 @@ [% END %] [% END %] -

Plugins

+

+ [% UNLESS ( method ) %] + All plugins + [% ELSE %] + [% IF method == 'tool' %] + Plugins that can be used as a tool + [% ELSIF method == 'report' %] + Plugins that can create a report + [% ELSIF method == 'to_marc' %] + Plugins that can convert files to MARC records + [% ELSIF method == 'opac_online_payment' %] + Plugins that can process online payments via the public catalog + [% ELSIF method == 'intranet_catalog_biblio_enhancements' %] + Plugins that can enhance the intranet catalog biblio records + [% ELSIF method == 'ill_availability_services' %] + Plugins that can provide ILL availability + [% ELSE %] + Plugins with class [% method | html %] + [% END %] + [% END %] +

[% IF search_results %]

Search results

@@ -83,23 +103,7 @@ [% END %] [% UNLESS ( plugins ) %] - [% UNLESS ( method ) %] -
No plugins installed
- [% ELSE %] - [% IF method == 'tool' %] -
No plugins that can be used as a tool are installed
- [% ELSIF method == 'report' %] -
No plugins that can create a report are installed
- [% ELSIF method == 'to_marc' %] -
No plugins that can convert files to MARC records are installed
- [% ELSIF method == 'opac_online_payment' %] -
No plugins that can process online payments via the public catalog are installed
- [% ELSIF method == 'intranet_catalog_biblio_enhancements' %] -
No plugins that can enhance the intranet catalog biblio records are installed
- [% ELSE %] -
Unknown plugin type [% method | html %]
- [% END %] - [% END %] +
No plugins installed
[% ELSE %] -- 2.29.2