From a7ee2d0a41cf4397f047053a0c8ee89eced2de6f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 5 Nov 2019 12:31:04 -0500 Subject: [PATCH] Bug 23975: [PoC] Add ability to search and install plugins from GitHub It would be nice to be able to search and install plugins directly from GitHub ( and GitLab if possible ). This would make it easier to verify the authenticity of plugins and make discovering new plugins easier as well as making installation of plugins simpler. Test Plan: 1) Apply this patch 2) Add the new block for plugin_repos to your koha-conf.xml 3) Restart all the things! 4) Browse to the plugins home page 5) Try searching for 'patrons' in the new search box 6) Verify you get results! --- debian/templates/koha-conf-site.xml.in | 13 +++++++ etc/koha-conf.xml | 13 +++++++ .../prog/en/modules/plugins/plugins-home.tt | 36 +++++++++++++++++++ plugins/plugins-home.pl | 23 ++++++++++++ 4 files changed, 85 insertions(+) diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index f056138cf2..3a567ea48f 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -399,5 +399,18 @@ __END_SRU_PUBLICSERVER__ server. e.g. Antarctica/South_Pole --> __TIMEZONE__ + + + ByWater Solutions + bywatersolutions + github + + + Theke Solutions + thekesolutions + github + + + diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index e7699436a7..9a2b143ed5 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -218,5 +218,18 @@ __PAZPAR2_TOGGLE_XML_POST__ server. e.g. Antarctica/South_Pole --> + + + ByWater Solutions + bywatersolutions + github + + + Theke Solutions + thekesolutions + github + + + 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 5d598c525e..3ae2cd5e3a 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 @@ -27,6 +27,7 @@ [% IF ( CAN_user_plugins_manage ) %]
Upload plugin +
+ +
+
+
+
+ +
+
+
+
+
[% END %]

Plugins

+ [% IF search_results %] +

Search results

+ + + + + + + + + + + [% FOREACH sr IN search_results %] + + + + + + + [% END %] +
NameDescriptionOrganization 
[% sr.result.name %][% sr.result.description %][% sr.repo.name %]
+ [% END %] + [% UNLESS ( plugins ) %] [% UNLESS ( method ) %]
No plugins installed
@@ -161,6 +196,7 @@ [% INCLUDE 'calendar.inc' %]