<script>
    var reload_licenses_url = '{{ reload_licenses_url }}';
    var support_page_url = '{{ support_page_url }}';
</script>
<div class="grilabs-list-table">
    <table class="" width="100%">
        <tr>
            <th width="20%" align="left" class="top">{{ support_active_module }}</th>
            <td width="80%">{{ version_check.current_name }}</td>
        </tr>
        <tr>
            <th align="left" class="top">{{ support_active_package }}</th>
            <td>
                {% if active_package == 2 %}
                    {{ support_active_package_sme }}
                {% elseif active_package == 3 %}
                    {{ support_active_package_enterprise }}
                {% else %}
                    {{ support_active_package_standard }}
                {% endif %}
                <button class="btn btn-xs btn-info btn-reload-package"><i class="fa fa-refresh"></i> {{ support_active_package_reload }}</button>
                <img src="view/image/payment/spinner.gif" width="20" id="check_spinner2" style="display: none;">
            </td>
        </tr>
        <tr>
            <th align="left" class="top">{{ support_active_version }}</th>
            <td>v{{ version_check.current_version }}</td>
        </tr>
        {% if version_check.available == 1 %}
            <tr>
                <th align="left" class="top">{{ support_published_last }}</th>
                <td>{{ version_check.available_name }}</td>
            </tr>
            <tr>
                <th align="left" class="top">{{ support_published_last_version }}</th>
                <td>v{{ version_check.available_version }}</td>
            </tr>

            <tr>
                <th align="left" class="top">{{ support_changelog }}</th>
                <td>{{ version_check.changelog }}</td>
            </tr>

            <tr>
                <th align="left" class="top">{{ support_download_module }}</th>
                <td>
                    <a target="_blank" href="{{ version_check.download_url }}">
                        {{ support_download_button }}
                    </a></td>
            </tr>
        {% else %}
            <tr>
                <th align="left" class="top">{{ support_version_check }}</th>
                <td>
                    <p>{{ support_version_up_to_date }} <i class="fa fa-check-circle"></i></p>
                    {% if update_active == false  %}
                        <div class="alert alert-danger">
                            <p>{{ need_renew_update }}</p>
                        </div>
                    {% endif %}
                </td>
            </tr>
        {% endif %}
        <tr>
            <th align="left" class="top">{{ support_last_check_time }}</th>
            <td>{{ version_check.last_control_date }}&nbsp;
                <button
                        class="btn btn-info"
                        id="check_version">{{ support_check_now }}</button>
                <img src="view/image/payment/spinner.gif" width="20" id="check_spinner" style="display: none;">
            </td>
        </tr>

        <tr>
            <th align="left" class="top">{{ technical_support }}</th>
            <td>
                <a target="_blank" href="https://www.gri.net">
                    {{ get_support }}
                </a></td>
        </tr>
    </table>
</div>
<div class="grilabs-list-table" id="updated-table-div" style="display: none;">
    <table id="updated-table" width="100%">
        <tbody>
        <tr>
            <th align="left">{{ support_published_last_version }}</th>
            <td class="version"></td>
        </tr>
        <tr>
            <th align="left">{{ support_changelog }}</th>
            <td class="changelog"></td>
        </tr>
        <tr>
            <th align="left">{{ support_download_button }}</th>
            <td class="download">
                <a target="_blank" class="btn">{{ support_download_module_files }}</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>