diff --git a/app/Resources/assets/style/colors.scss b/app/Resources/assets/style/colors.scss index a04f81c..dd0bd5e 100644 --- a/app/Resources/assets/style/colors.scss +++ b/app/Resources/assets/style/colors.scss @@ -146,4 +146,10 @@ $colors: ( .text.color-#{$number} { color: $color; } + + .segment.color-#{$number} { + padding-left: 0.7em !important; + margin-left: -1em !important; + border-left: $color 0.3em solid !important; + } } \ No newline at end of file diff --git a/app/Resources/views/set/tabs/colors.html.twig b/app/Resources/views/set/tabs/colors.html.twig index 6a56b4a..5904eec 100644 --- a/app/Resources/views/set/tabs/colors.html.twig +++ b/app/Resources/views/set/tabs/colors.html.twig @@ -8,16 +8,16 @@ {% endfor %} {% endfor %} -
+
{{ 'set.download.multicolor.button' | trans}}
- + {% if colors|length > 0 %} -
-

Models

+
+

{{ 'set.inventory.models' | trans }}

{% for color in colors %} -
-
+
+
{{ color['color'].name }} ({{ color['quantity'] }})
@@ -31,8 +31,8 @@ {% endif %} {% if missing|length > 0 %} -
-

Missing

+
+

{{ 'set.inventory.parts' | trans }}

{% for part in missing %} {{ blocks.part(part['part'],part['quantity']) }} diff --git a/app/Resources/views/set/tabs/inventory.html.twig b/app/Resources/views/set/tabs/inventory.html.twig index e31cec5..7fb0372 100644 --- a/app/Resources/views/set/tabs/inventory.html.twig +++ b/app/Resources/views/set/tabs/inventory.html.twig @@ -3,44 +3,44 @@ {% block content %}
- {% for label, flashes in app.session.flashbag.all %} - {% for flash in flashes %} - {{ elements.flash(label,flash) }} - {% endfor %} + {% for label, flashes in app.session.flashbag.all %} + {% for flash in flashes %} + {{ elements.flash(label,flash) }} {% endfor %} + {% endfor %} - {% if inventorySets %} -

Sets

-
- {% for inventorySet in inventorySets %} - {{ blocks.set(inventorySet.set, inventorySet.quantity) }} - {% endfor %} -
- {% else %} - {% if missingCount > 0 %} -
- -
-
- {{ 'set.download.warning.title' | trans }} -
-

{{ 'set.download.warning.text' | trans({'%percent%':((1 - missingCount/partCount)*100)|number_format(2, '.', ','), '%total%':partCount, '%missing%': missingCount, '%unique%': missing|length}) | raw | nl2br }}

+ {% if inventorySets %} +

Sets

+
+ {% for inventorySet in inventorySets %} + {{ blocks.set(inventorySet.set, inventorySet.quantity) }} + {% endfor %} +
+ {% else %} + {% if missingCount > 0 %} +
+ +
+
+ {{ 'set.download.warning.title' | trans }}
+

{{ 'set.download.warning.text' | trans({'%percent%':((1 - missingCount/partCount)*100)|number_format(2, '.', ','), '%total%':partCount, '%missing%': missingCount, '%unique%': missing|length}) | raw | nl2br }}

- {% endif %} - - - -
- {{ render(path('set_models', {id: set.id})) }} -
-
- {{ render(path('set_colors', {id: set.id})) }}
{% endif %} + + + +
+ {{ render(path('set_models', {id: set.id})) }} +
+
+ {{ render(path('set_colors', {id: set.id})) }} +
+ {% endif %}

{{ 'set.rebrickable.credit' | trans | raw }}

diff --git a/app/Resources/views/set/tabs/models.html.twig b/app/Resources/views/set/tabs/models.html.twig index 1ec9b09..a543205 100644 --- a/app/Resources/views/set/tabs/models.html.twig +++ b/app/Resources/views/set/tabs/models.html.twig @@ -14,7 +14,7 @@ {% if models|length > 0 %}
-

Models

+

{{ 'set.inventory.models' | trans }}

{% for model in models %} {{ blocks.model(model['model'],model['quantity']) }} @@ -24,7 +24,7 @@ {% endif %} {% if missing|length > 0 %}
-

Missing

+

{{ 'set.inventory.parts' | trans }}

{% for part in missing %} {{ blocks.part(part['part'],part['quantity']) }} diff --git a/src/AppBundle/Entity/LDraw/Model.php b/src/AppBundle/Entity/LDraw/Model.php index 0bd323c..3623892 100644 --- a/src/AppBundle/Entity/LDraw/Model.php +++ b/src/AppBundle/Entity/LDraw/Model.php @@ -27,7 +27,7 @@ class Model /** * @var Category * - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\LDraw\Category", inversedBy="models", cascade={"persist"}) + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\LDraw\Category", inversedBy="models", fetch="EAGER", cascade={"persist"}) */ private $category;