Lines 3-16
Link Here
|
3 |
<title>Koha › Tools › Plugins </title> |
3 |
<title>Koha › Tools › Plugins </title> |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
5 |
[% INCLUDE 'calendar.inc' %] |
5 |
[% INCLUDE 'calendar.inc' %] |
|
|
6 |
<script type="text/javascript"> |
7 |
$(document).ready(function(){ |
8 |
$(".uninstall_plugin").on("click", function(){ |
9 |
$(".dropdown").removeClass("open"); |
10 |
var plugin_name = $(this).data("plugin-name"); |
11 |
return confirmDelete( _("Are you sure you want to uninstall the plugin %s?").format( plugin_name ) ); |
12 |
}); |
13 |
}); |
14 |
</script> |
6 |
</head> |
15 |
</head> |
7 |
|
16 |
|
8 |
<body id="plugins_plugins_home" class="plugins"> |
17 |
<body id="plugins_plugins_home" class="plugins"> |
9 |
[% INCLUDE 'header.inc' %] |
18 |
[% INCLUDE 'header.inc' %] |
10 |
[% INCLUDE 'circ-search.inc' %] |
19 |
[% INCLUDE 'circ-search.inc' %] |
11 |
|
20 |
|
12 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> |
21 |
<div id="breadcrumbs"> |
13 |
› Plugins |
22 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
|
|
23 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
24 |
Plugins |
14 |
</div> |
25 |
</div> |
15 |
|
26 |
|
16 |
<div id="doc3" class="yui-t1"> |
27 |
<div id="doc3" class="yui-t1"> |
Lines 18-69
Link Here
|
18 |
<div id="yui-main"> |
29 |
<div id="yui-main"> |
19 |
<div class="yui-b"> |
30 |
<div class="yui-b"> |
20 |
<div class="details"> |
31 |
<div class="details"> |
|
|
32 |
|
33 |
[% IF ( CAN_user_plugins_manage ) %] |
34 |
<div class="btn-toolbar" id="toolbar"> |
35 |
<a href="/cgi-bin/koha/plugins/plugins-upload.pl" id="upload_plugin" class="btn btn-small"><i class="fa fa-upload"></i> Upload plugin</a> |
36 |
</div> |
37 |
[% END %] |
38 |
|
21 |
<h1>Plugins</h1> |
39 |
<h1>Plugins</h1> |
22 |
|
40 |
|
23 |
[% UNLESS ( plugins ) %] |
41 |
[% UNLESS ( plugins ) %] |
24 |
[% UNLESS ( method ) %] |
42 |
[% UNLESS ( method ) %] |
25 |
<h3>No plugins installed</h3> |
43 |
<div class="dialog message">No plugins installed</div> |
26 |
[% ELSE %] |
44 |
[% ELSE %] |
27 |
[% IF method == 'tool' %] |
45 |
[% IF method == 'tool' %] |
28 |
<h3>No plugins that can be used as a tool are installed</h3> |
46 |
<div class="dialog message">No plugins that can be used as a tool are installed</div> |
29 |
[% ELSIF method == 'report' %] |
47 |
[% ELSIF method == 'report' %] |
30 |
<h3>No plugins that can create a report are installed</h3> |
48 |
<div class="dialog message">No plugins that can create a report are installed</div> |
31 |
[% ELSE %] |
49 |
[% ELSE %] |
32 |
<h3>Unknown plugin type <i>[% method %]</i> |
50 |
<div class="dialog message">Unknown plugin type <i>[% method %]</i></div> |
33 |
[% END %] |
51 |
[% END %] |
34 |
[% END %] |
52 |
[% END %] |
35 |
[% ELSE %] |
53 |
[% ELSE %] |
36 |
<table> |
54 |
<table> |
37 |
<tr> |
55 |
<tr> |
38 |
<th>Name</th> |
56 |
<th>Name</th> |
39 |
<th> </th> |
|
|
40 |
<th>Description</th> |
57 |
<th>Description</th> |
41 |
<th>Author</th> |
58 |
<th>Author</th> |
42 |
<th>Plugin Version</th> |
59 |
<th>Plugin version</th> |
43 |
<th>Minimum Koha Version</th> |
60 |
<th>Minimum Koha version</th> |
44 |
<th>Maximum Koha Version</th> |
61 |
<th>Maximum Koha version</th> |
45 |
<th>Last Updated</th> |
62 |
<th>Last updated</th> |
46 |
[% IF ( CAN_user_plugins_configure ) %]<th>Configure</th>[% END %] |
63 |
[% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] |
47 |
[% IF ( CAN_user_plugins_manage ) %]<th>Uninstall</th>[% END %] |
64 |
<th>Actions</th> |
|
|
65 |
[% END %] |
48 |
</tr> |
66 |
</tr> |
49 |
|
67 |
|
50 |
[% FOREACH plugin IN plugins %] |
68 |
[% FOREACH plugin IN plugins %] |
51 |
<tr> |
69 |
<tr> |
52 |
<td><strong>[% plugin.metadata.name %]</strong></td> |
70 |
<td><strong>[% plugin.metadata.name %]</strong></td> |
53 |
<td> |
71 |
<td> |
54 |
[% IF ( CAN_user_plugins_report ) %] |
|
|
55 |
[% IF plugin.can('report') %] |
56 |
<p style="white-space:nowrap"><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=report">Run report</a></p> |
57 |
[% END %] |
58 |
[% END %] |
59 |
|
60 |
[% IF ( CAN_user_plugins_tool ) %] |
61 |
[% IF plugin.can('tool') %] |
62 |
<p style="white-space:nowrap"><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=tool">Run tool</a></p> |
63 |
[% END %] |
64 |
[% END %] |
65 |
</td> |
66 |
<td> |
67 |
[% plugin.metadata.description %] |
72 |
[% plugin.metadata.description %] |
68 |
|
73 |
|
69 |
[% IF ( plugin.metadata.minimum_version && koha_version < plugin.metadata.minimum_version ) %] |
74 |
[% IF ( plugin.metadata.minimum_version && koha_version < plugin.metadata.minimum_version ) %] |
Lines 79-96
Link Here
|
79 |
<td>[% plugin.metadata.minimum_version %]</td> |
84 |
<td>[% plugin.metadata.minimum_version %]</td> |
80 |
<td>[% plugin.metadata.maximum_version %]</td> |
85 |
<td>[% plugin.metadata.maximum_version %]</td> |
81 |
<td>[% plugin.metadata.date_updated | $KohaDates %]</td> |
86 |
<td>[% plugin.metadata.date_updated | $KohaDates %]</td> |
82 |
[% IF ( CAN_user_plugins_configure ) %] |
87 |
[% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] |
83 |
<td> |
88 |
<td class="actions"> |
84 |
[% IF plugin.can('configure') %] |
89 |
<div class="dropdown"> |
85 |
<a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=configure">Configure</a> |
90 |
<a class="btn btn-mini dropdown-toggle" id="pluginactions[% plugin.class %]" role="button" data-toggle="dropdown" href="#"> |
86 |
[% END %] |
91 |
Actions <b class="caret"></b> |
87 |
</td> |
92 |
</a> |
88 |
[% END %] |
93 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="pluginactions[% plugin.class %]"> |
89 |
[% IF ( CAN_user_plugins_manage ) %] |
94 |
[% IF ( CAN_user_plugins_report ) %] |
90 |
<td> |
95 |
[% IF plugin.can('report') %] |
91 |
[% IF plugin.can('uninstall') %] |
96 |
<li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=report"><i class="fa fa-table"></i> Run report</a></li> |
92 |
<a href="/cgi-bin/koha/plugins/plugins-uninstall.pl?class=[% plugin.class %]" onclick="return confirm('Are you sure you want to uninstall the plugin [% plugin.metadata.name %]?')">Uninstall</a> |
97 |
[% END %] |
93 |
[% END %] |
98 |
[% END %] |
|
|
99 |
|
100 |
[% IF ( CAN_user_plugins_tool ) %] |
101 |
[% IF plugin.can('tool') %] |
102 |
<li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=tool"><i class="fa fa-wrench"></i> Run tool</a></li> |
103 |
[% END %] |
104 |
[% END %] |
105 |
|
106 |
[% IF ( CAN_user_plugins_configure ) %] |
107 |
[% IF plugin.can('configure') %] |
108 |
<li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=configure"><i class="fa fa-cog"></i> Configure</a></li> |
109 |
[% END %] |
110 |
[% END %] |
111 |
[% IF ( CAN_user_plugins_manage ) %] |
112 |
[% IF plugin.can('uninstall') %] |
113 |
<li><a class="uninstall_plugin" data-plugin-name="[% plugin.metadata.name %]" href="/cgi-bin/koha/plugins/plugins-uninstall.pl?class=[% plugin.class %]"><i class="fa fa-trash"></i> Uninstall</a></li> |
114 |
[% END %] |
115 |
[% END %] |
116 |
</ul> |
117 |
</div> |
94 |
</td> |
118 |
</td> |
95 |
[% END %] |
119 |
[% END %] |
96 |
[% END %] |
120 |
[% END %] |
Lines 100-114
Link Here
|
100 |
</div> |
124 |
</div> |
101 |
</div> |
125 |
</div> |
102 |
|
126 |
|
103 |
<div class="yui-b noprint"> |
127 |
<div class="yui-b noprint"> |
104 |
<div id="navmenu"> |
128 |
[% INCLUDE 'tools-menu.inc' %] |
105 |
<ul id="navmenulist"> |
|
|
106 |
[% IF ( CAN_user_plugins_manage ) %] |
107 |
<li><a href="plugins-upload.pl">Upload a plugin</a></li> |
108 |
[% END %] |
109 |
</ul> |
110 |
</div> |
111 |
</div> |
112 |
</div> |
129 |
</div> |
113 |
</div> |
130 |
</div> |
114 |
|
131 |
|