Source

dvd-collection / collection / templates / collection / movie_detail.html

Full commit
Kevin Veroneau 80dc35b 
















































{% extends "base.html" %}
{% load bootstrap %}

{% block jquery %}  $('#nav_browse').addClass('active');{% endblock %}

{% block title %}{{movie.title}}{% endblock %}

{% block description %}{{movie.plot}}{% endblock %}
{% block author %}{{movie.director|default:"No data available."}}{% endblock %}

{% block base_content %}
<div class="row-fluid">
  <div class="span4 well">
    {% if movie.poster_img %}
    <img src="{{movie.poster_img.url}}"/><br/>
    {% endif %}{% if movie.imdb %}
    <a class="btn btn-warning" href="http://www.imdb.com/title/{{movie.imdb}}/">View on IMDb</a>
    {% else %}
    <strong>Movie could not be loaded from IMDb.</strong>
    {% endif %}{% if user.is_authenticated %}{% if user.is_staff %}
    <a class="btn" href="{% url 'movie_edit' movie.slug %}"><i class="icon-wrench"></i>Edit Movie Details</a>
    {% if movie.imdb %}<a class="btn" href="{% url 'movie_imdb' movie.slug %}"><i class="icon-download"></i>Update from IMDb</a>{% endif %}
    <a class="btn" href="{% url 'movie_watched' movie.slug %}"><i class="icon-eye-open"></i>Just Watched</a>{% endif %}
    <a class="btn" href="{% url 'movie_watchlist' movie.slug %}"><i class="icon-bookmark"></i>Add to my watchlist</a>
    {% else %}<a class="btn" href="{% url 'auth_login' %}?next={{movie.get_absolute_url}}">Login to Edit</a>{% endif %}
  </div>
  <div class="span5">
    <h2>{{movie.title}}</h2>
    <p class="muted">Released on {{movie.released|default:"No data available."}}</p>
    <p>{{movie.plot}}</p>
    <p><strong>Genre: </strong> {{movie.genre|link}}</p>
    <p><strong>Nick's Rating: </strong> {{movie.rating|ratingicon}}</p>
    {% if movie.imdb_rating %}
    <p><strong>IMDb's Rating: </strong> {{movie.imdb_rating|ratingicon}}</p>
    {% endif %}
    <p><strong>Directed by</strong> {%if movie.director %}{{movie.director|link}}{% else %}No data available.{% endif %}</p>
    {% if movie.length %}
    <p><strong>Length</strong> {{movie.length|timeuntil:length_stamp}} long.</p>
    {% endif %}
    <p>Nick has watched this movie a total of {{movie.watched}} time{{movie.watched|pluralize}}.{% if movie.last_watched %}The last time Nick watched this film was on {{movie.last_watched}}.{% endif %}</p>
    <p>Nick currently has this film on <a href="{% url 'browse_format' movie.format %}">{{movie.get_format_display}}</a>.</p>
    {% with watchlist=movie.watchlist_set.all %}
    {% if watchlist.count > 0 %}<p>{% for friend in watchlist %}{{friend.owner}}{% if not forloop.last %}, {% endif %}{% endfor %} has this movie in their watchlist.</p>{% endif %}
    {% endwith %}
    {% if movie.youtube %}
    <iframe width="420" height="315" src="http://www.youtube.com/embed/{{movie.youtube}}" frameborder="0" allowfullscreen></iframe>
    {% endif %}
  </div>
</div>
{% endblock %}