]> Raphaƫl G. Git Repositories - blogbundle/blobdiff - Resources/views/keyword/index.html.twig
Update translations
[blogbundle] / Resources / views / keyword / index.html.twig
index 9860b9c0eb69a80472fc98612de8ae1608e45ed5..dae4b708c34f2eb8f4205162e71b4a990e228f70 100644 (file)
@@ -1,28 +1,45 @@
-{% extends 'RapsysBlogBundle::body.html.twig' %}
-{% block blog_title %}<h1><a href="{{ path('homepage') }}">{% trans %}Dev log{% endtrans %}</a></h1>{% endblock %}
+{% extends '@RapsysBlog/_base.html.twig' %}
 {% block content %}
-<section id="content">
-       <h2><a href="{{ path('keywords') }}">{% trans %}Keywords list{% endtrans %}</a></h2>
-       {% for keyword in keywords %}
-       <article>
+       <section id="content">
                <header>
-                       <h3><a href="{{ path('keywords_keyword', {'_keyword': keyword.slug}) }}">{{keyword.title}}</a></h3>
-                       <p>
-                               <span>{% trans with {'%date%': keyword.created|localizeddate('full', 'short')} %}Published the %date%{% endtrans %}{% if keyword.created != keyword.updated %}{% trans with {'%date%': keyword.updated|localizeddate('short', 'short')} %}, edited the %date%{% endtrans %}{% endif %}</span>
-                       </p>
+                       <h1><a href="{{ path('rapsys_blog_keyword') }}">{{ title }}</a></h1>
+                       <p>{{ description }}</p>
                </header>
-               {% if keyword.articles %}
-                       <p style="margin-bottom: 0">{% transchoice keyword.articles|length %}{1} Article:|]1,Inf[ Articles:{% endtranschoice %}</p>
-                       <ul>
-                               {% for slug, article in keyword.articles %}
-                                       <li><a href="{{ path('articles_article', {'_article': slug}) }}">{{ article }}</a></li>
-                               {% endfor %}
-                       </ul>
+               <section>
+                       {% for keyword in keywords %}
+                               <article>
+                                       <header>
+                                               <h2><a href="{{ path('rapsys_blog_keyword_view', {'id': keyword.id, 'slug': keyword.slug}) }}">{{ keyword.title }}</a></h2>
+                                       </header>
+                                       <section>
+                                               <p>{{ keyword.description }}</p>
+                                               {#{% if article.keywords is defined and article.keywords %}
+                                                       <nav>
+                                                               {% for keyword in article.keywords %}
+                                                                       <a href="{{ path('rapsys_blog_keyword_view', {'id': keyword.id, 'slug': keyword.slug}) }}">{{ keyword.title }}</a>
+                                                               {% endfor %}
+                                                       </nav>
+                                               {% endif %}#}
+                                       </section>
+                                       <footer>
+                                               <nav>
+                                                       <a href="{{ path('rapsys_blog_keyword_view', {'id': keyword.id, 'slug': keyword.slug}) }}">{% trans %}Read more{% endtrans %}...</a>
+                                               </nav>
+                                       </footer>
+                               </article>
+                       {% endfor %}
+               </section>
+               {% if head.prev is defined or head.next is defined %}
+                       <footer>
+                               <nav class="pager">
+                                       {% if head.prev is defined %}
+                                               <a href="{{ head.prev }}" rel="prev">&lt; {% trans %}Previous keywords{% endtrans %}</a>
+                                       {% endif %}
+                                       {% if head.next is defined %}
+                                               <a href="{{ head.next }}" rel="next">{% trans %}Next keywords{% endtrans %} &gt;</a>
+                                       {% endif %}
+                               </nav>
+                       </footer>
                {% endif %}
-               <nav>
-                       <a href="{{ path('keywords_keyword', {'_keyword': keyword.slug}) }}">{% trans %}Read more{% endtrans %}...</a>
-               </nav>
-       </article>
-       {% endfor %}
-</section>
+       </section>
 {% endblock %}