{% load staticfiles %}
{% load rowerfilters %}
<h1><a href="/rowers/analysis/">Analysis</a></h1>
<ul class="cd-accordion-menu animated">
	<li  class="has-children" id="videos">
		<input type="checkbox" name="group-videos" id="group-videos" checked>
		<label for="group-videos">
			<i class="fas fa-film fa-fw"></i>&nbsp;Video Analysis
		</label>
		<ul>
			<li id="videos-analyses">
				<a href="/rowers/videos/">
					<i class="fas fa-film fa-fw"></i>&nbsp;Video Analyses
				</a>
			</li>
			<li id="video-add">
				<a href="/rowers/add-video/">
					<i class="fas fa-video-plus fa-fw"></i>&nbsp;New Video Analysis
				</a>
			</li>
		</ul>
	</li>
  <li class="has-children" id="fitness">
    <input type="checkbox" name="group-fitness" id="group-fitness" checked>
    <label for="group-fitness">
      <i class="fas fa-watch-fitness fa-fw"></i>&nbsp;Fitness
    </label>
    <ul>
      <li id="compare">
	{% if team %}
	<a href="/rowers/user-analysis-select/compare/team/{{ team.id }}/">
          <i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare
        </a>
	{% else %}
	<a href="/rowers/user-analysis-select/compare/team/0/">
          <i class="fas fa-balance-scale fa-fw"></i>&nbsp;Compare
        </a>
	{% endif %}
      </li>
      <li id="fitness-powerprogress">
        <a href="/rowers/fitness-progress/">
          <i class="far fa-watch-fitness fa-fw"></i>&nbsp;Power Progress
        </a>
      </li>
      <li id="fitness-ranking">
        <a href="/rowers/ote-bests2/">
          <i class="fas fa-star fa-fw"></i>&nbsp;Ranking Pieces
        </a>
      </li>
      <li id="fitness-otecp">
        <a href="/rowers/ote-ranking/">
          <i class="fas fa-user-chart fa-fw"></i>&nbsp;CP Chart OTE
        </a>
      </li>
      <li id="fitness-otwcp">
        <a href="/rowers/otw-bests/">
          <i class="far fa-user-chart fa-fw"></i>&nbsp;CP Chart OTW
        </a>
      </li>
    </ul>
  </li>
  <li class="has-children" id="stats">
    <input type="checkbox" name="group-stats" id="group-stats" checked>
    <label for="group-stats">
      <i class="far fa-table fa-fw"></i>&nbsp;Statistics
    </label>
    <ul>
      <li id="stats-boxchart">
        <a href="/rowers/user-analysis-select/boxplot/">
          <i class="fas fa-box-open fa-fw"></i>&nbsp;Box Chart
        </a>
      </li>
      <li id="stats-trendflex">
        <a href="/rowers/user-analysis-select/trendflex/">
          <i class="far fa-chart-line fa-fw"></i>&nbsp;Trend Flex
        </a>
      </li>
      <li id="stats-cumstats">
        <a href="/rowers/user-analysis-select/stats/">
          <i class="fal fa-table fa-fw"></i>&nbsp;Statistics
        </a>
			</li>
			<li id="stats-histo">
				<a href="/rowers/user-analysis-select/histo/">
					<i class="fas fa-chart-bar fa-fw"></i>&nbsp;Histogram
				</a>
			</li>
			<li>
				<a href="/rowers/alerts/">
					<i class="fas fa-bell fa-fw"></i>&nbsp;Alerts
				</a>
			</li>
			<li>
				<a href="/rowers/history/">
					<i class="fas fa-history fa-fw"></i>&nbsp;History
				</a>
			</li>
		</ul>
	</li>
	<li>
		<a href="/rowers/user-analysis-select/flexall/">
			<i class="fas fa-chart-line fa-fw"></i>&nbsp;Cumulative Flex Chart
		</a>
	</li>
	<li>
		<a href="/rowers/laboratory/">
			<i class="fas fa-flask fa-fw"></i>&nbsp;Laboratory</a>
		</li>
	</ul><!-- cd-accordion-menu -->

	{% if user.is_authenticated and user|is_manager and rower %}
	<p>&nbsp;</p>

	{% if user|coach_rowers %}
	<ul class="cd-accordion-menu animated">
		<li class="has-children" id="athletes">
			<input type="checkbox" name="athlete-selector" id="athlete-selector">
			<label for="athlete-selector"><i class="fas fa-users fa-fw"></i>&nbsp;Athletes</label>
			<ul>
				{% for member in user|coach_rowers %}
				<a href={{ request.path|userurl:member.user }}>
					<i class="fas fa-user fa-fw"></i>
					{% if member.user == rower.user %}
					&bull;
					{% else %}
					&nbsp;
					{% endif %}
					{{ member.user.first_name }} {{ member.user.last_name }}
				</a>
				{% endfor %}
			</ul>
		</li>
	</ul>
	{% endif %}
	{% endif %}

	{% if user|user_teams  %}
	<p>&nbsp;</p>
	<ul class="cd-accordion-menu animated">
		<li class="has-children" id="teams">
			<input type="checkbox" name="team-selector" id="team-selector">
			<label for="team-selector"><i class="fas fa-bullhorn fa-fw"></i>&nbsp;Groups</label>
			<ul>
				{% for tteam in teams %}
				<li>
					<a href={{ request.path|teamurl:tteam }}>
						<i class="fas fa-users fa-fw"></i>
						{% if tteam == team %}
						&bull;
						{% else %}
						&nbsp;
						{% endif %}
						{{ tteam.name }}
					</a>
				</li>
				{% endfor %}
			</ul>
		</li>
	</ul>
	{% endif %}

	{% include 'menuscript.html' %}
