forked from wallabag/wallabag
Merge branch '2.6'
This commit is contained in:
@ -53,65 +53,80 @@
|
||||
{% if current_route == 'homepage' %}
|
||||
{% set current_route = 'unread' %}
|
||||
{% endif %}
|
||||
<form name="form_mass_action" action="{{ path('mass_action', {redirect: current_path}) }}" method="post" data-controller="batch-edit entries-navigation">
|
||||
<div class="results" data-entries-navigation-target="paginationWrapper">
|
||||
<div class="nb-results">
|
||||
{{ 'entry.list.number_on_the_page'|trans({'%count%': entries.count}) }}
|
||||
{% if entries.count > 0 %}
|
||||
<a class="results-item" href="{{ path('switch_view_mode', {redirect: current_path}) }}"><i class="material-icons">{% if list_mode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
|
||||
<div data-controller="batch-edit entries-navigation">
|
||||
<form id="form_mass_action" name="form_mass_action" action="{{ path('mass_action', {redirect: current_path}) }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('mass-action') }}"/>
|
||||
</form>
|
||||
<div class="results" data-entries-navigation-target="paginationWrapper">
|
||||
<div class="nb-results">
|
||||
{{ 'entry.list.number_on_the_page'|trans({'%count%': entries.count}) }}
|
||||
{% if entries.count > 0 %}
|
||||
<form action="{{ path('switch_view_mode', {redirect: current_path}) }}" method="post" class="inline-block">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('switch-view-mode') }}"/>
|
||||
|
||||
<button type="submit" class="btn-link results-item">
|
||||
<i class="material-icons">{% if list_mode == 0 %}view_list{% else %}view_module{% endif %}</i>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if entries.count > 0 and is_granted('EDIT_ENTRIES') %}
|
||||
<label for="mass-action-inputs-displayed" class="mass-action-toggle results-item" data-controller="materialize--tooltip" data-position="right" data-delay="50" data-tooltip="{{ 'entry.list.toggle_mass_action'|trans }}"><i class="material-icons">library_add_check</i></label>
|
||||
{% endif %}
|
||||
{% if app.user.config.feedToken %}
|
||||
{% include "Entry/_feed_link.html.twig" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if current_route == 'search' and is_granted('CREATE_TAGS') %}
|
||||
<form action="{{ path('tag_this_search', {'filter': searchTerm, 'currentRoute': app.request.get('currentRoute'), redirect: current_path}) }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('tag-this-search') }}"/>
|
||||
|
||||
<button type="submit" class="btn-link" title="{{ 'entry.list.assign_search_tag'|trans }}">{{ 'entry.list.assign_search_tag'|trans }}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if entries.count > 0 and is_granted('EDIT_ENTRIES') %}
|
||||
<label for="mass-action-inputs-displayed" class="mass-action-toggle results-item" data-controller="materialize--tooltip" data-position="right" data-delay="50" data-tooltip="{{ 'entry.list.toggle_mass_action'|trans }}"><i class="material-icons">library_add_check</i></label>
|
||||
{% endif %}
|
||||
{% if app.user.config.feedToken %}
|
||||
{% include "Entry/_feed_link.html.twig" %}
|
||||
{% if entries.getNbPages > 1 %}
|
||||
{{ pagerfanta(entries, 'default_wallabag') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if current_route == 'search' and is_granted('CREATE_TAGS') %}<div><a href="{{ path('tag_this_search', {'filter': searchTerm, 'currentRoute': app.request.get('currentRoute'), redirect: current_path}) }}" title="{{ 'entry.list.assign_search_tag'|trans }}">{{ 'entry.list.assign_search_tag'|trans }}</a></div>{% endif %}
|
||||
|
||||
{% if entries.count > 0 %}
|
||||
<input id="mass-action-inputs-displayed" class="toggle-checkbox" type="checkbox" />
|
||||
<div class="mass-action">
|
||||
<div class="mass-action-group">
|
||||
<input type="checkbox" form="form_mass_action" class="entry-checkbox-input" data-action="batch-edit#toggleSelection" />
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" form="form_mass_action" name="toggle-read" title="{{ 'entry.list.toogle_as_read'|trans }}"><i class="material-icons">done</i></button>
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" form="form_mass_action" name="toggle-star" title="{{ 'entry.list.toogle_as_star'|trans }}" ><i class="material-icons">star</i></button>
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" form="form_mass_action" name="delete" onclick="return confirm('{{ 'entry.confirm.delete_entries'|trans|escape('js') }}')" title="{{ 'entry.list.delete'|trans }}"><i class="material-icons">delete</i></button>
|
||||
</div>
|
||||
|
||||
<div class="mass-action-tags">
|
||||
<button class="btn cyan darken-1 mass-action-button mass-action-button--tags" type="submit" form="form_mass_action" name="tag" title="{{ 'entry.list.add_tags'|trans }}" data-batch-edit-target="tagAction"><i class="material-icons">label</i></button>
|
||||
<input type="text" form="form_mass_action" class="mass-action-tags-input" name="tags" placeholder="{{ 'entry.list.mass_action_tags_input_placeholder'|trans }}" data-action="keydown.enter->batch-edit#tagSelection:prevent:stop" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ol class="entries {% if list_mode == 1 %}collection{% else %}row entries-row data{% endif %}">
|
||||
|
||||
{% for entry in entries %}
|
||||
<li id="entry-{{ entry.id|e }}" class="{% if list_mode != 0 %}col collection-item{% endif %} s12" data-entry-id="{{ entry.id|e }}" data-test="entry" data-entries-navigation-target="card">
|
||||
{% if list_mode == 1 %}
|
||||
{% include "Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
|
||||
{% include "Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% else %}
|
||||
{% include "Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endif %}
|
||||
|
||||
{% if entries.getNbPages > 1 %}
|
||||
{{ pagerfanta(entries, 'default_wallabag') }}
|
||||
<div class="results">
|
||||
{{ pagerfanta(entries, 'default_wallabag') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if entries.count > 0 %}
|
||||
<input id="mass-action-inputs-displayed" class="toggle-checkbox" type="checkbox" />
|
||||
<div class="mass-action">
|
||||
<div class="mass-action-group">
|
||||
<input type="checkbox" class="entry-checkbox-input" data-action="batch-edit#toggleSelection" />
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" name="toggle-read" title="{{ 'entry.list.toogle_as_read'|trans }}"><i class="material-icons">done</i></button>
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" name="toggle-star" title="{{ 'entry.list.toogle_as_star'|trans }}" ><i class="material-icons">star</i></button>
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" name="delete" onclick="return confirm('{{ 'entry.confirm.delete_entries'|trans|escape('js') }}')" title="{{ 'entry.list.delete'|trans }}"><i class="material-icons">delete</i></button>
|
||||
</div>
|
||||
|
||||
<div class="mass-action-tags">
|
||||
<button class="btn cyan darken-1 mass-action-button mass-action-button--tags" type="submit" name="tag" title="{{ 'entry.list.add_tags'|trans }}" data-batch-edit-target="tagAction"><i class="material-icons">label</i></button>
|
||||
<input type="text" class="mass-action-tags-input" name="tags" placeholder="{{ 'entry.list.mass_action_tags_input_placeholder'|trans }}" data-action="keydown.enter->batch-edit#tagSelection:prevent:stop" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ol class="entries {% if list_mode == 1 %}collection{% else %}row entries-row data{% endif %}">
|
||||
|
||||
{% for entry in entries %}
|
||||
<li id="entry-{{ entry.id|e }}" class="{% if list_mode != 0 %}col collection-item{% endif %} s12" data-entry-id="{{ entry.id|e }}" data-test="entry" data-entries-navigation-target="card">
|
||||
{% if list_mode == 1 %}
|
||||
{% include "Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
|
||||
{% include "Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% else %}
|
||||
{% include "Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
{% if entries.getNbPages > 1 %}
|
||||
<div class="results">
|
||||
{{ pagerfanta(entries, 'default_wallabag') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Export -->
|
||||
{% if has_exports and is_granted('EXPORT_ENTRIES') %}
|
||||
<div id="export" class="sidenav" data-controller="materialize--sidenav" data-materialize--sidenav-edge-value="right">
|
||||
|
||||
Reference in New Issue
Block a user