{% set posts = craft.entries.section('newsDetail')
    .limit(4)
    .orderBy('postDate desc') %}
{% set news = craft.entries.section('news').one() %}
{% if posts|length %}
<div class="widget notices-widget">
    <div class="widget-inner">
        <h3 class="widget-title m-has-ico"><i class="widget-ico tp tp-building"></i>
            {{ 'ÚLTIMAS NOTÍCIAS'|t }}</h3>
        <div class="widget-content">
            <ul class="notice-list">
                {% for post in posts %}
                    <li class="notice m-active">
                        <div class="notice-inner">
                            <h4 class="notice-title">
                                <a href="{{ post.url }}">
                                    {{ post.title }}
                                </a>
                            </h4>
                            <div>
                                <span class="notice-date">{{ post.postDate | date("d mm, Y") }}</span>
                            </div>
                        </div>
                    </li>
                {% endfor %}
                <!-- NOTICE : begin -->

                <!-- NOTICE : end -->
            </ul>
            <p class="show-all-btn">
                <a href="{{ news.url }}">{{ 'MAIS NOTÍCIAS'|t }}</a>
            </p>
        </div>
    </div>
</div>
{% endif %}