Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/admin/blog/_form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{{ form_start(form, {attr: attr|default({})}) }}
{{ form_widget(form) }}

<button type="submit" class="{{ button_css|default("btn btn-primary") }}">
<button type="submit" class="{{ button_css|default('btn btn-primary') }}">
<twig:ux:icon name="tabler:save-changes"/> {{ button_label|default('label.create_post'|trans) }}
</button>

Expand Down
6 changes: 3 additions & 3 deletions templates/admin/blog/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
{% block body_id 'admin_post_edit' %}

{% block main %}
<h1>{{ 'title.edit_post'|trans({'id': post.id}) }}</h1>
<h1>{{ 'title.edit_post'|trans({id: post.id}) }}</h1>

{{ include('admin/blog/_form.html.twig', {
form: form,
button_label: 'action.save'|trans,
include_back_to_home_link: true,
}, with_context = false) }}
}, with_context: false) }}
{% endblock %}

{% block sidebar %}
Expand All @@ -20,7 +20,7 @@
</div>

<div class="section actions">
{{ include('admin/blog/_delete_form.html.twig', {post: post}, with_context = false) }}
{{ include('admin/blog/_delete_form.html.twig', {post: post}, with_context: false) }}
</div>

{{ parent() }}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/blog/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>

<div class="section">
{{ include('admin/blog/_delete_form.html.twig', {post: post}, with_context = false) }}
{{ include('admin/blog/_delete_form.html.twig', {post: post}, with_context: false) }}
</div>

{{ parent() }}
Expand Down
1 change: 0 additions & 1 deletion templates/admin/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@
</a>
</li>
{% endblock %}

6 changes: 3 additions & 3 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
<div id="sidebar" class="col-sm-3">
{% block sidebar %}
{{ render_esi(controller('Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController::templateAction', {
'template': 'blog/about.html.twig',
'sharedAge': 600,
'_locale': app.locale
template: 'blog/about.html.twig',
sharedAge: 600,
_locale: app.locale,
})) }}
{% endblock %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/blog/_comment_form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{ form_start(form, {method: ..., action: ..., attr: {novalidate: 'novalidate'}}) }}
#}

{{ form_start(form, {method: 'POST', action: path('comment_new', {'postSlug': post.slug})}) }}
{{ form_start(form, {method: 'POST', action: path('comment_new', {postSlug: post.slug})}) }}
{#
Instead of displaying form fields one by one, you can also display them
all with their default options and styles just by calling to this function:
Expand Down
3 changes: 1 addition & 2 deletions templates/blog/_post_tags.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{% if not post.tags.empty %}
<p class="post-tags">
{% for tag in post.tags %}
<a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}"
<a href="{{ path('blog_index', {tag: tag.name == app.request.query.get('tag') ? null : tag.name}) }}"
class="badge badge-{{ tag.name == app.request.query.get('tag') ? 'success' : 'secondary' }}"
>
<twig:ux:icon name="tabler:tag" style="top: 0"/> {{ tag.name }}
</a>
{% endfor %}
</p>
{% endif %}

10 changes: 5 additions & 5 deletions templates/blog/index.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<channel>
<title>{{ 'rss.title'|trans }}</title>
<description>{{ 'rss.description'|trans }}</description>
<pubDate>{{ 'now'|date('r', timezone='GMT') }}</pubDate>
<lastBuildDate>{{ (paginator.results|last).publishedAt|default('now')|date('r', timezone='GMT') }}</lastBuildDate>
<pubDate>{{ 'now'|date('r', timezone: 'GMT') }}</pubDate>
<lastBuildDate>{{ (paginator.results|last).publishedAt|default('now')|date('r', timezone: 'GMT') }}</lastBuildDate>
<link>{{ url('blog_index') }}</link>
<language>{{ app.locale }}</language>

