summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2019-04-07 09:16:02 +0200
committerGitHub <noreply@github.com>2019-04-07 09:16:02 +0200
commit3d2aa93e8bcffc6eb599137d5067e8e0fd249ddb (patch)
treeaa27859858ebb029b99539713ecfee26c0a83150 /print
parent211561eabc1444135e0a000d8ec4ba822c2ebbd5 (diff)
fix realistic detailed view (#424)
Diffstat (limited to 'print')
-rw-r--r--print/templates/operator_overview.html5
-rw-r--r--print/templates/print_detail.html5
-rw-r--r--print/templates/print_overview.html5
-rw-r--r--print/templates/ui_svg_action_buttons.html9
4 files changed, 19 insertions, 5 deletions
diff --git a/print/templates/operator_overview.html b/print/templates/operator_overview.html
index a3090c1f..71c5ea2e 100644
--- a/print/templates/operator_overview.html
+++ b/print/templates/operator_overview.html
@@ -27,7 +27,10 @@
<main>
<figure class="inksimulation operator" data-field-name="operator-overview-transform" title="{{ _('Ctrl + Scroll to Zoom') }}">
{{ svg_overview|replace("<li>", "")|replace("</li>", "")|safe }}
- {% include 'ui_svg_action_buttons.html' %}
+ {% with %}
+ {% set realistic_id='realistic-operator-overview' %}
+ {% include 'ui_svg_action_buttons.html' with context %}
+ {% endwith %}
</figure>
</main>
{% include 'footer.html' %}
diff --git a/print/templates/print_detail.html b/print/templates/print_detail.html
index 0dca4978..f076fc04 100644
--- a/print/templates/print_detail.html
+++ b/print/templates/print_detail.html
@@ -17,7 +17,10 @@
<main>
<figure class="inksimulation" data-field-name="client-detail-transform-block{{ loop.index0 }}" title="{{ _('Ctrl + Scroll to Zoom') }}">
{{color_block.svg_preview|replace("<li>", "")|replace("</li>", "")|safe}}
- {% include 'ui_svg_action_buttons.html' %}
+ {% with %}
+ {% set loop_index=loop.index0 %}
+ {% include 'ui_svg_action_buttons.html' with context %}
+ {% endwith %}
</figure>
<div class="color-palette detailed">
{% include 'color_swatch.html' %}
diff --git a/print/templates/print_overview.html b/print/templates/print_overview.html
index d5111562..34478438 100644
--- a/print/templates/print_overview.html
+++ b/print/templates/print_overview.html
@@ -27,7 +27,10 @@
<main class="client-overview-main">
<figure class="inksimulation" data-field-name="client-overview-transform" title="{{ _('Ctrl + Scroll to Zoom') }}">
{{ svg_overview|replace("<li>", "")|replace("</li>", "")|safe }}
- {% include 'ui_svg_action_buttons.html' %}
+ {% with %}
+ {% set realistic_id='realistic-client-overview' %}
+ {% include 'ui_svg_action_buttons.html' with context %}
+ {% endwith %}
</figure>
<div class="color-palette">
diff --git a/print/templates/ui_svg_action_buttons.html b/print/templates/ui_svg_action_buttons.html
index c111d634..6b199383 100644
--- a/print/templates/ui_svg_action_buttons.html
+++ b/print/templates/ui_svg_action_buttons.html
@@ -4,7 +4,12 @@
<button class="svg-full">100%</button>
<button class="svg-apply">{{ _('Apply to all') }}</button>
<button class="svg-realistic">
- <input type="checkbox" id="realistic-operator-overview" data-field-name="overview" class="realistic" />
- <label for="realistic-operator-overview" class="realistic">{{ _('Realistic') }}</label>
+ {% if loop_index is defined %}
+ <input type="checkbox" id="realistic-color-block-{{ loop_index }}" data-field-name="block{{ loop_index }}" class="realistic" />
+ <label for="realistic-color-block-{{ loop_index }}" class="realistic">{{ _('Realistic') }}</label>
+ {% else %}
+ <input type="checkbox" id="{{ realistic_id }}" data-field-name="overview" class="realistic" />
+ <label for="{{ realistic_id }}" class="realistic">{{ _('Realistic') }}</label>
+ {% endif %}
</button>
</div>