{% load rowerfilters %}
<div class="grid_2 alpha">
  <p>
    {% if timeperiod and rower %}
    <a class="button gray small" href="/rowers/sessions/{{ timeperiod }}/rower/{{ rower.id }}">Plan Overview</a>
    {% elif timeperiod %}
    <a class="button gray small" href="/rowers/sessions/{{ timeperiod }}">Plan Overview</a>    
    {% else %}
    <a class="button gray small" href="/rowers/sessions">Plan Overview</a>
    {% endif %}
  </p>
</div>
<div class="grid_2">
  <p>
    {% if timeperiod and rower %}
    <a class="button gray small" href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ rower.id }}">Link to Workouts</a>
    {% elif timeperiod %}
    <a class="button gray small" href="/rowers/sessions/manage/{{ timeperiod }}">Link to Workouts</a>
    {% else %}
    <a class="button gray small" href="/rowers/sessions/manage">Link to Workouts</a>
    {% endif %}
  </p>
</div>
<div class="grid_2">
  <p>
    {% if timeperiod and rower %}
    <a class="button gray small" href="/rowers/sessions/create/{{ timeperiod }}/rower/{{ rower.id }}">Add Session</a>
    {% elif timeperiod %}
    <a class="button gray small" href="/rowers/sessions/create/{{ timeperiod }}">Add Session</a>
    {% else %}
    <a class="button gray small" href="/rowers/sessions/create">Add Session</a>
    {% endif %}
  </p>
</div>
<div class="grid_2 omega">
  {% if user.is_authenticated and user|is_manager %}
  {% if timeperiod %}
  <a class="button gray small" href="/rowers/sessions/teamcreate/{{ timeperiod }}">Add Team Session</a>
  {% else %}
  <a class="button gray small" href="/rowers/session/teamcreate">Add Team Session</a>
  {% endif %}
  {% else %}
  &nbsp;
  {% endif %}
</div>

