4 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% FILTER collapse %]
8 [% t("Plugins") | html %] ›
9 [% IF ( method == 'tool' ) %]
10 [% t("Tools") | html %]
12 [% t("Administration") | html %]
14 [% t("Koha") | html %]
16 [% INCLUDE 'doc-head-close.inc' %]
19 <body id="plugins_plugins_home" class="plugins">
20 [% WRAPPER 'header.inc' %]
21 [% INCLUDE 'prefs-admin-search.inc' %]
24 [% WRAPPER 'sub-header.inc' %]
25 [% WRAPPER breadcrumbs %]
26 [% WRAPPER breadcrumb_item %]
27 [% IF ( method == 'tool' ) %]
28 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
30 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
33 [% WRAPPER breadcrumb_item bc_active= 1 %]
36 [% END #/ WRAPPER breadcrumbs %]
37 [% END #/ WRAPPER sub-header.inc %]
39 <div class="main container-fluid">
41 <div class="col-sm-10 col-sm-push-2">
47 [% IF ( CAN_user_plugins_manage ) %]
48 <div class="btn-toolbar" id="toolbar">
49 [% IF ( !plugins_restricted ) %]
50 <a href="/cgi-bin/koha/plugins/plugins-upload.pl" id="upload_plugin" class="btn btn-default"><i class="fa fa-upload"></i> Upload plugin</a>
53 <div class="btn-group">
54 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-eye"></i> View plugins by class <span class="caret"></span></button>
55 <ul class="dropdown-menu">
56 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl">View all plugins</a></li>
57 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">View report plugins</a></li>
58 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">View tool plugins</a></li>
59 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
60 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
61 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=intranet_catalog_biblio_enhancements">View bibliographic record enhancement plugins for the staff interface</a></li>
62 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=ill_availability_services">View ILL availability plugins</a></li>
67 <div class="btn-group">
68 <form class="form-inline" id="plugin-search-form">
69 <div class="form-group">
70 <div class="input-group">
71 <input type="text" class="form-control" name="plugin-search" id="plugin-repo-search" placeholder="Search for plugins" value="[% search_term | html %]"/>
72 <div class="input-group-btn">
73 <button class="btn btn-default" type="button" id="plugin-search-button"><i class="fa fa-search"></i></button>
83 [% IF search_results %]
84 <h2>Search results</h2>
85 <div class="page-section">
86 <table class="table table-striped">
92 <th>Latest version</th>
97 [% FOREACH sr IN search_results %]
99 <td><a href="[% sr.result.html_url | url %]" target="_new">[% sr.result.name | html %]</a></td>
100 <td>[% sr.result.description | html %]</td>
101 <td>[% sr.repo.name | html %]</td>
102 <td>[% sr.result.tag_name | html %]</td>
103 <td><a class="btn btn-default btn-sm btn-install-plugin" href="/cgi-bin/koha/plugins/plugins-upload.pl?op=Upload&uploadfile=[% sr.result.install_name | uri %]&uploadlocation=[% sr.result.install_url | uri %]"><i class="fa fa-download"></i> Install</a></td>
107 </div><!-- /.page-section -->
110 [% UNLESS ( plugins ) %]
111 [% UNLESS ( method ) %]
112 <div class="dialog message">No plugins installed</div>
114 [% IF method == 'tool' %]
115 <div class="dialog message">No plugins that can be used as a tool are installed</div>
116 [% ELSIF method == 'report' %]
117 <div class="dialog message">No plugins that can create a report are installed</div>
118 [% ELSIF method == 'to_marc' %]
119 <div class="dialog message">No plugins that can convert files to MARC records are installed</div>
120 [% ELSIF method == 'opac_online_payment' %]
121 <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
122 [% ELSIF method == 'intranet_catalog_biblio_enhancements' %]
123 <div class="dialog message">No plugins that can enhance the bibliographic records in the staff interface are installed</div>
124 [% ELSIF method == 'ill_availability_services' %]
125 <div class="dialog message">No plugins that can show ILL availability results are installed</div>
127 <div class="dialog message">Unknown plugin type <em>[% method | html %]</em></div>
131 <div class="page-section">
132 <table id="installed_plugins">
138 <th>Plugin version</th>
139 <th>Minimum Koha version</th>
140 <th>Maximum Koha version</th>
141 <th>Last updated</th>
143 [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %]
144 <th class="noExport NoSort">Actions</th>
149 [% FOREACH plugin IN plugins %]
150 [% IF plugin.error %]
153 <strong>[% plugin.name | html %]</strong>
154 <span class="label label-warning">ERRORS</span>
156 [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %]
157 <td colspan="7">Error found whilst attempting to load plugin</td>
159 <td colspan="6">Error found whilst attempting to load plugin</td>
165 <strong>[% plugin.metadata.name | html %]</strong>
168 [% plugin.metadata.description | html %]
170 [% IF ( plugin.metadata.minimum_version && koha_version < plugin.metadata.minimum_version ) %]
171 <div class="dialog alert">
172 Warning: This plugin was written for a newer version of Koha. Use at your own risk.
176 [% IF ( plugin.metadata.maximum_version && koha_version > plugin.metadata.maximum_version ) %]
177 <div class="dialog alert">
178 Warning: This plugin was written for an older version of Koha. Use at your own risk.
182 <td>[% plugin.metadata.author | html %]</td>
183 <td>[% plugin.metadata.version | html %]</td>
184 <td>[% plugin.metadata.minimum_version | html %]</td>
185 <td>[% plugin.metadata.maximum_version | html %]</td>
186 <td>[% plugin.metadata.date_updated | $KohaDates %]</td>
188 [% IF ( plugin.is_enabled ) %]
189 <span class="bg-success">Enabled</span>
191 <span class="bg-warning">Disabled</span>
194 [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %]
196 <div class="btn-group dropup">
197 <a class="btn btn-default btn-xs dropdown-toggle" id="pluginactions[% plugin.class | html %]" role="button" data-toggle="dropdown" href="#">
198 Actions <b class="caret"></b>
200 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="pluginactions[% plugin.class | html %]">
201 [% IF ( CAN_user_plugins_report ) %]
202 [% IF plugin.can('report') %]
203 <li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class | uri %]&method=report"><i class="fa fa-table fa-fw"></i> Run report</a></li>
207 [% IF ( CAN_user_plugins_tool ) %]
208 [% IF plugin.can('tool') %]
209 <li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class | uri %]&method=tool"><i class="fa fa-wrench fa-fw"></i> Run tool</a></li>
213 [% IF ( CAN_user_plugins_configure ) %]
214 [% IF plugin.can('configure') %]
215 <li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class | uri %]&method=configure"><i class="fa fa-cog fa-fw"></i> Configure</a></li>
218 [% IF ( CAN_user_plugins_manage ) %]
219 <li><a class="uninstall_plugin" data-plugin-name="[% plugin.metadata.name | html %]" href="/cgi-bin/koha/plugins/plugins-uninstall.pl?class=[% plugin.class | html %]"><i class="fa fa-trash-can fa-fw"></i> Uninstall</a></li>
220 [% IF ( plugin.is_enabled ) %]
221 <li><a class="enable_plugin" data-plugin-name="[% plugin.metadata.name | html %]" href="/cgi-bin/koha/plugins/plugins-enable.pl?class=[% plugin.class | html %]&method=disable"><i class="fa fa-pause fa-fw"></i> Disable</a></li>
223 <li><a class="enable_plugin" data-plugin-name="[% plugin.metadata.name | html %]" href="/cgi-bin/koha/plugins/plugins-enable.pl?class=[% plugin.class | html %]&method=enable"><i class="fa fa-play fa-fw"></i> Enable</a></li>
234 </div><!-- /.page-section -->
239 </div> <!-- /.col-sm-10.col-sm-push-2 -->
241 <div class="col-sm-2 col-sm-pull-10">
243 [% IF ( method == 'tool' ) %]
244 [% INCLUDE 'tools-menu.inc' %]
246 [% INCLUDE 'admin-menu.inc' %]
249 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
250 </div> <!-- /.row -->
252 [% MACRO jsinclude BLOCK %]
253 [% Asset.js("js/tools-menu.js") | $raw %]
254 [% INCLUDE 'calendar.inc' %]
255 [% INCLUDE 'datatables.inc' %]
256 [% INCLUDE 'columns_settings.inc' %]
258 $(document).ready(function(){
259 $(".uninstall_plugin").on("click", function(){
260 $(".dropdown").removeClass("open");
261 var plugin_name = $(this).data("plugin-name");
262 return confirmDelete( _("Are you sure you want to uninstall the plugin %s?").format( plugin_name ) );
265 $("#plugin-search-button").on("click", function(){
266 $("#plugin-search-form").submit();
269 KohaTable("installed_plugins", {
276 [% INCLUDE 'intranet-bottom.inc' %]