{% extends 'base.html.twig' %}

{% block title %}{{ current_cat.title }} - {{ cover('site','title') }}{% endblock %}
{% block keywords %}{{ current_cat.keywords }}{% endblock %}
{% block description %}{{ current_cat.description }}{% endblock %}
{% block container %}


    <div class="sui-navbar cv-subnav" style="border-bottom: 1px solid #e9e9e9">
        <div class="navbar-inner">
            <div class="sui-container">
                <a href="javascript:window.location.reload();" class="sui-brand">{{ current_cat.title }}</a>
                <ul class="sui-nav pull-right" style="margin-right: 30px;">
                    {% for son_cat in cover('category',{'parent_id':current_cat.parent_id,'except':current_cat.id}) %}
                        <li><a href="{{ son_cat.url }}">{{ son_cat.title }}</a></li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>



    {% if has_content %}
        {% for list in items %}
            <div class="cv-news-list">
                <div class="sui-container">
                    <div class="sui-row">
                        <div class="span3">
                            <div class="img">
                                <a href="{{ list.url }}"><img src="{{ list.cover }}"/></a>
                            </div>
                        </div>
                        <div class="span8">
                            <div class="d">
                                <p class="date">{{ list.create_time|date('Y-m-d H:i:s') }} <span>新闻稿</span></p>
                                <p class="title"><a href="{{ list.url }}">{{ list.title }}</a></p>
                                <p class="desc">{{ list.description }}</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {% endfor %}

        <div class="sui-pagination pagination-large cv-center">
            <ul>
                {% if has_last_page %}
                    <li class="prev"><a href="{{ last_page_url }}">«上一页</a></li>
                {% endif %}
                {% if has_next_page %}
                    <li class="next"><a href="{{ next_page_url }}">下一页»</a></li>
                {% endif %}
            </ul>
        </div>

    {% endif %}

{% endblock %}