{% for post in paginator.results %}
<item>
<title>{{ post.title }}</title>
<description>{{ post.summary }}</description>
<link>{{ url('blog_post', {'slug': post.slug}) }}</link>
<guid>{{ url('blog_post', {'slug': post.slug}) }}</guid>
<pubDate>{{ post.publishedAt|date(format='r', timezone='GMT') }}</pubDate>
<link>{{ url('blog_post', {slug: post.slug}) }}</link>
<guid>{{ url('blog_post', {slug: post.slug}) }}</guid>
<pubDate>{{ post.publishedAt|date(format: 'r', timezone: 'GMT') }}</pubDate>
<author>{{ post.author.email }}</author>
{% for tag in post.tags %}
<category>{{ tag.name }}</category>
Expand Down
4 changes: 2 additions & 2 deletions templates/blog/post_show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{{ render(controller('App\\Controller\\BlogController::commentForm', {post})) }}
{% else %}
<p>
<a class="btn btn-success" href="{{ path('security_login', {'redirect_to': app.request.pathInfo}) }}">
<a class="btn btn-success" href="{{ path('security_login', {redirect_to: app.request.pathInfo}) }}">
<twig:ux:icon name="tabler:login"/> {{ 'action.sign_in'|trans }}
</a>
{{ 'post.to_publish_a_comment'|trans }}
Expand All @@ -39,7 +39,7 @@
</div>

<h3>
<twig:ux:icon name="tabler:messages"/> {{ 'post.num_comments'|trans({ 'count': post.comments|length }) }}
<twig:ux:icon name="tabler:messages"/> {{ 'post.num_comments'|trans({count: post.comments|length}) }}
</h3>

{% for comment in post.comments %}
Expand Down
2 changes: 1 addition & 1 deletion templates/blog/search.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://symfony.com/bundles/ux-twig-component/current/index.html
#}
{{ component('blog_search', {
query: query
query: query,
}) }}
{% endblock %}

Expand Down
6 changes: 3 additions & 3 deletions templates/bundles/TwigBundle/Exception/error.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{% block body_id 'error' %}

{% block main %}
<h1 class="text-danger">{{ 'http_error.name'|trans({ 'status_code': status_code }) }}</h1>
<h1 class="text-danger">{{ 'http_error.name'|trans({status_code: status_code}) }}</h1>

<p class="lead">
{{ 'http_error.description'|trans({ 'status_code': status_code }) }}
{{ 'http_error.description'|trans({status_code: status_code}) }}
</p>
<p>
{{ 'http_error.suggestion'|trans({ 'url': path('blog_index') })|raw }}
{{ 'http_error.suggestion'|trans({url: path('blog_index')})|raw }}
</p>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion templates/bundles/TwigBundle/Exception/error403.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block body_id 'error' %}

{% block main %}
<h1 class="text-danger"><twig:ux:icon name="tabler:lock"/> {{ 'http_error.name'|trans({ 'status_code': 403 }) }}</h1>
<h1 class="text-danger"><twig:ux:icon name="tabler:lock"/> {{ 'http_error.name'|trans({status_code: 403}) }}</h1>

<p class="lead">
{{ 'http_error_403.description'|trans }}
Expand Down
4 changes: 2 additions & 2 deletions templates/bundles/TwigBundle/Exception/error404.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{% block body_id 'error' %}

{% block main %}
<h1 class="text-danger">{{ 'http_error.name'|trans({ 'status_code': 404 }) }}</h1>
<h1 class="text-danger">{{ 'http_error.name'|trans({status_code: 404}) }}</h1>

<p class="lead">
{{ 'http_error_404.description'|trans }}
</p>
<p>
{{ 'http_error_404.suggestion'|trans({ 'url': path('blog_index') })|raw }}
{{ 'http_error_404.suggestion'|trans({url: path('blog_index')})|raw }}
</p>
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions templates/bundles/TwigBundle/Exception/error500.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{% block body_id 'error' %}

{% block main %}
<h1 class="text-danger">{{ 'http_error.name'|trans({ 'status_code': 500 }) }}</h1>
<h1 class="text-danger">{{ 'http_error.name'|trans({status_code: 500}) }}</h1>

<p class="lead">
{{ 'http_error_500.description'|trans }}
</p>
<p>
{{ 'http_error_500.suggestion'|trans({ 'url': path('blog_index') })|raw }}
{{ 'http_error_500.suggestion'|trans({url: path('blog_index')})|raw }}
</p>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion templates/form/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{% block tags_input_widget %}
<div class="input-group">
{{ form_widget(form, {'attr': {'data-toggle': 'tagsinput', 'data-tags': tags|json_encode}}) }}
{{ form_widget(form, {attr: {'data-toggle': 'tagsinput', 'data-tags': tags|json_encode}}) }}
<span class="input-group-text"><twig:ux:icon name="tabler:tags" /></span>
</div>
{% endblock %}