forked from tilemill-project/tilemill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin._
30 lines (28 loc) · 1.22 KB
/
Plugin._
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%
var installed = !!window.abilities.plugins[id];
var compatible = semver.satisfies(window.abilities.tilemill.version, get('engines').tilemill);
var upgradable = installed && get('latest') && semver.gt(get('latest'), get('version'));
%>
<li><div class='plugin <%= installed ? 'raised' : 'sunken' %>'>
<%= escape('name') %>
<small class='description'>
<%= escape('description') || 'No description.' %><br/>
<% if (get('core')) %>TileMill <%=window.abilities.tilemill.version%><%;%>
<% if (!get('core')) %>Version <%= escape('version') || 'unknown' %><%;%>
<% if (!compatible) %>
<span class='error'>Incompatible with TileMill <%=window.abilities.tilemill.version%></span>
<%;%>
<% if (get('broken')) %>
<span class='error'>Broken, uninstalling is highly recommended</span>
<%;%>
</small>
<div class='actions'>
<% if (get('core')) { %>
<span class='badge'>Core</span>
<% } else { %>
<% if (upgradable) %><a class='button upgrade' href='#<%=id%>'>Upgrade</a><% ; %>
<% if (installed) %><a class='button uninstall' href='#<%=id%>'>Uninstall</a><% ; %>
<% if (!installed && compatible) %><a class='button install' href='#<%=id%>'>Install</a><% ; %>
<% } %>
</div>
</div></li>