Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix page sections layout #100

Merged
merged 2 commits into from
Nov 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 7 additions & 3 deletions src/Resources/views/Shop/Page/Show/_sections.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{% for section in page.sections %}
<a href="{{ path('bitbag_shop_page_index_by_section_code', {'sectionCode' : section.code}) }}" class="ui label">{{ section.name }}</a>
{% endfor %}
{% if page.sections|length > 0 %}

<strong> {{ 'bitbag.ui.sections'|trans }}: </strong>
{% for section in page.sections %}
<a href="{{ path('bitbag_shop_page_index_by_section_code', {'sectionCode' : section.code}) }}" class="ui label">{{ section.name }}</a>
{% endfor %}
{% endif %}
5 changes: 1 addition & 4 deletions src/Resources/views/Shop/Page/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@

<div class="bitbag-page-content">{{ page.content|raw }}</div>
<div class="ui dividing header"></div>
<strong>
{{ 'bitbag.ui.sections'|trans }}:
</strong>
<div class="bitbag-page-sections">
{% include '@BitBagCmsPlugin/Shop/Page/Show/_sections.html.twig' %}
</div>
</div>
{% if null != page.products %}
{% if (page.products|length) > 0 %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the bracket?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but why ? fix CS?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of our coding standard, we don't use brackets if not necessary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done! :)

<h2>
{{ 'bitbag.ui.page_related_products'|trans }}
</h2>
Expand Down