{% extends '@OxHoardBundle//layout.html.twig' %}
{% block title %}News{% endblock %}
{% block body %}
<div class="marginTop clearfix"></div>
<div id="content" class="container">
<div class="row marginTop">
<div class="hoardlistview-6col col-md-12">
{% if is_authorised_to_edit %}
<div class="edit-btn"><a href="{{ path('content_new') }}"><h2>Add new content<span class="fa fa-plus"></span></h2></a></div>
{% endif %}
<h1>News</h1>
<div class="news-item-list">
{% for entity in entities %}
<div class="news-item col-xs-10">
<h2>
<a href="{{ path('content_show_path', { 'path': entity.path }) }}">{{ entity.title }}</a>
</h2>
<div class="teasertext">{{ entity.teaser | markdown}}<a href=""><span> <a href="{{ path('content_show_path', { 'path': entity.path }) }}">more…</a></span></a></div>
</div>
{% if is_authorised_to_edit %}
<a class="btn btn-default list-edit-button col-xs-2" href="{{ path('content_edit', { 'id':entity.id }) }}">Edit</a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}