{% extends "base.html" %}
{% block pagename %}taskpage{% endblock %}
{% block title %}{{ task }}{% endblock %}
{% load split %}


{% block navigation %}
	<table id="nav_table" class="nav_table">
        <tbody>
            <tr>
                {% with task|split:"-" as project %}
                    <td><a class="navigation_link" href="/{{ project.0 }}">{{ project.0 }}</a></td>
                {% endwith %}
                <td class="navigation-delimiter text-muted">→</td>
                <td>
                    <!-- свернутая навигация -->
                    <a class="navigation_link" href="https://st.yandex-team.ru/{{ task }}"><img style="margin-top: -2px;" height="16px" src="/st_favicon.ico"></a>
                    {% if pagename == 'mobilepage' %}
                        <a class="navigation_link" href="/{{ task }}#mobile">{{ task }}</a>
                    {% else %}
                        <a class="navigation_link" href="/{{ task }}">{{ task }}</a>
                    {% endif %}
                    <!-- конец блока -->
                </td>
            </tr>
        </tbody>
    </table>
{% endblock %}


{% block sort %}
{% endblock %}


{% block body %}
    <span id="globalTask" data-task="{{ task }}"></span>
<div class="container-fluid">
	<ul class="nav nav-tabs" style="border-bottom: none;" role="tablist">
		<li role="presentation" class="active"><a href="#fire_tab" aria-controls="fire_tab" role="tab" data-toggle="tab">Стрельбы</a></li>
		{% if mobile_is_present %}
			<li role="presentation"><a href="#mobile_tab" aria-controls="mobile_tab" role="tab" data-toggle="tab" id="mobile_tab_tab">Мобильные Стрельбы</a></li>
		{% endif %}
		<li role="presentation"><a href="#info_tab" aria-controls="info_tab" role="tab" data-toggle="tab" id="info_tab_tab">Информация</a></li>
	</ul>
	<div class="tab-content">
		<div role="tabpanel" class="tab-pane container-fluid panel panel-default active" style="border-top-left-radius:0; padding-top:15px; padding-bottom:15px;" id="fire_tab">
           {% if fire %}
                 {% include "jobs_block.html" %}
           {% else %}
                 <div style="padding:35px 18px 35px 0;">
	                 <div style="text-align:center; font-size:16pt;">
	                 	В этой задаче ещё никто не стрелял...
	                 </div>
	                 <div style="text-align:center; font-size:20pt; padding-top:7px; color: #7BA32D;">
	                 	Ты можешь <a href="/firestarter/?task={{ task }}">быть первым</a>!
	                 </div>
                 </div>
           {% endif %}
        </div><!-- /fire_tab -->
        {% if mobile_is_present %}
	        <div role="tabpanel" class="tab-pane container-fluid panel panel-default" style="border-top-left-radius:0; padding:10px 0;" id="mobile_tab">
			</div> <!-- /mobile_tab -->
		{% endif %}
		<div role="tabpanel" class="tab-pane container-fluid panel panel-default" style="border-top-left-radius:0; padding:10px 0;" id="info_tab">
		</div> <!-- /info_tab -->
	</div> 
</div>

<link href="/media/css/taskpage.css?version=43.4" type="text/css" rel="stylesheet" />
<script nonce='{{ common.CSP_SCRIPT_NONCE }}' type='text/javascript' src='/media/js/taskpage.js?version=43.4'></script>
{% endblock %}
