From 0a79bfdd8cb6bee3024e9193dc5d4b0d45cf06b7 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 22 May 2015 12:58:07 +0200 Subject: [PATCH] indent --- app/Resources/views/base.html.twig | 21 +- .../views/Default/category.html.twig | 100 +++--- .../Resources/views/Default/home.html.twig | 88 +++--- .../Resources/views/Default/post.html.twig | 22 +- .../Resources/views/Default/postRss.html.twig | 54 ++-- .../Resources/views/Default/tag.html.twig | 96 +++--- .../views/Default/theComment.html.twig | 30 +- .../Resources/views/Default/thePost.html.twig | 296 +++++++++--------- .../Resources/views/Default/tiny.html.twig | 90 +++--- .../views/Default/tinyThePost.html.twig | 34 +- 10 files changed, 419 insertions(+), 412 deletions(-) diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 5537b6c..b17c2e3 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -15,7 +15,7 @@ - + {% endblock %} {{ get_var('CssBlock')|raw }} @@ -124,6 +124,19 @@ + {% spaceless %} + {% if session_user.hasFlash('message') %} + {% set flash = session_user.flash('message') %} +
+
+
+ {{ include(flash.template, {message: flash.message}) }} +
+
+
+ {% endif %} + {% endspaceless %} + {% block body %}{% endblock %} {# @@ -161,12 +174,6 @@
- {% spaceless %} - {% if session_user.hasFlash('message') %} - {% set flash = session_user.flash('message') %} - {{ include(flash.template, {message: flash.message}) }} - {% endif %} - {% endspaceless %} {{ get_var('Notice')|transform_url }} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/category.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/category.html.twig index 9630727..f195410 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/category.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/category.html.twig @@ -1,63 +1,63 @@ {% extends "::base.html.twig" %} {% block breadcrumb %} -
  • Accueil
  • -
  • »
  • -
  • Catégorie « {{ page.object }} »
  • +
  • Accueil
  • +
  • »
  • +
  • Catégorie « {{ page.object }} »
  • - {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} -
  • »
  • -
  • Page {{ page.pager.currentPage }}
  • - {% endif %} + {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} +
  • »
  • +
  • Page {{ page.pager.currentPage }}
  • + {% endif %} {% endblock %} {% block body %} - {% if page.pager.nbResults == 0 %} -
    Aucun article disponible.
    - {% endif %} + {% if page.pager.nbResults == 0 %} +
    Aucun article disponible.
    + {% endif %} - {% for post in page.pager %} -
    -
    -
    - {% if not loop.first %} -
    - {% endif %} -
    -
    -
    - - {{ include('DeblanBlogBundle:Default:thePost.html.twig') }} - {% endfor %} + {% for post in page.pager %} +
    +
    +
    + {% if not loop.first %} +
    + {% endif %} +
    +
    +
    + + {{ include('DeblanBlogBundle:Default:thePost.html.twig') }} + {% endfor %} - {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} -
    -
    -
    -
    -
      - {% if page.pager.hasPreviousPage %} - - {% endif %} - {% if page.pager.hasNextPage %} - - {% endif %} -
    -
    -
    -
    - {% endif %} + {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} +
    +
    +
    +
    +
      + {% if page.pager.hasPreviousPage %} + + {% endif %} + {% if page.pager.hasNextPage %} + + {% endif %} +
    +
    +
    +
    + {% endif %} {% endblock %} {% block main_menu_bind %} - {% if page.pager.hasPreviousPage %} -
  • - {% endif %} - {% if page.pager.hasNextPage %} -
  • - {% endif %} + {% if page.pager.hasPreviousPage %} +
  • + {% endif %} + {% if page.pager.hasNextPage %} +
  • + {% endif %} {% endblock %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/home.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/home.html.twig index 6a5f591..a1df075 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/home.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/home.html.twig @@ -1,57 +1,57 @@ {% extends "::base.html.twig" %} {% block breadcrumb %} -
  • Accueil
  • +
  • Accueil
  • - {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} -
  • »
  • -
  • Page {{ page.pager.currentPage }}
  • - {% endif %} + {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} +
  • »
  • +
  • Page {{ page.pager.currentPage }}
  • + {% endif %} {% endblock %} {% block body %} - {% for post in page.pager %} -
    -
    -
    - {% if not loop.first %} -
    - {% endif %} -
    -
    -
    + {% for post in page.pager %} +
    +
    +
    + {% if not loop.first %} +
    + {% endif %} +
    +
    +
    - {{ include('DeblanBlogBundle:Default:thePost.html.twig', {post: post}) }} - {% endfor %} + {{ include('DeblanBlogBundle:Default:thePost.html.twig', {post: post}) }} + {% endfor %} - {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} -
    -
    -
    -
    -
      - {% if page.pager.hasPreviousPage %} - - {% endif %} - {% if page.pager.hasNextPage %} - - {% endif %} -
    -
    -
    -
    - {% endif %} + {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} +
    +
    +
    +
    +
      + {% if page.pager.hasPreviousPage %} + + {% endif %} + {% if page.pager.hasNextPage %} + + {% endif %} +
    +
    +
    +
    + {% endif %} {% endblock %} {% block main_menu_bind %} - {% if page.pager.hasPreviousPage %} -
  • - {% endif %} - {% if page.pager.hasNextPage %} -
  • - {% endif %} + {% if page.pager.hasPreviousPage %} +
  • + {% endif %} + {% if page.pager.hasNextPage %} +
  • + {% endif %} {% endblock %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/post.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/post.html.twig index 0993f78..c8f0fc6 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/post.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/post.html.twig @@ -1,28 +1,28 @@ {% extends "::base.html.twig" %} {% block breadcrumb %} -
  • Accueil
  • -
  • »
  • -
  • Article « {{ page.object }} »
  • +
  • Accueil
  • +
  • »
  • +
  • Article « {{ page.object }} »
  • {% endblock %} {% block header_title %} - {{ page.object.title }} + {{ page.object.title }} {% endblock %} {% block body %} - {% set post = page.object %} + {% set post = page.object %} - {{ include('DeblanBlogBundle:Default:thePost.html.twig') }} + {{ include('DeblanBlogBundle:Default:thePost.html.twig') }} {% endblock %} {% block metas %} {% spaceless %} - {{ parent() }} + {{ parent() }} - - - - + + + + {% endspaceless %} {% endblock %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig index c4e8cc9..cc274b7 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig @@ -1,31 +1,31 @@ - - Deblan - Blog - http://www.deblan.io/ - Deblan - Blog - fr + + Deblan - Blog + http://www.deblan.io/ + Deblan - Blog + fr - {% for post in page.pager %} - - <![CDATA[{{ post.title|raw }}]]> - {{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }} - - - {{ post.id }} - {{ post.publishedAt|date('r') }} - {% for category in post.categories %} - - {% endfor %} - - {% endfor %} - + {% for post in page.pager %} + + <![CDATA[{{ post.title|raw }}]]> + {{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }} + + + {{ post.id }} + {{ post.publishedAt|date('r') }} + {% for category in post.categories %} + + {% endfor %} + + {% endfor %} + diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tag.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tag.html.twig index cb8450d..95a4619 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tag.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tag.html.twig @@ -1,62 +1,62 @@ {% extends "::base.html.twig" %} {% block breadcrumb %} -
  • Accueil
  • -
  • »
  • -
  • Tag « {{ page.object }} »
  • +
  • Accueil
  • +
  • »
  • +
  • Tag « {{ page.object }} »
  • - {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} -
  • »
  • -
  • Page {{ page.pager.currentPage }}
  • - {% endif %} + {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} +
  • »
  • +
  • Page {{ page.pager.currentPage }}
  • + {% endif %} {% endblock %} {% block body %} - {% if page.pager.nbResults == 0 %} -
    Aucun article disponible.
    - {% endif %} + {% if page.pager.nbResults == 0 %} +
    Aucun article disponible.
    + {% endif %} - {% for post in page.pager %} -
    -
    -
    - {% if not loop.first %} -
    - {% endif %} -
    -
    -
    + {% for post in page.pager %} +
    +
    +
    + {% if not loop.first %} +
    + {% endif %} +
    +
    +
    - {{ include('DeblanBlogBundle:Default:thePost.html.twig') }} - {% endfor %} + {{ include('DeblanBlogBundle:Default:thePost.html.twig') }} + {% endfor %} - {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} -
    -
    -
    -
      - {% if page.pager.hasPreviousPage %} - - {% endif %} - {% if page.pager.hasNextPage %} - - {% endif %} -
    -
    -
    -
    - {% endif %} + {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} +
    +
    +
    +
      + {% if page.pager.hasPreviousPage %} + + {% endif %} + {% if page.pager.hasNextPage %} + + {% endif %} +
    +
    +
    +
    + {% endif %} {% endblock %} {% block main_menu_bind %} - {% if page.pager.hasPreviousPage %} -
  • - {% endif %} - {% if page.pager.hasNextPage %} -
  • - {% endif %} + {% if page.pager.hasPreviousPage %} +
  • + {% endif %} + {% if page.pager.hasNextPage %} +
  • + {% endif %} {% endblock %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/theComment.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/theComment.html.twig index 4456b52..57a5890 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/theComment.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/theComment.html.twig @@ -1,23 +1,23 @@
    -
    - {{ comment.author }} -
    -
    -
    - , +
    + {{ comment.author }} +
    +
    +
    + , - -
    -

    {{ comment.Content|comment }}

    - - -
    + +
    +

    {{ comment.Content|comment }}

    + + +
    {% set level = level + 1 %} {% for child in comment.orderedComments %} - {{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: level, comment: child}) }} + {{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: level, comment: child}) }} {% endfor %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/thePost.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/thePost.html.twig index 0bf8347..2336e08 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/thePost.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/thePost.html.twig @@ -1,180 +1,180 @@
    -
    -
    -
    - {% if full is not defined %} -

    {{ post.title }}

    - {% endif %} +
    +
    +
    + {% if full is not defined %} +

    {{ post.title }}

    + {% endif %} - {% if post.contentFormat == 'html' %} - {{ post.content|post|transform_url }} - {% endif %} - - {% if post.contentFormat == 'markdown' %} - {{ post.content|markdown|transform_url }} - {% endif %} -
    + {% if post.contentFormat == 'html' %} + {{ post.content|post|transform_url }} + {% endif %} + + {% if post.contentFormat == 'markdown' %} + {{ post.content|markdown|transform_url }} + {% endif %} +
    -
    -
      - {% for category in post.categories %} -
    • {{ category.title }}
    • - {% endfor %} +
      +
        + {% for category in post.categories %} +
      • {{ category.title }}
      • + {% endfor %} - {% for tag in post.tagsCollection %} - {% if tag|trim is not empty %} -
      • #{{ tag }}
      • - {% endif %} - {% endfor %} -
      -
      -
    -
    + {% for tag in post.tagsCollection %} + {% if tag|trim is not empty %} +
  • #{{ tag }}
  • + {% endif %} + {% endfor %} + +
    +
    +
    {#
    -
    -

    {{ post.title }}

    +
    +

    {{ post.title }}

    -
    -
    - - -
    +
    +
    + + +
    - - -
      - {% for category in post.categories %} -
    • {{ category.title }}
    • - {% endfor %} + + +
        + {% for category in post.categories %} +
      • {{ category.title }}
      • + {% endfor %} - {% for tag in post.tagsCollection %} - {% if tag|trim is not empty %} -
      • #{{ tag }}
      • - {% endif %} - {% endfor %} -
      -
    -
    + {% for tag in post.tagsCollection %} + {% if tag|trim is not empty %} +
  • #{{ tag }}
  • + {% endif %} + {% endfor %} + +
    + -
    - {% if post.contentFormat == 'html' %} - {{ post.content|post|transform_url }} - {% endif %} - - {% if post.contentFormat == 'markdown' %} - {{ post.content|markdown|transform_url }} - {% endif %} -
    +
    + {% if post.contentFormat == 'html' %} + {{ post.content|post|transform_url }} + {% endif %} + + {% if post.contentFormat == 'markdown' %} + {{ post.content|markdown|transform_url }} + {% endif %} +
    - {% if full is defined and false %} -
    - - -
    - - - - - - -
    -
    - {% endif %} + {% if full is defined and false %} +
    + + +
    + + + + + + +
    +
    + {% endif %} #} {% if full is defined %} -
    -
    -
    - {% if post.hasComments %} -
    +
    +
    +
    + {% if post.hasComments %} +
    - {% for comment in post.orderedComments %} - {% if comment.active and not comment.parentCommentId %} - {{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: 1}) }} - {% endif %} - {% endfor %} - {% endif %} + {% for comment in post.orderedComments %} + {% if comment.active and not comment.parentCommentId %} + {{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: 1}) }} + {% endif %} + {% endfor %} + {% endif %} -
    -
    +
    +
    -
    +
    -

    Ajouter un commentaire

    +

    Ajouter un commentaire

    -
    - -

    Vous répondez à un commentaire.

    -
    +
    + +

    Vous répondez à un commentaire.

    +
    -
    -
    - -
    - {{ form_widget(form.Author) }} - {{ form_errors(form.Author) }} -
    -
    + +
    + +
    + {{ form_widget(form.Author) }} + {{ form_errors(form.Author) }} +
    +
    -
    - -
    - {{ form_widget(form.Website) }} - {{ form_errors(form.Website) }} -
    -
    +
    + +
    + {{ form_widget(form.Website) }} + {{ form_errors(form.Website) }} +
    +
    -
    - -
    - {{ form_widget(form.Email) }} - {{ form_errors(form.Email) }} - L'email n'est pas affiché. Vous pouvez utiliser un avatar à l'aide de Gravatar. -
    -
    +
    + +
    + {{ form_widget(form.Email) }} + {{ form_errors(form.Email) }} + L'email n'est pas affiché. Vous pouvez utiliser un avatar à l'aide de Gravatar. +
    +
    -
    - -
    - {{ form_widget(form.Content) }} - {{ form_errors(form.Content) }} -
    -
    +
    + +
    + {{ form_widget(form.Content) }} + {{ form_errors(form.Content) }} +
    +
    -
    - -
    - - {{ form_errors(form.Follow) }} -
    -
    +
    + +
    + + {{ form_errors(form.Follow) }} +
    +
    -
    - -
    - -
    -
    - {{ form_widget(form.ParentCommentId) }} +
    + +
    + +
    +
    + {{ form_widget(form.ParentCommentId) }} - {{ form_rest(form) }} -
    -
    -
    -
    -
    + {{ form_rest(form) }} + +
    +
    +
    +
    {% endif %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tiny.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tiny.html.twig index 7e2ac99..9a5ec09 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tiny.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tiny.html.twig @@ -1,58 +1,58 @@ {% extends "DeblanBlogBundle:Default:home.html.twig" %} {% block breadcrumb %} -
  • Accueil
  • +
  • Accueil
  • -
  • »
  • -
  • {{ page.seoTitle|pp(page.object)|pp(page)|e }}
  • +
  • »
  • +
  • {{ page.seoTitle|pp(page.object)|pp(page)|e }}
  • - {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} -
  • »
  • -
  • Page {{ page.pager.currentPage }}
  • - {% endif %} + {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} +
  • »
  • +
  • Page {{ page.pager.currentPage }}
  • + {% endif %} {% endblock %} {% block body %} -

    - {{ page.seoTitle|pp(page.object)|pp(page)|e }} - - - - -

    +

    + {{ page.seoTitle|pp(page.object)|pp(page)|e }} + + + + +

    - {% for post in page.pager %} - {{ include('DeblanBlogBundle:Default:tinyThePost.html.twig', {post: post}) }} - {% endfor %} + {% for post in page.pager %} + {{ include('DeblanBlogBundle:Default:tinyThePost.html.twig', {post: post}) }} + {% endfor %} - {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} -
    -
    -
    -
    -
      - {% if page.pager.hasPreviousPage %} - - {% endif %} - {% if page.pager.hasNextPage %} - - {% endif %} -
    -
    -
    -
    - {% endif %} + {% if page.pager.hasPreviousPage or page.pager.hasNextPage %} +
    +
    +
    +
    +
      + {% if page.pager.hasPreviousPage %} + + {% endif %} + {% if page.pager.hasNextPage %} + + {% endif %} +
    +
    +
    +
    + {% endif %} {% endblock %} {% block main_menu_bind %} - {% if page.pager.hasPreviousPage %} -
  • - {% endif %} - {% if page.pager.hasNextPage %} -
  • - {% endif %} -{% endblock %} + {% if page.pager.hasPreviousPage %} +
  • + {% endif %} + {% if page.pager.hasNextPage %} +
  • + {% endif %} +{% endblock %} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tinyThePost.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tinyThePost.html.twig index 8ba1fd5..8521c4d 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tinyThePost.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/tinyThePost.html.twig @@ -1,23 +1,23 @@
    + -
    - {{ post.excerpt|raw }} +
    + {{ post.excerpt|raw }} -

    {{ post.link }}

    -
    +

    {{ post.link }}

    +