diff --git a/app/Resources/assets/style/main.scss b/app/Resources/assets/style/main.scss index 507f5eb..aa1780f 100644 --- a/app/Resources/assets/style/main.scss +++ b/app/Resources/assets/style/main.scss @@ -97,7 +97,7 @@ } } - .ajax-load > .loader, .empty{ + .ajax-load > .loader, .empty { margin-top: 4em !important; margin-bottom: 4em !important; } diff --git a/app/Resources/translations/messages.en.yml b/app/Resources/translations/messages.en.yml index 9b5579b..6d1e518 100644 --- a/app/Resources/translations/messages.en.yml +++ b/app/Resources/translations/messages.en.yml @@ -75,6 +75,7 @@ model: subparts: Subparts related: Related bricks parents: Parent bricks + sets: Sets page: model.index: Browse bricks @@ -124,6 +125,7 @@ empty: message: Sorry, no reviews found on Brickset models: search.title: No results found for your search criteria + sets.title: This model/part is not used in any set part: id: Number @@ -133,6 +135,7 @@ part: alternates: Alternate parts molds: Molds of part prints: Prints + sets: Sets form: search.submit: Search diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 6bf5a30..bd0230c 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -106,29 +106,4 @@ {% include 'footer.html.twig' %} -{% endblock %} - -{% block javascripts %} - {{ parent() }} - - - - - {% endblock %} \ No newline at end of file diff --git a/app/Resources/views/model/detail.html.twig b/app/Resources/views/model/detail.html.twig index 04ff9e8..aeeda30 100644 --- a/app/Resources/views/model/detail.html.twig +++ b/app/Resources/views/model/detail.html.twig @@ -25,7 +25,6 @@
-
@@ -76,55 +75,64 @@
+ + {% set related = submodels is not empty or siblings is not empty or model.parents is not empty %} +
-
-
-

Submodels

-
- {% for subpart in submodels %} - {{ blocks.model(subpart['model'], subpart['quantity']) }} - {% else %} -
- {% endfor %} -
+ {% if submodels is not empty or siblings is not empty or model.parents is not empty %} +
+ {% if submodels is not empty %} +
+

Submodels

+
+ {% for subpart in submodels %} + {{ blocks.model(subpart['model'], subpart['quantity']) }} + {% else %} +
+ {% endfor %} +
+
+ {% endif %} + {% if siblings is not empty %} +
+

Siblings

+
+ + {% for model in siblings %} + {{ blocks.model(model) }} + {% else %} +
+ {% endfor %} +
+
+ {% endif %} + {% if model.parents is not empty %} +
+

Parents

+
+ + {% for subpart in model.parents %} + {{ blocks.model(subpart.parent) }} + {% else %} +
+ {% endfor %} +
+
+ {% endif %}
+ {% endif %} -
-

Siblings

-
- - {% for model in siblings %} - {{ blocks.model(model) }} - {% else %} -
- {% endfor %} -
-
- -
-

Parents

-
- - {% for subpart in model.parents %} - {{ blocks.model(subpart.parent) }} - {% else %} -
- {% endfor %} -
-
- -
- -
-
+
diff --git a/app/Resources/views/model/tabs/sets.html.twig b/app/Resources/views/model/tabs/sets.html.twig index 949682b..345b09b 100644 --- a/app/Resources/views/model/tabs/sets.html.twig +++ b/app/Resources/views/model/tabs/sets.html.twig @@ -2,41 +2,42 @@ {% import 'macros/elements.html.twig' as elements %} {% block content %} -
+ {% if sets.paginationData['totalCount'] %}
-
-
-
- {% block sets %} -
- {% for set in sets %} - {{ blocks.set(set) }} - {% else %} - {{ blocks.empty('empty.search.title' | trans ) }} - {% endfor %} -
- {% endblock %} -
-
- {{ knp_pagination_render(sets) }} -
+ {% endif %} +
+ {% block sets %} +
+ {% for set in sets %} + {{ blocks.set(set) }} + {% else %} + {{ blocks.empty('empty.sets.title' | trans ) }} + {% endfor %} +
+ {% endblock %} +
+
+ {{ knp_pagination_render(sets) }}
{% endblock %} \ No newline at end of file diff --git a/app/Resources/views/part/detail.html.twig b/app/Resources/views/part/detail.html.twig index 9c6e7f2..469c97c 100644 --- a/app/Resources/views/part/detail.html.twig +++ b/app/Resources/views/part/detail.html.twig @@ -77,9 +77,15 @@
+ +
-
-
+
+ {{ render(path('part_sets', { id: part.id, page: app.request.get('page') })) }}
diff --git a/app/Resources/views/set/detail.html.twig b/app/Resources/views/set/detail.html.twig index e9a47d0..8b1e3e8 100644 --- a/app/Resources/views/set/detail.html.twig +++ b/app/Resources/views/set/detail.html.twig @@ -70,7 +70,6 @@
{{ 'model.id' | trans }}
-