|
11 | 11 | {% block content %}
|
12 | 12 | <div class="mt-3">
|
13 | 13 | <!-- Section - Missions -->
|
| 14 | + {% if upcomingMissions is null or archivedMissions is null %} |
14 | 15 | <section id="missions" class="text-center">
|
15 |
| - {% if upcomingMissions is null or archivedMissions is null %} |
16 |
| - <h2>{{ 'Something went wrong while fetching missions list...'|trans }}</h2> |
17 |
| - <h3>{{ 'Try again later'|trans }}</h3> |
18 |
| - {% else %} |
19 |
| - <!-- Heading --> |
20 |
| - <h2 class="mb-5 font-weight-bold">{{ 'Upcoming missions'|trans }}</h2> |
| 16 | + <h2>{{ 'Something went wrong while fetching missions list...'|trans }}</h2> |
| 17 | + <h3>{{ 'Try again later'|trans }}</h3> |
| 18 | + </section> |
| 19 | + {% else %} |
| 20 | + <section id="missions" class="text-center"> |
| 21 | + <!-- Heading --> |
| 22 | + <h2 class="mb-5 font-weight-bold">{{ 'Upcoming missions'|trans }}</h2> |
21 | 23 |
|
22 |
| - {% for missionsRow in upcomingMissions|reverse|batch(3) %} |
23 |
| - <!-- Grid row --> |
24 |
| - <div class="row"> |
25 |
| - {% for mission in missionsRow %} |
26 |
| - {# @var mission \App\Service\Mission\Dto\MissionDto #} |
27 |
| - <!-- Grid column --> |
28 |
| - <div class="col-lg-4 col-md-6 mb-4 mission"> |
29 |
| - {% include '_partial/_mission_widget.html.twig' with {'mission': mission} %} |
30 |
| - </div> |
31 |
| - <!--/ Grid column --> |
32 |
| - {% endfor %} |
33 |
| - </div> |
34 |
| - <!--/ Grid row --> |
35 |
| - {% endfor %} |
36 |
| - </section> |
| 24 | + {% for missionsRow in upcomingMissions|reverse|batch(3) %} |
| 25 | + <!-- Grid row --> |
| 26 | + <div class="row"> |
| 27 | + {% for mission in missionsRow %} |
| 28 | + {# @var mission \App\Service\Mission\Dto\MissionDto #} |
| 29 | + <!-- Grid column --> |
| 30 | + <div class="col-lg-4 col-md-6 mb-4 mission"> |
| 31 | + {% include '_partial/_mission_widget.html.twig' with {'mission': mission} %} |
| 32 | + </div> |
| 33 | + <!--/ Grid column --> |
| 34 | + {% endfor %} |
| 35 | + </div> |
| 36 | + <!--/ Grid row --> |
| 37 | + {% endfor %} |
| 38 | + </section> |
| 39 | + <!--/ Section - Missions --> |
37 | 40 |
|
38 |
| - <!-- Section - Missions --> |
39 |
| - <section id="missions-archive" class="text-center"> |
40 |
| - <!-- Heading --> |
41 |
| - <h2 class="mb-5 font-weight-bold">{{ 'Completed missions'|trans }}</h2> |
| 41 | + <!-- Section - Missions Archive --> |
| 42 | + <section id="missions-archive" class="text-center"> |
| 43 | + <!-- Heading --> |
| 44 | + <h2 class="mb-5 font-weight-bold">{{ 'Completed missions'|trans }}</h2> |
42 | 45 |
|
43 |
| - {% for missionsRow in archivedMissions|batch(3) %} |
44 |
| - <!-- Grid row --> |
45 |
| - <div class="row"> |
46 |
| - {% for mission in missionsRow %} |
47 |
| - {# @var mission \App\Service\Mission\Dto\MissionDto #} |
48 |
| - <!-- Grid column --> |
49 |
| - <div class="col-lg-4 col-md-6 mb-4 mission"> |
50 |
| - {% include '_partial/_mission_widget.html.twig' with {'mission': mission, 'lazy': true} %} |
51 |
| - </div> |
52 |
| - <!--/ Grid column --> |
53 |
| - {% endfor %} |
54 |
| - </div> |
55 |
| - <!--/ Grid row --> |
56 |
| - {% endfor %} |
57 |
| - {% endif %} |
| 46 | + {% for missionsRow in archivedMissions|batch(3) %} |
| 47 | + <!-- Grid row --> |
| 48 | + <div class="row"> |
| 49 | + {% for mission in missionsRow %} |
| 50 | + {# @var mission \App\Service\Mission\Dto\MissionDto #} |
| 51 | + <!-- Grid column --> |
| 52 | + <div class="col-lg-4 col-md-6 mb-4 mission"> |
| 53 | + {% include '_partial/_mission_widget.html.twig' with {'mission': mission, 'lazy': true} %} |
| 54 | + </div> |
| 55 | + <!--/ Grid column --> |
| 56 | + {% endfor %} |
| 57 | + </div> |
| 58 | + <!--/ Grid row --> |
| 59 | + {% endfor %} |
58 | 60 | </section>
|
59 |
| - <!--/ Section - Missions --> |
| 61 | + <!--/ Section - Missions Archive --> |
| 62 | + {% endif %} |
60 | 63 | </div>
|
61 | 64 | {% endblock %}
|
0 commit comments