Translations and baggy view for tags

This commit is contained in:
Nicolas Lœuillet
2016-04-20 10:04:32 +02:00
committed by Jeremy Benoist
parent 891456ba9a
commit 371bcca0f6
13 changed files with 44 additions and 5 deletions

View File

@ -1,10 +1,36 @@
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %}
{% block title %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% if currentRoute == 'starred' %}
{{ 'entry.page_titles.starred'|trans }}
{% elseif currentRoute == 'archive' %}
{{ 'entry.page_titles.archived'|trans }}
{% elseif currentRoute == 'all' %}
{{ 'entry.page_titles.filtered'|trans }}
{% elseif currentRoute == 'tag_entries' %}
{{ 'entry.page_titles.filtered_tags'|trans }}
{% else %}
{{ 'entry.page_titles.unread'|trans }}
{% endif %}
{% endblock %}
{% block content %}
{% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %}
{% block pager %}
<div class="results">
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination">
{% if form is not null %}<a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>{% endif %}
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div>
</div>
{% endblock %}
{% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="entry">
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
@ -44,7 +70,6 @@
</div>
{% endfor %}
<!-- Export -->
<aside id="download-form">
{% set currentRoute = app.request.attributes.get('_route') %}
@ -63,8 +88,10 @@
{% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %}
</ul>
</aside>
<!-- Filter -->
<aside id="filter-form">
{% if form is not null %}
<aside id="filter-form" class="">
<form method="get" action="{{ path('all') }}">
<h2>{{ 'entry.filters.title'|trans }}</h2>
<a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
@ -145,6 +172,7 @@
</div>
</form>
</aside>
{% endif %}
{% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %}
{% endblock %}

View File

@ -9,7 +9,7 @@
<ul>
{% for tag in tags %}
<li id="tag-{{ tag.id|e }}">{{tag.label}} ({{ tag.getEntriesByUserId(app.user.id) | length }})</li>
<li id="tag-{{ tag.id|e }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -9,10 +9,11 @@
{{ 'entry.page_titles.archived'|trans }}
{% elseif currentRoute == 'all' %}
{{ 'entry.page_titles.filtered'|trans }}
{% elseif currentRoute == 'tag_entries' %}
{{ 'entry.page_titles.filtered_tags'|trans }}
{% else %}
{{ 'entry.page_titles.unread'|trans }}
{% endif %}
{% endblock %}
{% block content %}