~xibo-maintainers/xibo/tempel

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{% extends "base-install.twig" %}
{% import "forms.twig" as forms %}

{% block jumboTron %}
    <div class="jumbotron">
        <div class="container">
            {% set themeName = theme.getThemeConfig("app_name") %}
            {% set header %}{% trans %}Welcome to the {{ themeName }} Installation{% endtrans %}{% endset %}
            <h1>{{ header }}</h1>
            <p>{% trans %}Thank you for choosing {{ themeName }}. This installation wizard will take you through
                setting up {{ themeName }} one step at a time. There are 6 steps in total, the first one is below.{% endtrans %}
            </p>
            <p><a class="btn btn-primary btn-lg" role="button" href="{{ theme.getThemeConfig("cms_install_url") }}" target="_blank">{% trans "Installation guide" %} &raquo;</a></p>
        </div>
    </div>
{% endblock %}

{% block stepContent %}
    <div class="row">
        <div class="col-md-12">
            {% set themeName = theme.getThemeConfig("app_name") %}
            <p>{% trans %}First we need to check if your server meets {{ themeName }}'s requirements.{% endtrans %}</p>
            <table id="sessions" class="table table-striped">
                <thead>
                <tr>
                    <th>{% trans "Item" %}</th>
                    <th>{% trans "Status" %}</th>
                    <th>{% trans "Advice" %}</th>
                </tr>
                </thead>
                <tbody>
                {% for check in config.CheckEnvironment() %}
                    <tr>
                        <td>{{ check.item }}</td>
                        <td>
                            {% if check.status == 0 %}
                                <span class="fa fa-times"></span>
                            {% elseif check.status == 1 %}
                                <span class="fa fa-check"></span>
                            {% else %}
                                <span class="fa fa-exclamation"></span>
                            {% endif %}
                        </td>
                        <td>{{ check.advice }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
            {% if config.EnvironmentFault() %}
                <form action="{{ urlFor("install", {step: 1}) }}" class="form-inline">
                    {% set title %}{% trans "Retest" %}{% endset %}
                    {{ forms.button(title, "submit") }}
                </form>
            {% elseif config.EnvironmentWarning() %}
                <form action="{{ urlFor("install", {step: 2}) }}" class="form-inline">
                    {% set title %}{% trans "Retest" %}{% endset %}
                    {% set link = urlFor("install", {step: 1}) %}
                    {{ forms.button(title, "link", link) }}

                    {% set title %}{% trans "Next" %}{% endset %}
                    {{ forms.button(title, "submit", link) }}
                </form>
            {% else %}
                <form action="{{ urlFor("install", {step: 2}) }}" class="form-inline">
                    {% set title %}{% trans "Next" %}{% endset %}
                    {{ forms.button(title, "submit") }}
                </form>
            {% endif %}
        </div>
    </div>
{% endblock %}