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

{% block title %}{{object.name}}{% endblock %}

{% block content %}
    <a href="{% url "games:game_list" %}">Back to list</a>

    <p><img src="{{object.screenshot.url}}" /></p>

    <dl>
        <dt>Released
        <dd>{{object.release_date|date:"Y/m/d"}}</dd>

        <dt>Players</dt>
        <dd>{{object.players}}</dd>

        <dt>Game System</dt>
        <dd>{{object.game_system.name}}</dd>

        <dt>Genre</dt>
        <dd>{% for genre in object.genre.all %}{{genre}}{% if not forloop.last %}, {% endif %}{% endfor %}</dd>

        <dt>Region</dt>
        <dd>{{object.region}}</dd>

        <dt>Publisher/Developer</dt>
        <dd>{{object.publisher}}/{{object.developer}}</dd>
    </dl>

    <p>{{object.description}}</p>
    {% if object.get_play_url  %}
    <p><a href="{{game.get_play_url}}" class="btn btn-primary">Play</a></p>
    {% endif %}
{% endblock %}
