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 @@
-
{{ 'model.id' | trans }} |
@@ -76,55 +75,64 @@
+
+ {% set related = submodels is not empty or siblings is not empty or model.parents is not empty %}
+
-
-
-
-
- {% 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 %}
+
+
+
+ {% for subpart in submodels %}
+ {{ blocks.model(subpart['model'], subpart['quantity']) }}
+ {% else %}
+
+ {% endfor %}
+
+
+ {% endif %}
+ {% if siblings is not empty %}
+
+
+
+
+ {% for model in siblings %}
+ {{ blocks.model(model) }}
+ {% else %}
+
+ {% endfor %}
+
+
+ {% endif %}
+ {% if model.parents is not empty %}
+
+
+
+
+ {% for subpart in model.parents %}
+ {{ blocks.model(subpart.parent) }}
+ {% else %}
+
+ {% endfor %}
+
+
+ {% endif %}
+ {% endif %}
-
-
-
-
- {% for model in siblings %}
- {{ blocks.model(model) }}
- {% else %}
-
- {% endfor %}
-
-
-
-
-
-
-
- {% for subpart in model.parents %}
- {{ blocks.model(subpart.parent) }}
- {% else %}
-
- {% endfor %}
-
-
-
-
-
-
-
+
+ {{ render(path('model_sets', { id: model.id, page: app.request.get('page') })) }}
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'] %}
+
+
-
-
+
+ {{ 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 @@
-