forked from wallabag/wallabag
Renamed view_mode by list_mode and hide excerpt
This commit is contained in:
@ -13,11 +13,11 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set viewMode = app.user.config.viewMode %}
|
||||
{% set listMode = app.user.config.listMode %}
|
||||
<div class="results">
|
||||
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
|
||||
<div class="pagination">
|
||||
<a href="{{ path('switch_view_mode') }}"><i class="viewmode-btn material-icons md-36">{% if viewMode == 0 %}list{% else %}view_module{% endif %}</i></a>
|
||||
<a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-36">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a>
|
||||
<i class="btn-clickable download-btn material-icons md-36">file_download</i>
|
||||
<i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
|
||||
{% if entries.getNbPages > 1 %}
|
||||
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
|
||||
{% for entry in entries %}
|
||||
<div id="entry-{{ entry.id|e }}" class="{% if viewMode == 0 %}entry{% else %}listmode entry{% endif %}">
|
||||
<div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}">
|
||||
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
|
||||
|
||||
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
|
||||
@ -52,13 +52,13 @@
|
||||
<li><a title="{{ 'entry.list.delete'|trans }}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.delete'|trans }}</span></a></li>
|
||||
<li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li>
|
||||
</ul>
|
||||
{% if (entry.previewPicture is null or viewMode == 1) %}
|
||||
{% if (entry.previewPicture is null or listMode == 1) %}
|
||||
<ul class="card-entry-tags">
|
||||
{% for tag in entry.tags %}
|
||||
<li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p {% if viewMode == 1 %}class="hide"{% endif %}>{{ entry.content|striptags|slice(0, 300) }}…</p>
|
||||
<p {% if listMode == 1 %}class="hide"{% endif %}>{{ entry.content|striptags|slice(0, 300) }}…</p>
|
||||
{% else %}
|
||||
<ul class="card-entry-labels">
|
||||
{% for tag in entry.tags | slice(0, 3) %}
|
||||
|
||||
@ -3,12 +3,16 @@
|
||||
<div class="card-content">
|
||||
<span class="card-title dot-ellipsis dot-resize-update">
|
||||
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">
|
||||
{{ entry.title| striptags | truncate(120, true, '…') | raw }}
|
||||
{{ entry.title| striptags | truncate(120, true, '…') | raw }}
|
||||
</a>
|
||||
</span>
|
||||
<p class="hide-on-med-and-down">{{ entry.content|striptags|slice(0, 500)|raw }}…</p>
|
||||
<ul class="tools-list right">
|
||||
<li>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -12,11 +12,11 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set viewMode = app.user.config.viewMode %}
|
||||
{% set listMode = app.user.config.listMode %}
|
||||
<div class="results clearfix">
|
||||
<div class="nb-results left">
|
||||
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
|
||||
<a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if viewMode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
|
||||
<a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
|
||||
</div>
|
||||
{% if entries.getNbPages > 1 %}
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
|
||||
@ -26,8 +26,8 @@
|
||||
<br />
|
||||
<ul class="row data">
|
||||
{% for entry in entries %}
|
||||
<li id="entry-{{ entry.id|e }}" class="col {% if viewMode == 0 %}l3 m6{% endif %} s12">
|
||||
{% if viewMode == 1 %}
|
||||
<li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% endif %} s12">
|
||||
{% if listMode == 1 %}
|
||||
{% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %}
|
||||
{% elseif entry.previewPicture is null %}
|
||||
{% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %}
|
||||
|
||||
Reference in New Issue
Block a user