{% load url from future %}
{% load competition_tags %}

<h2 class="text-right">Competition</h2>
<ul class="nav nav-tabs nav-stacked">
  <li>
    <a href="{% url 'competition_detail' competition.slug %}">
      <i class="icon-comment"></i>
      Competition Details
    </a>
  </li>
  {% if competition.is_running and user_team %}
  <li>
    <a href="{% url 'game_list' competition.slug %}">
      <i class="icon-flag"></i>
      Games
    </a>
  </li>
  {% endif %}
</ul>

<h2 class="text-right">Teams</h2>
<ul class="nav nav-tabs nav-stacked">
  <li>
    <a href="{% url 'team_list' competition.slug %}">
      <i class="icon-th-list"></i>
      All Teams <span class="badge badge-info pull-right">{% team_count competition %}</span>
    </a>
  </li>
  <li>
    <a href="{% url 'freeagent_list' competition.slug %}">
      <i class="icon-bullhorn"></i>
      Free Agents <span class="badge badge-info pull-right">{% freeagent_count competition %}</span>
    </a>
  </li>
  {% if not user_team %}
    {% if competition.is_open %}
      <li>
        <a href="{% url 'team_create' competition.slug %}">
          <i class="icon-plus"></i>
          Create Team
        </a>
      </li>
    {% endif %}
  {% else %}
    <li>
      <a href="{{ user_team.get_absolute_url }}">
        <i class="icon-user"></i>
        My Team
      </a>
    </li>
    {% if competition.is_open %}
      <li>
        <a href="{% url 'team_leave' competition.slug %}">
          <i class="icon-remove"></i>
          Leave Team
        </a>
      </li>
    {% endif %}
  {% endif %}
</ul>

<h2 class="text-right">Registration</h2>
<ul class="nav nav-tabs nav-stacked" style="margin-top:20px;">
  <li>
    <a href="{% url 'unregister_for' competition.slug %}">
      <i class="icon-remove"></i>
      Unregister
    </a>
  </li>
</ul>

{% load url from future %}
{% load competition_tags %}

{% include "competition/competition/_sidebar.html" %}
{% include "competition/team/_sidebar.html" %}
{% include "competition/registration/_sidebar.html" %}

Include sidebar contents from subdirectories
Include sidebar contents from subdirectories
