{% extends "base.html.twig" %}
{% block title %}Battles{% endblock %}
{% block bodyClass %}battlesBody{% endblock %}
{% import "components/macros.html.twig" as macros %}
{% block body %}
<section id="battles" class="battles">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="vertical-tab" role="tabpanel">
<!-- Nav tabs -->
<ul id="battlesTab" class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#allBattlesTab" aria-controls="home" role="tab" data-toggle="tab">All battles</a></li>
<li role="presentation"><a href="#mostViewedBattlesTab" aria-controls="profile" role="tab" data-toggle="tab">Most viewed battles</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content tabs">
<div role="tabpanel" class="tab-pane fade in active" id="allBattlesTab">
<h3>All battles</h3>
<div class="row">
{% if allBattles|length > 0 %}
<div class="battles-list">
{% for battle in allBattles %}
{{ macros.renderCard('battlecard',null,battle) }}
{% endfor %}
</div>
{% else %}
<div class="no-content-message">
<p class="text-center">No battles at this moment :(</p>
</div>
{% endif %}
<nav aria-label="Battles navigation" style="margin: 0 auto">
<ul id="pagin" class="pagination">
</ul>
</nav>
</div>
</div>
<div role="tabpanel" class="tab-pane fade" id="mostViewedBattlesTab">
<h3>Most viewed battles</h3>
<div class="no-content-message">
<p class="text-center">No battles at this moment :(</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock %}