1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00
wallabag/app/views/_entry.twig

29 lines
2.0 KiB
Twig
Raw Normal View History

<article id="item-{{entry.id}}" data-hide="true">
<h2><a href="{{ path('view_entry', {'id': entry.id}) }}">{{ entry.title }}</a></h2>
{% set picture = entry.content|getPicture %}
{% if picture != "" %}
<figure class="right">
<img src="{{ picture }}" class="picturepreview thumb round border right" />
</figure>
{% endif %}
2014-01-15 07:23:44 -05:00
<p class="preview">{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
<ul class="tools">
<li>
{% if entry.status == "read" %}
<a id="status-{{entry.id}}" href="{{ path('mark_entry_unread', {'id': entry.id}) }}" data-action="mark_entry_unread" data-entry-id="{{entry.id}}" data-reverse-label="{{ 'mark as read'|trans }}">{{ 'mark as unread'|trans }}</a>
{% else %}
<a id="status-{{entry.id}}" href="{{ path('mark_entry_read', {'id': entry.id}) }}" data-action="mark_entry_read" data-entry-id="{{entry.id}}" data-reverse-label="{{ 'mark as unread'|trans }}">{{ 'mark as read'|trans }}</a>
{% endif %}
</li>
<li>
{% if entry.bookmark == 1 %}
<a id="bookmark-{{entry.id}}" href="{{ path('unstar_entry', {'id': entry.id}) }}" data-action="unstar_entry" data-entry-id="{{entry.id}}" data-reverse-label="{{ 'star'|trans }}">{{ 'unstar'|trans }}</a>
{% else %}
<a id="bookmark-{{entry.id}}" href="{{ path('star_entry', {'id': entry.id}) }}" data-action="star_entry" data-entry-id="{{entry.id}}" data-reverse-label="{{ 'unstar'|trans }}">{{ 'star'|trans }}</a>
{% endif %}
</li>
2014-01-14 09:22:38 -05:00
<li><a href="{{ path('remove_entry', {'id': entry.id}) }}">{{ 'delete'|trans }}</a></li>
2014-01-15 07:23:44 -05:00
<li><a href="{{ entry.url }}" class="external" title="{{ 'view original'|trans }}">{{ entry.url | getDomain }}</a></li>
2014-01-15 07:54:49 -05:00
<li>{{ entry.content | getReadingTime }} {{'min read'|trans}} </li>
</ul>
2014-01-15 07:23:44 -05:00
</article>