<commit_before>{% extends "DebbManagementBundle::form.html.twig" %}
{% form_theme form "DebbManagementBundle::form_theme.html.twig" %}
{% import _self as chassis %}

{% block stylesheets %}
	{{ parent() }}
	{% stylesheets filter='cssrewrite'
		'bundles/debbconfig/css/jquery-ui.min.css'
	%}
		<link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
	{% endstylesheets %}
	<style>
		.node { padding: 10px; margin: 0px; }
		ul.hoz { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
		li.hoz { margin: 5px; padding: 5px; width: 150px; }
	</style>
{% endblock %}

{% block javascripts %}
	{{ parent() }}
	{% javascripts
					'@DebbConfigBundle/Resources/public/js/jquery-ui.min.js'
					'@DebbManagementBundle/Resources/public/js/chassis.js'
	%}
		<script src="{{ asset_url }}" type="text/javascript"></script>
	{% endjavascripts %}
    <script type="text/javascript">
        var chassisId = {{ form.vars.data.id | default(0) }};
    </script>
{% endblock %}

{% set chassisSizeX = form.vars.data.sizeX %}
{% set chassisSizeY = form.vars.data.sizeY %}

{% block contentExtras %} style="width: {{ chassisSizeX + 38 }}px;"{% endblock %}

{% block form %}
	{%- do form.typspecification.setRendered() -%}
	{%- do form.flowPumps.setRendered -%}
	{{- parent() -}}
	<div id="chassiscontainer" class="row-fluid" style="width: {{ chassisSizeX + 10 }}px;">
		{% if flowPumps|length > 0 -%}
			<div>
				{{ 'Add flow pump' | trans }}:
				<ul class="hoz">
					{% for flowPump in flowPumps %}
						<li class="hoz ui-state-default eDraftRack addFlowPump" style="margin-left: 0px; margin-right: 10px;"><div class="draftRack" flowPumpId="{{ flowPump.id }}" rackx="{{ flowPump.sizeX }}" racky="{{ flowPump.sizeY }}" rackz="{{ flowPump.sizeZ }}" title="{{ flowPump | e }}">{{ flowPump }}</div></li>
					{% endfor %}
				</ul>
			</div>
			<div class="clear"></div>
		{%- endif %}
		<div>
			<a href="#" class="addNode btn btn-small" style="border-bottom-width: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;">{{ 'Add node' | trans }}</a>
		</div>
		<div class="clear"></div>
		<div id="chassisSize">{{ 'size' | trans }}: <span id="chassisSizeX">{{ (chassisSizeX / 1000.0) | number_format(2, '.', '') }}</span>m x <span id="chassisSizeY">{{ (chassisSizeY / 1000.0) | number_format(2, '.', '') }}</span>m</div>

		{% set spaceInfoWidth = 75 %}
		{% set itemtypspecification = item.typspecification %}
		{% if itemtypspecification | keys|default({0: -1}).0 == 0 %}
			{% set itemtypspecification = itemtypspecification | reverse %}
		{% endif %}
		<div id="nodegroupContainer" data-prototype="{{ chassis.typspec(nodetypspecs, form.typspecification.vars.prototype) | e }}" data-prototype-flowpump="{{ chassis.typspec(null, form.flowPumps.vars.prototype) | e }}" style="width: {{ chassisSizeX }}px; height: {{ chassisSizeY }}px;">
			{%- for typspec in form.typspecification -%}
				{{ chassis.typspec(nodetypspecs, typspec, true) }}
			{%- endfor -%}
			{% for flowPump in form.flowPumps %}
				{{ chassis.typspec(null, flowPump, true) }}
			{% endfor %}
		</div>
		<div class="clear"></div><commit_msg>Fixed bug with wrong x side on chassis form - Task #1902<commit_after>{% extends "DebbManagementBundle::form.html.twig" %}
{% form_theme form "DebbManagementBundle::form_theme.html.twig" %}
{% import _self as chassis %}

{% block stylesheets %}
	{{ parent() }}
	{% stylesheets filter='cssrewrite'
		'bundles/debbconfig/css/jquery-ui.min.css'
	%}
		<link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
	{% endstylesheets %}
	<style>
		.node { padding: 10px; margin: 0px; }
		ul.hoz { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
		li.hoz { margin: 5px; padding: 5px; width: 150px; }
	</style>
{% endblock %}

{% block javascripts %}
	{{ parent() }}
	{% javascripts
					'@DebbConfigBundle/Resources/public/js/jquery-ui.min.js'
					'@DebbManagementBundle/Resources/public/js/chassis.js'
	%}
		<script src="{{ asset_url }}" type="text/javascript"></script>
	{% endjavascripts %}
    <script type="text/javascript">
        var chassisId = {{ form.vars.data.id | default(0) }};
    </script>
{% endblock %}

{% set chassisSizeX = form.vars.data.sizeX %}
{% set chassisSizeY = form.vars.data.sizeY %}

{% block contentExtras %} style="width: {{ chassisSizeX + 38 }}px;"{% endblock %}

{% block form %}
	{%- do form.typspecification.setRendered() -%}
	{%- do form.flowPumps.setRendered -%}
	{{- parent() -}}
	<div id="chassiscontainer" class="row-fluid" style="width: {{ chassisSizeX + 10 }}px;">
		{% if flowPumps|length > 0 -%}
			<div>
				{{ 'Add flow pump' | trans }}:
				<ul class="hoz">
					{% for flowPump in flowPumps %}
						<li class="hoz ui-state-default eDraftRack addFlowPump" style="margin-left: 0px; margin-right: 10px;"><div class="draftRack" flowPumpId="{{ flowPump.id }}" rackx="{{ flowPump.sizeY }}" racky="{{ flowPump.sizeX }}" rackz="{{ flowPump.sizeZ }}" title="{{ flowPump | e }}">{{ flowPump }}</div></li>
					{% endfor %}
				</ul>
			</div>
			<div class="clear"></div>
		{%- endif %}
		<div>
			<a href="#" class="addNode btn btn-small" style="border-bottom-width: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;">{{ 'Add node' | trans }}</a>
		</div>
		<div class="clear"></div>
		<div id="chassisSize">{{ 'size' | trans }}: <span id="chassisSizeX">{{ (chassisSizeX / 1000.0) | number_format(2, '.', '') }}</span>m x <span id="chassisSizeY">{{ (chassisSizeY / 1000.0) | number_format(2, '.', '') }}</span>m</div>

		{% set spaceInfoWidth = 75 %}
		{% set itemtypspecification = item.typspecification %}
		{% if itemtypspecification | keys|default({0: -1}).0 == 0 %}
			{% set itemtypspecification = itemtypspecification | reverse %}
		{% endif %}
		<div id="nodegroupContainer" data-prototype="{{ chassis.typspec(nodetypspecs, form.typspecification.vars.prototype) | e }}" data-prototype-flowpump="{{ chassis.typspec(null, form.flowPumps.vars.prototype) | e }}" style="width: {{ chassisSizeX }}px; height: {{ chassisSizeY }}px;">
			{%- for typspec in form.typspecification -%}
				{{ chassis.typspec(nodetypspecs, typspec, true) }}
			{%- endfor -%}
			{% for flowPump in form.flowPumps %}
				{{ chassis.typspec(null, flowPump, true) }}
			{% endfor %}
		</div>
		<div class="clear"></div>
{'fraction_non_alphanumeric': 0.20669947610731862, 'fraction_numerical': 0.01397047150341324, 'mean_word_length': 4.151267375306623, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4441051', 'n_tokens_mistral': 2667, 'n_tokens_neox': 2240, 'n_words': 453}