{% extends '_layout.html'|pjax:request %}
{% load i18n thumbnail %}

{% block page_title %}{{ block.super }} | {{ item.name }}{% endblock %}

{% block main_content %}
<div class="container">
    {% if USER_IS_STAFF and USER_CONFIG.show_admin_links %}
    <div class="text-right">
        <a class="btn btn-info" href="{% url 'admin:manga_publisher_change' item.pk %}">{% trans "Edit in admin" %}</a>
    </div>
    <br />
    {% endif %}
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-primary">
                <ul class="list-group">
                    <li class="list-group-item">
                        <strong>{% trans "Series" %}</strong>: {{ item.series.count }}
                    </li>
                    <li class="list-group-item">
                        <strong>{% trans "Volumes" %}</strong>: {{ item.volumes.count }}
                    </li>
                    {% if item.url %}
                    <li class="list-group-item text-center">
                        <a href="{{ item.url }}" target="_blank"><i class="glyphicon glyphicon-home"></i> {% trans "Homepage" %}</a>
                    </li>
                    {% endif %}
                </ul>
            </div>
        </div>
        <div class="col-md-9">
           <div class="panel panel-primary">
                <div class="panel-heading">
                    <h1 class="panel-title panel-title-alt text-center">{{ item.name }}</h1>
                </div>
            </div>
            <div class="series-list">
                <div class="row">
                    {% for series in item.series %}
                    <div class="col-sm-4">
                        <div class="well text-right series-item" style="background: white url({% thumbnail series.last_volume_cover 120x160 %}) center left no-repeat;">
                            <div class="content">
                                <div class="name"><a href="{% url 'series.detail' series.pk series.slug %}">{{ series.name }}</a></div>
                            </div>
                        </div>
                    </div>
                    {% if forloop.counter|divisibleby:3 %}
                    </div>
                    <div class="row">
                    {% endif %}
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
