<h3>{{ package.supplier }}/{{ package.name }}</h3>
<div class="package-description">
{{ package["skyport_metadata"].description|e('html_attr') }}
</div>
<div class="package-details">
{{ package["skyport_metadata"].details|default('')|purify }}
</div>
<ul class="package-buttons">
<li>
<a
id="skyport-refresh-package"
data-type="{{ package.packagetype|e('html_attr') }}"
data-package="{{ package.name|e('html_attr') }}"
data-supplier="{{ package.supplier|e('html_attr') }}"
class="pure-button pure-button-primary"
>
<i class="fa fa-refresh"></i> {{ __("Refresh") }}
</a>
</li>
<li>
<a
class="pure-button pure-button-secondary"
href="{{ skyport_url }}"
id="skyport-view-online"
rel="noopener noreferrer"
target="_blank"
>
<i class="fa fa-globe"></i> {{ __("View Online") }}
</a>
</li>
{% if package.installed %} {# If it's already installed... #}
<li>
<button
class="pure-button pure-button-primary pure-button-danger"
data-type="{{ package.packagetype|e('html_attr') }}"
data-package="{{ package.name|e('html_attr') }}"
data-supplier="{{ package.supplier|e('html_attr') }}"
id="skyport-uninstall-button"
>
<i class="fa fa-ban"></i> {{ __("Uninstall") }}
</button>
</li>
<li>
{% if package.upgrades %} {# Show available upgrades#}
<select
id="skyport-upgrade-version"
title="{{ __("Select version for upgrade")|e('html_attr') }}"
>
<option value="">{{ __("Current: ") ~ package['current_version'] }}</option>
{% for ver in upgrades %}
<option value="{{ ver.version|e('html_attr') }}">
{{ ver.version }}
</option>
{% endfor %}
</select>
<button
class="pure-button pure-button-primary"
data-type="{{ package.packagetype|e('html_attr') }}"
data-package="{{ package.name|e('html_attr') }}"
data-supplier="{{ package.supplier|e('html_attr') }}"
id="skyport-upgrade-button"
>
<i class="fa fa-arrow-up"></i> {{ __("Upgrade") }}
</button>
{% else %} {# Just show the "Up to date" message. #}
<em>{{ __("Up to date (%s)", "default", package['current_version']|e('html')) }}</em>
{% endif %}
</li>
{% else %}{# Install button: #}
<li>
<a
class="pure-button pure-button-primary"
data-type="{{ package.packagetype|e('html_attr') }}"
data-package="{{ package.name|e('html_attr') }}"
data-supplier="{{ package.supplier|e('html_attr') }}"
id="skyport-install"
>
<i class="fa fa-plus"></i> {{ __("Install") }}
</a>
</li>
{% endif %}
</ul>
|