5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Tools › Plugins </title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="plugins_plugins_home" class="plugins">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'prefs-admin-search.inc' %]
14 <div id="breadcrumbs">
15 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
16 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
20 <div class="main container-fluid">
22 <div class="col-sm-10 col-sm-push-2">
27 [% IF ( CAN_user_plugins_manage ) %]
28 <div class="btn-toolbar" id="toolbar">
29 <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>
31 <div class="btn-group">
32 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-eye"></i> View plugins by class <span class="caret"></span></button>
33 <ul class="dropdown-menu">
34 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl">View all plugins</a></li>
35 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">View report plugins</a></li>
36 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">View tool plugins</a></li>
37 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
38 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
39 <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=intranet_catalog_biblio_enhancements">View intranet catalog biblio enhancement plugins</a></li>
43 <div class="btn-group">
44 <form class="form-inline" id="plugin-search-form">
45 <div class="form-group">
46 <div class="input-group">
47 <input type="text" class="form-control" name="plugin-search" id="plugin-repo-search" placeholder="Search for plugins" value="[% search_term | html %]"/>
48 <div class="input-group-btn">
49 <button class="btn btn-default" type="button" id="plugin-search-button"><i class="fa fa-search"></i></button>
59 [% IF search_results %]
60 <h2>Search results</h2>
61 <table class="table table-striped">
71 [% FOREACH sr IN search_results %]
73 <td><a href="[% sr.result.html_url | url %]" target="_new">[% sr.result.name | html %]</a></td>
74 <td>[% sr.result.description | html %]</td>
75 <td>[% sr.repo.name | html %]</td>
76 <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>
82 [% UNLESS ( plugins ) %]
83 [% UNLESS ( method ) %]
84 <div class="dialog message">No plugins installed</div>
86 [% IF method == 'tool' %]
87 <div class="dialog message">No plugins that can be used as a tool are installed</div>
88 [% ELSIF method == 'report' %]
89 <div class="dialog message">No plugins that can create a report are installed</div>
90 [% ELSIF method == 'to_marc' %]
91 <div class="dialog message">No plugins that can convert files to MARC records are installed</div>
92 [% ELSIF method == 'opac_online_payment' %]
93 <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
94 [% ELSIF method == 'intranet_catalog_biblio_enhancements' %]
95 <div class="dialog message">No plugins that can enhance the intranet catalog biblio records are installed</div>
97 <div class="dialog message">Unknown plugin type <i>[% method | html %]</i></div>
106 <th>Plugin version</th>
107 <th>Minimum Koha version</th>
108 <th>Maximum Koha version</th>
109 <th>Last updated</th>
110 [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %]
115 [% FOREACH plugin IN plugins %]
118 <strong>[% plugin.metadata.name | html %]</strong>
119 [% IF ( plugin.is_enabled ) %]
120 <span class="label label-primary">ENABLED</span>
122 <span class="label label-default">DISABLED</span>
126 [% plugin.metadata.description | html %]
128 [% IF ( plugin.metadata.minimum_version && koha_version < plugin.metadata.minimum_version ) %]
129 <div class="dialog alert">
130 Warning: This report was written for a newer version of Koha. Run at your own risk.
134 [% IF ( plugin.metadata.maximum_version && koha_version > plugin.metadata.maximum_version ) %]
135 <div class="dialog alert">
136 Warning: This plugin was written for an older version of Koha. Run at your own risk.
140 <td>[% plugin.metadata.author | html %]</td>
141 <td>[% plugin.metadata.version | html %]</td>
142 <td>[% plugin.metadata.minimum_version | html %]</td>
143 <td>[% plugin.metadata.maximum_version | html %]</td>
144 <td>[% plugin.metadata.date_updated | $KohaDates %]</td>
145 [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %]
147 <div class="dropdown">
148 <a class="btn btn-default btn-xs dropdown-toggle" id="pluginactions[% plugin.class | html %]" role="button" data-toggle="dropdown" href="#">
149 Actions <b class="caret"></b>
151 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="pluginactions[% plugin.class | html %]">
152 [% IF ( CAN_user_plugins_report ) %]
153 [% IF plugin.can('report') %]
154 <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>
158 [% IF ( CAN_user_plugins_tool ) %]
159 [% IF plugin.can('tool') %]
160 <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>
164 [% IF ( CAN_user_plugins_configure ) %]
165 [% IF plugin.can('configure') %]
166 <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>
169 [% IF ( CAN_user_plugins_manage ) %]
170 <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 fa-fw"></i> Uninstall</a></li>
171 [% IF ( plugin.is_enabled ) %]
172 <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>
174 <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>
187 </div> <!-- /.col-sm-10.col-sm-push-2 -->
189 <div class="col-sm-2 col-sm-pull-10">
191 [% INCLUDE 'tools-menu.inc' %]
193 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
194 </div> <!-- /.row -->
196 [% MACRO jsinclude BLOCK %]
197 [% Asset.js("js/tools-menu.js") | $raw %]
198 [% INCLUDE 'calendar.inc' %]
200 $(document).ready(function(){
201 $(".uninstall_plugin").on("click", function(){
202 $(".dropdown").removeClass("open");
203 var plugin_name = $(this).data("plugin-name");
204 return confirmDelete( _("Are you sure you want to uninstall the plugin %s?").format( plugin_name ) );
207 $("#plugin-search-button").on("click", function(){
208 $("#plugin-search-form").submit();
214 [% INCLUDE 'intranet-bottom.inc' %]