{% extends "traktplus/trakt-base.html" %}
{% block trakt_title %}
  <a class="trakt_user link addloading" data-username="{{ user }}" title="Back to profile">{{ user }}</a>'s {{ title }}
{% endblock %}
{% block trakt_content %}
{% if rated %}

  <div class="trakt_choices">
    <b>{{ type }}</b>
    {% if type == 'Movies' %}
      <a class="button addloading" data-xhr_url="rated/{{ user }}/shows">Shows</a>
    {% else %}
      <a class="button addloading" data-xhr_url="rated/{{ user }}/movies">Movies</a>
    {% endif %}
  </div>

  <div class="rated">
  <ul>
    <span class="user_rated">
      <b>
        <a class="trakt_user link addloading" data-username="{{ user }}" title="Back to profile">{{ user }}</a>
        loves {{ loved }} {{ type }}
      </b>
    </span>
    {% for item in rated.loved %}
      {% if loved %}
        <li class="goto_{{ type[:-1]|lower }} addloading" data-id="{{ item.imdb_id }}">
          {{ item.title }} {% if type == 'Movies' %}({{ item.year }}){% endif %}
        </li>
      {% endif %}
    {% endfor %}

    <span class="user_rated">
      <b>
        <a class="trakt_user link addloading" data-username="{{ user }}" title="Back to profile">{{ user }}</a>
        hates {{ hated }} {{ type }}
      </b>
    </span>
    {% for item in rated.hated %}
      {% if hated %}
        <li class="goto_{{ type[:-1]|lower }} addloading" data-id="{{ item.imdb_id }}">
          {{ item.title }} {% if type == 'Movies' %}({{ item.year }}){% endif %}
        </li>
      {% endif %}
    {% endfor %}
  </ul>
  </div>

{% endif %}
{% endblock %}
