PHP Classes
elePHPant
Icontem

File: src/Cabin/Bridge/View/cargo/skyport_package_details.twig

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  CMS Airship  >  src/Cabin/Bridge/View/cargo/skyport_package_details.twig  >  Download  
File: src/Cabin/Bridge/View/cargo/skyport_package_details.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CMS Airship
Content management system with security features
Author: By
Last change:
Date: 0 years ago
Size: 3,188 bytes
 

Contents

Class file image Download
<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>