... | ... |
@@ -16,7 +16,7 @@ |
16 | 16 |
|
17 | 17 |
{#<div id="iFrameContainer"></div>#} |
18 | 18 |
|
19 |
-<script src="/bundles/vonrotenbergrealestatelisting/js/pdfmake.min.js"></script> |
|
19 |
+<script src="/bundles/vonrotenbergrealestatelisting/js/pdfmake.js"></script> |
|
20 | 20 |
<script src="/bundles/vonrotenbergrealestatelisting/js/vfs_fonts.js"></script> |
21 | 21 |
|
22 | 22 |
<script> |
... | ... |
@@ -47,7 +47,7 @@ |
47 | 47 |
return [ |
48 | 48 |
{ |
49 | 49 |
stack: [ |
50 |
- { image: '{{ 'bundles/vonrotenbergrealestatelisting/images/pdf_logo.png'|imageDataUrl }}', width: {{ 65|mm2pt }}, alignment: 'center'}, |
|
50 |
+ { image: '{{ 'bundles/vonrotenbergrealestatelisting/images/pdf_logo.png'|imageDataUrl }}', width: {{ 35|mm2pt }}, alignment: 'center'}, |
|
51 | 51 |
], |
52 | 52 |
margin: [{{ 15|mm2pt }},{{ 5|mm2pt }},{{ 15|mm2pt }},0] |
53 | 53 |
}, |
... | ... |
@@ -229,7 +229,7 @@ |
229 | 229 |
}, |
230 | 230 |
], |
231 | 231 |
width: '*', |
232 |
- }, |
|
232 |
+ }{% if item.features is iterable and item.features|length > 0 %}, |
|
233 | 233 |
{ |
234 | 234 |
stack: [ |
235 | 235 |
{ |
... | ... |
@@ -282,7 +282,7 @@ |
282 | 282 |
}, |
283 | 283 |
], |
284 | 284 |
width: '*' |
285 |
- } |
|
285 |
+ }{% endif %} |
|
286 | 286 |
], |
287 | 287 |
margin: [0,0,0,{{ 10|mm2pt }}], |
288 | 288 |
columnGap: {{ 5|mm2pt }}, |
... | ... |
@@ -344,6 +344,7 @@ |
344 | 344 |
iframe.setAttribute('type','application/pdf'); |
345 | 345 |
targetElement.appendChild(iframe); |
346 | 346 |
});*/ |
347 |
- pdfDocGenerator.download('expose_{{ item.assetNo }}'); |
|
347 |
+ pdfDocGenerator.open(); |
|
348 |
+ {#pdfDocGenerator.download('expose_{{ item.assetNo }}');#} |
|
348 | 349 |
// pdfDocGenerator.open({},window); |
349 | 350 |
</script> |
... | ... |
@@ -1,215 +1,182 @@ |
1 |
+{% extends '@Contao/frontend_module/_base.html.twig' %} |
|
2 |
+ |
|
1 | 3 |
{%- macro listEntry(label, value, options = {}) -%} |
2 |
- {%- set class = options.class|default({}) -%} |
|
3 |
- {%- set prepend = options.prepend|default({}) %} |
|
4 |
- {% set append = options.append|default({}) -%} |
|
5 |
- {% apply spaceless %} |
|
6 |
- {% if label and value %} |
|
7 |
- <li{% if class %} class="{{- class -}}"{% endif %}> |
|
8 |
- <span class="label">{{- label -}}</span> |
|
9 |
- <span class="value">{% if prepend %}{{ prepend }}{% endif %}{{- value -}}{% if append %}{{ append }}{% endif %}</span> |
|
10 |
- </li> |
|
11 |
- {% endif %} |
|
12 |
- {% endapply %} |
|
4 |
+ {%- set class = options.class|default({}) -%} |
|
5 |
+ {%- set prepend = options.prepend|default({}) %} |
|
6 |
+ {% set append = options.append|default({}) -%} |
|
7 |
+ {% apply spaceless %} |
|
8 |
+ {% if label and value %} |
|
9 |
+ <li{% if class %} class="{{- class -}}"{% endif %}> |
|
10 |
+ <span class="label">{{- label -}}</span> |
|
11 |
+ <span class="value">{% if prepend %}{{ prepend }}{% endif %}{{- value -}}{% if append %}{{ append }}{% endif %}</span> |
|
12 |
+ </li> |
|
13 |
+ {% endif %} |
|
14 |
+ {% endapply %} |
|
13 | 15 |
{%- endmacro -%} |
14 | 16 |
|
15 |
-<div class="{{ class }} content--element block"{{ cssID }}{% if style is defined and style %} style="{{ style }}"{% endif %}> |
|
16 |
- <div class="custom-contao-container"> |
|
17 | 17 |
|
18 |
- {% block content %} |
|
19 |
- {% import "@ContaoCore/Image/Studio/_macros.html.twig" as studio %} |
|
18 |
+{% block content %} |
|
19 |
+ {% import "@ContaoCore/Image/Studio/_macros.html.twig" as studio %} |
|
20 | 20 |
|
21 |
- <div class="re_asset_expose"> |
|
21 |
+ <div class="re_asset_expose"> |
|
22 | 22 |
|
23 | 23 |
<div class="header clearfix"> |
24 |
- <p class="assetNo">{{ 'tl_vr_real_estate_assets.assetNo.0'|trans({}, 'contao_default') }}: <span class="value">{{ item.assetNo }}</span><span class="hint">(Bei Bewerbung bitte angeben)</span></p> |
|
25 |
- <h1 class="mb-4">{{- item.title -}}{% if item.city %} in {{- item.city -}}{% endif %}</h1> |
|
26 |
- {% if item.address %} |
|
27 |
- <p class="subhead">{{ item.address }}{% if item.floor %}, {{ item.floor }}{% endif %}</p> |
|
28 |
- {% endif %} |
|
24 |
+ <p class="assetNo">{{ 'tl_vr_real_estate_assets.assetNo.0'|trans({}, 'contao_default') }}: |
|
25 |
+ <span class="value">{{ item.assetNo }}</span><span class="hint">(Bei Bewerbung bitte angeben)</span></p> |
|
26 |
+ <h1 class="mb-4">{{- item.title -}}{% if item.city %} in {{- item.city -}}{% endif %}</h1> |
|
27 |
+ {% if item.address %} |
|
28 |
+ <p class="subhead">{{ item.address }}{% if item.floor %}, {{ item.floor }}{% endif %}</p> |
|
29 |
+ {% endif %} |
|
29 | 30 |
</div> |
30 | 31 |
|
31 | 32 |
<div class="row mb-5 clearfix"> |
32 |
- <div class="col-md-6"> |
|
33 |
- {% if item.galleryFigures %} |
|
34 |
- <div class="swiper h-100"> |
|
35 |
- <!-- Additional required wrapper --> |
|
36 |
- <div class="swiper-wrapper"> |
|
37 |
- <!-- Slides --> |
|
38 |
- {% for image in item.galleryFigures %} |
|
39 |
- <div class="swiper-slide"> |
|
40 |
- {{- studio.figure(image, { attr: { class: ('image_container swiper-lazy') }}) -}} |
|
33 |
+ <div class="col-md-6"> |
|
34 |
+ {% if item.galleryFigures %} |
|
35 |
+ <div class="swiper h-100"> |
|
36 |
+ <!-- Additional required wrapper --> |
|
37 |
+ <div class="swiper-wrapper"> |
|
38 |
+ <!-- Slides --> |
|
39 |
+ {% for image in item.galleryFigures %} |
|
40 |
+ <div class="swiper-slide"> |
|
41 |
+ {{- studio.figure(image, { attr: { class: ('image_container swiper-lazy') }}) -}} |
|
42 |
+ </div> |
|
43 |
+ {% endfor %} |
|
44 |
+ </div> |
|
45 |
+ |
|
46 |
+ |
|
47 |
+ {% if item.galleryFigures|length > 1 %} |
|
48 |
+ <div class="swiper-pagination"></div> |
|
49 |
+ <div class="swiper-button-prev"></div> |
|
50 |
+ <div class="swiper-button-next"></div> |
|
51 |
+ {% endif %} |
|
41 | 52 |
</div> |
42 |
- {% endfor %} |
|
43 |
- </div> |
|
44 |
- |
|
45 |
- |
|
46 |
- {% if item.galleryFigures|length > 1 %} |
|
47 |
- <div class="swiper-pagination"></div> |
|
48 |
- <div class="swiper-button-prev"></div> |
|
49 |
- <div class="swiper-button-next"></div> |
|
50 | 53 |
{% endif %} |
51 |
- </div> |
|
52 |
- {% endif %} |
|
53 |
- </div> |
|
54 |
- <div class="col-md-6"> |
|
55 |
- {% if item.floorPlansFigures %} |
|
56 |
- <div class="swiper h-100"> |
|
57 |
- <!-- Additional required wrapper --> |
|
58 |
- <div class="swiper-wrapper"> |
|
59 |
- <!-- Slides --> |
|
60 |
- {% for image in item.floorPlansFigures %} |
|
61 |
- <div class="swiper-slide"> |
|
62 |
- {{- studio.figure(image, { attr: { class: ('image_container swiper-lazy') }}) -}} |
|
54 |
+ </div> |
|
55 |
+ <div class="col-md-6"> |
|
56 |
+ {% if item.floorPlansFigures %} |
|
57 |
+ <div class="swiper h-100"> |
|
58 |
+ <!-- Additional required wrapper --> |
|
59 |
+ <div class="swiper-wrapper"> |
|
60 |
+ <!-- Slides --> |
|
61 |
+ {% for image in item.floorPlansFigures %} |
|
62 |
+ <div class="swiper-slide"> |
|
63 |
+ {{- studio.figure(image, { attr: { class: ('image_container swiper-lazy') }}) -}} |
|
64 |
+ </div> |
|
65 |
+ {% endfor %} |
|
66 |
+ </div> |
|
67 |
+ |
|
68 |
+ |
|
69 |
+ {% if item.floorPlansFigures|length > 1 %} |
|
70 |
+ <div class="swiper-pagination"></div> |
|
71 |
+ <div class="swiper-button-prev"></div> |
|
72 |
+ <div class="swiper-button-next"></div> |
|
73 |
+ {% endif %} |
|
63 | 74 |
</div> |
64 |
- {% endfor %} |
|
65 |
- </div> |
|
66 |
- |
|
67 |
- |
|
68 |
- {% if item.floorPlansFigures|length > 1 %} |
|
69 |
- <div class="swiper-pagination"></div> |
|
70 |
- <div class="swiper-button-prev"></div> |
|
71 |
- <div class="swiper-button-next"></div> |
|
72 | 75 |
{% endif %} |
73 |
- </div> |
|
74 |
- {% endif %} |
|
75 |
- </div> |
|
76 |
+ </div> |
|
76 | 77 |
</div> |
77 | 78 |
|
78 | 79 |
<div class="facts mb-2"> |
79 | 80 |
|
80 |
- <div class="row"> |
|
81 |
- <div class="col-md-6"> |
|
82 |
- <h3 class="mb-3">{{ 'MSC.re_properties'|trans({}, 'contao_default') }}</h3> |
|
83 |
- <div class="p-4 text-primary content--box mb-5" > |
|
84 |
- {% apply spaceless %} |
|
85 |
- <ul class="labelList mb-3"> |
|
86 |
- {% if item.assetNo %} |
|
87 |
- {{ _self.listEntry('tl_vr_real_estate_assets.assetNo.0'|trans({}, 'contao_default'),item.assetNo) }} |
|
88 |
- {% endif %} |
|
89 |
- {% if item.livingSpace %} |
|
90 |
- {{ _self.listEntry('tl_vr_real_estate_assets.livingSpace.0'|trans({}, 'contao_default'),item.livingSpace|number_format(2, ',', ''),{ append: ' m²'}) }} |
|
91 |
- {% endif %} |
|
92 |
- {{ _self.listEntry('tl_vr_real_estate_assets.numberOfRooms.0'|trans({}, 'contao_default'),item.numberOfRooms) }} |
|
93 |
- {% if item.condition %} |
|
94 |
- {% set condition = 'REF.re_condition.' ~ item.condition %} |
|
95 |
- {{ _self.listEntry('tl_vr_real_estate_assets.condition.0'|trans({}, 'contao_default'),condition|trans({}, 'contao_default')) }} |
|
96 |
- {% endif %} |
|
97 |
- {{ _self.listEntry('tl_vr_real_estate_assets.constructionYear.0'|trans({}, 'contao_default'),item.constructionYear) }} |
|
98 |
- </ul> |
|
81 |
+ <div class="row"> |
|
82 |
+ <div class="col-md-6"> |
|
83 |
+ <h3 class="mb-3">{{ 'MSC.re_properties'|trans({}, 'contao_default') }}</h3> |
|
84 |
+ <div class="p-4 text-primary content--box mb-5"> |
|
85 |
+ {% apply spaceless %} |
|
86 |
+ <ul class="labelList mb-3"> |
|
87 |
+ {% if item.assetNo %} |
|
88 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.assetNo.0'|trans({}, 'contao_default'),item.assetNo) }} |
|
89 |
+ {% endif %} |
|
90 |
+ {% if item.livingSpace %} |
|
91 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.livingSpace.0'|trans({}, 'contao_default'),item.livingSpace|number_format(2, ',', ''),{ append: ' m²'}) }} |
|
92 |
+ {% endif %} |
|
93 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.numberOfRooms.0'|trans({}, 'contao_default'),item.numberOfRooms) }} |
|
94 |
+ {% if item.condition %} |
|
95 |
+ {% set condition = 'REF.re_condition.' ~ item.condition %} |
|
96 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.condition.0'|trans({}, 'contao_default'),condition|trans({}, 'contao_default')) }} |
|
97 |
+ {% endif %} |
|
98 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.constructionYear.0'|trans({}, 'contao_default'),item.constructionYear) }} |
|
99 |
+ </ul> |
|
100 |
+ |
|
101 |
+ <ul class="labelList mb-5"> |
|
102 |
+ {% if item.heatingType %} |
|
103 |
+ {% set heating = 'REF.re_heatingType.' ~ item.heatingType %} |
|
104 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.heatingType.0'|trans({}, 'contao_default'),heating|trans({}, 'contao_default')) }} |
|
105 |
+ {% endif %} |
|
106 |
+ {% if item.energyConsumption and item.energyPassType %} |
|
107 |
+ {% set passType = 'REF.re_energyPassType.' ~ item.energyPassType %} |
|
108 |
+ {{ _self.listEntry('MSC.re_energyConsumption'|trans({}, 'contao_default') ~ ' ' ~ passType|trans({}, 'contao_default'),item.energyConsumption,{ append: ' kWh/(m²a)'}) }} |
|
109 |
+ {% endif %} |
|
110 |
+ </ul> |
|
111 |
+ |
|
112 |
+ <h5>{{ 'MSC.re_rent'|trans({}, 'contao_default') }}</h5> |
|
113 |
+ <ul class="labelList mb-3"> |
|
114 |
+ {% if item.coldRent > 0 %} |
|
115 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.coldRent.0'|trans({}, 'contao_default'),item.coldRent|number_format(2, ',', ''),{ append: ' €'}) }} |
|
116 |
+ {% else %} |
|
117 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.rent.0'|trans({}, 'contao_default'),item.rent|number_format(2, ',', ''),{ append: ' €'}) }} |
|
118 |
+ {% endif %} |
|
119 |
+ {% if item.advanceOperatingCosts > 0 %} |
|
120 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.advanceOperatingCosts.0'|trans({}, 'contao_default'),item.advanceOperatingCosts|number_format(2, ',', ''),{ append: ' €'}) }} |
|
121 |
+ {% endif %} |
|
122 |
+ {% if item.heatingCosts > 0 %} |
|
123 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.heatingCosts.0'|trans({}, 'contao_default'),item.heatingCosts|number_format(2, ',', ''),{ append: ' €'}) }} |
|
124 |
+ {% endif %} |
|
125 |
+ </ul> |
|
126 |
+ |
|
127 |
+ <ul class="labelList mb-3"> |
|
128 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.cooperativeShares.0'|trans({}, 'contao_default'),item.cooperativeShares) }} |
|
129 |
+ {{ _self.listEntry('tl_vr_real_estate_assets.availability.0'|trans({}, 'contao_default'),item.availableFrom) }} |
|
130 |
+ </ul> |
|
131 |
+ |
|
132 |
+ <ul class="labelList"> |
|
133 |
+ {{ _self.listEntry('MSC.re_deadline'|trans({}, 'contao_default'),item.deadline) }} |
|
134 |
+ </ul> |
|
135 |
+ {% endapply %} |
|
99 | 136 |
|
100 |
- <ul class="labelList mb-5"> |
|
101 |
- {% if item.heatingType %} |
|
102 |
- {% set heating = 'REF.re_heatingType.' ~ item.heatingType %} |
|
103 |
- {{ _self.listEntry('tl_vr_real_estate_assets.heatingType.0'|trans({}, 'contao_default'),heating|trans({}, 'contao_default')) }} |
|
104 |
- {% endif %} |
|
105 |
- {% if item.energyConsumption and item.energyPassType %} |
|
106 |
- {% set passType = 'REF.re_energyPassType.' ~ item.energyPassType %} |
|
107 |
- {{ _self.listEntry('MSC.re_energyConsumption'|trans({}, 'contao_default') ~ ' ' ~ passType|trans({}, 'contao_default'),item.energyConsumption,{ append: ' kWh/(m²a)'}) }} |
|
108 |
- {% endif %} |
|
109 |
- </ul> |
|
110 |
- |
|
111 |
- <h5>{{ 'MSC.re_rent'|trans({}, 'contao_default') }}</h5> |
|
112 |
- <ul class="labelList mb-3"> |
|
113 |
- {% if item.coldRent > 0 %} |
|
114 |
- {{ _self.listEntry('tl_vr_real_estate_assets.coldRent.0'|trans({}, 'contao_default'),item.coldRent|number_format(2, ',', ''),{ append: ' €'}) }} |
|
115 |
- {% else %} |
|
116 |
- {{ _self.listEntry('tl_vr_real_estate_assets.rent.0'|trans({}, 'contao_default'),item.rent|number_format(2, ',', ''),{ append: ' €'}) }} |
|
117 |
- {% endif %} |
|
118 |
- {% if item.advanceOperatingCosts > 0 %} |
|
119 |
- {{ _self.listEntry('tl_vr_real_estate_assets.advanceOperatingCosts.0'|trans({}, 'contao_default'),item.advanceOperatingCosts|number_format(2, ',', ''),{ append: ' €'}) }} |
|
120 |
- {% endif %} |
|
121 |
- {% if item.heatingCosts > 0 %} |
|
122 |
- {{ _self.listEntry('tl_vr_real_estate_assets.heatingCosts.0'|trans({}, 'contao_default'),item.heatingCosts|number_format(2, ',', ''),{ append: ' €'}) }} |
|
123 |
- {% endif %} |
|
124 |
- </ul> |
|
125 |
- |
|
126 |
- <ul class="labelList mb-3"> |
|
127 |
- {{ _self.listEntry('tl_vr_real_estate_assets.cooperativeShares.0'|trans({}, 'contao_default'),item.cooperativeShares) }} |
|
128 |
- {{ _self.listEntry('tl_vr_real_estate_assets.availability.0'|trans({}, 'contao_default'),item.availableFrom) }} |
|
129 |
- </ul> |
|
137 |
+ </div> |
|
138 |
+ </div> |
|
130 | 139 |
|
131 |
- <ul class="labelList"> |
|
132 |
- {{ _self.listEntry('MSC.re_deadline'|trans({}, 'contao_default'),item.deadline) }} |
|
133 |
- </ul> |
|
134 |
- {% endapply %} |
|
140 |
+ <div class="col-md-6"> |
|
141 |
+ {% if item.description %} |
|
142 |
+ <h3 class="mb-3">{{ 'MSC.re_description'|trans({}, 'contao_default') }}</h3> |
|
143 |
+ <div class="p-4 text-primary content--box mb-5"> |
|
144 |
+ <div class="description">{{ item.description|raw }}</div> |
|
145 |
+ </div> |
|
146 |
+ {% endif %} |
|
135 | 147 |
|
136 |
- </div> |
|
137 |
- </div> |
|
148 |
+ {% if item.features %} |
|
149 |
+ <h3 class="mb-3">{{ 'MSC.re_features'|trans({}, 'contao_default') }}</h3> |
|
150 |
+ <div class="p-4 text-primary content--box mb-5"> |
|
151 |
+ <ul class="checkList"> |
|
152 |
+ {% for feature in item.features %} |
|
153 |
+ {% set featureTrans = 'REF.re_features.' ~ feature %} |
|
154 |
+ <li>{{ featureTrans|trans({}, 'contao_default') }}</li> |
|
155 |
+ {% endfor %} |
|
156 |
+ </ul> |
|
157 |
+ </div> |
|
158 |
+ {% endif %} |
|
138 | 159 |
|
139 |
- <div class="col-md-6"> |
|
140 |
- {% if item.description %} |
|
141 |
- <h3 class="mb-3">{{ 'MSC.re_description'|trans({}, 'contao_default') }}</h3> |
|
142 |
- <div class="p-4 text-primary content--box mb-5"> |
|
143 |
- <div class="description">{{ item.description|raw }}</div> |
|
144 |
- </div> |
|
145 |
- {% endif %} |
|
146 |
- |
|
147 |
- {% if item.features %} |
|
148 |
- <h3 class="mb-3">{{ 'MSC.re_features'|trans({}, 'contao_default') }}</h3> |
|
149 |
- <div class="p-4 text-primary content--box mb-5"> |
|
150 |
- <ul class="checkList"> |
|
151 |
- {% for feature in item.features %} |
|
152 |
- {% set featureTrans = 'REF.re_features.' ~ feature %} |
|
153 |
- <li>{{ featureTrans|trans({}, 'contao_default') }}</li> |
|
154 |
- {% endfor %} |
|
155 |
- </ul> |
|
156 | 160 |
</div> |
157 |
- {% endif %} |
|
158 |
- |
|
159 | 161 |
</div> |
160 |
- </div> |
|
161 | 162 |
|
162 | 163 |
</div> |
163 | 164 |
|
164 | 165 |
<div class="row actions"> |
165 |
- <div class="col-md-6 order-last order-md-first"> |
|
166 |
- <a class="btn btn-outline-primary" href="{{ item.listUrl }}">Zurück zur Übersicht</a> |
|
167 |
- </div> |
|
168 |
- <div class="col-md-6 text-end order-first order-md-last"> |
|
169 |
- {% if formURL %} |
|
170 |
- <a class="btn btn-secondary" href="{{ formURL }}" target="_blank">Jetzt bewerben</a> |
|
171 |
- {% endif %} |
|
172 |
- <a class="btn btn-primary" href="{{ item.pdfUrl }}">Exposé downloaden</a> |
|
173 |
- </div> |
|
166 |
+ <div class="col-md-6 order-last order-md-first"> |
|
167 |
+ <a class="btn btn-outline-primary" href="{{ item.listUrl }}">Zurück zur Übersicht</a> |
|
168 |
+ </div> |
|
169 |
+ <div class="col-md-6 text-end order-first order-md-last"> |
|
170 |
+ {% if formURL %} |
|
171 |
+ <a class="btn btn-secondary" href="{{ formURL }}" target="_blank">Jetzt bewerben</a> |
|
172 |
+ {% endif %} |
|
173 |
+ <a class="btn btn-primary" href="{{ item.pdfUrl }}">Exposé downloaden</a> |
|
174 |
+ </div> |
|
174 | 175 |
</div> |
176 |
+ </div> |
|
177 |
+{{ dump(pdfJs|raw) }} |
|
175 | 178 |
|
176 |
- |
|
177 |
- </div> |
|
178 |
- {% endblock %} |
|
179 |
- |
|
180 |
- </div> |
|
181 |
-</div> |
|
182 |
- |
|
183 |
-<script> |
|
184 |
- if ($('.swiper:not(.custom)').length) { |
|
185 |
- const basicSlider = () => { |
|
186 |
- let basicSliders = document.querySelectorAll('.swiper:not(.custom)') |
|
187 |
- let prevArrow = document.querySelectorAll('.swiper:not(.custom) > .swiper-button-prev') |
|
188 |
- let nextArrow = document.querySelectorAll('.swiper:not(.custom) > .swiper-button-next') |
|
189 |
- let pagination = document.querySelectorAll('.swiper:not(.custom) >.swiper-pagination') |
|
190 |
- basicSliders.forEach((slider, index) => { |
|
191 |
- let prevArrow = slider.querySelector('.swiper-button-prev'); |
|
192 |
- let nextArrow = slider.querySelector('.swiper-button-next'); |
|
193 |
- let pagination = slider.querySelector('.swiper-pagination'); |
|
194 |
- const swiper = new Swiper(slider, { |
|
195 |
- direction: 'horizontal', |
|
196 |
- loop: true, |
|
197 |
- preloadImages: false, |
|
198 |
- lazy: true, |
|
199 |
- navigation: { |
|
200 |
- // the 'index' bit below is just the order of the class in the queryselectorAll array, so the first one would be NextArrow[0] etc |
|
201 |
- nextEl: nextArrow, |
|
202 |
- prevEl: prevArrow, |
|
203 |
- }, |
|
204 |
- pagination: { |
|
205 |
- el: pagination, |
|
206 |
- clickable: true |
|
207 |
- } |
|
208 |
- }); |
|
209 |
- }) |
|
210 |
- } |
|
211 |
- window.addEventListener('load', basicSlider) |
|
212 |
- } |
|
213 |
-</script> |
|
214 |
- |
|
215 |
-{{ pdfJs|raw }} |
|
179 |
+ {% add "re_reader_pdf" to body %} |
|
180 |
+ {#{% if pdfJs is defined %}{{ pdfJs|raw }}{% endif %}#} |
|
181 |
+ {% endadd %} |
|
182 |
+{% endblock %} |
... | ... |
@@ -10,7 +10,9 @@ |
10 | 10 |
namespace vonRotenberg\RealEstateListingBundle\Controller\FrontendModule; |
11 | 11 |
|
12 | 12 |
use Contao\CoreBundle\DependencyInjection\Attribute\AsFrontendModule; |
13 |
+use Contao\CoreBundle\Exception\ResponseException; |
|
13 | 14 |
use Contao\CoreBundle\Twig\FragmentTemplate; |
15 |
+use Contao\Input; |
|
14 | 16 |
use vonRotenberg\RealEstateListingBundle\Model\RealEstateAssetsModel; |
15 | 17 |
use Contao\Controller; |
16 | 18 |
use Contao\CoreBundle\Image\Studio\Studio; |
... | ... |
@@ -49,10 +51,10 @@ class RealEstateAssetsReaderController extends RealEstateAssetsModuleController |
49 | 51 |
// Set the item from the auto_item parameter |
50 | 52 |
if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) |
51 | 53 |
{ |
52 |
- \Input::setGet('items', \Input::get('auto_item')); |
|
54 |
+ Input::setGet('items', Input::get('auto_item')); |
|
53 | 55 |
} |
54 | 56 |
|
55 |
- $this->asset = RealEstateAssetsModel::findPublishedById(\Input::get('items')); |
|
57 |
+ $this->asset = RealEstateAssetsModel::findPublishedById(Input::get('items')); |
|
56 | 58 |
|
57 | 59 |
if ($this->asset === null) |
58 | 60 |
{ |
... | ... |
@@ -67,7 +69,7 @@ class RealEstateAssetsReaderController extends RealEstateAssetsModuleController |
67 | 69 |
// ->setLightboxGroupIdentifier('lb' . $model->id); |
68 | 70 |
|
69 | 71 |
$arrItem = array_merge($this->asset->row(), [ |
70 |
- 'features' => StringUtil::deserialize($this->asset->features), |
|
72 |
+ 'features' => StringUtil::deserialize($this->asset->features,true), |
|
71 | 73 |
'availableFrom' => ($this->asset->availability == 'immediately' ? $this->translator->trans('REF.re_availability.immediately', [], 'contao_default') : Date::parse(Date::getNumericDateFormat(), $this->asset->availableFrom)), |
72 | 74 |
'deadline' => ($this->asset->stop > 0 ? Date::parse(Date::getNumericDateFormat(), $this->asset->stop) : ''), |
73 | 75 |
'teaserFigure' => $this->getImageFigures($this->asset->gallerySRC, $figureBuilder, $this->asset->orderSRC, 1), |
... | ... |
@@ -86,6 +88,7 @@ class RealEstateAssetsReaderController extends RealEstateAssetsModuleController |
86 | 88 |
// echo $PDF->parse(); |
87 | 89 |
$response = $PDF->getResponse(); |
88 | 90 |
$template->pdfJs = $response->getContent(); |
91 |
+ throw new ResponseException($response); |
|
89 | 92 |
// echo $response->getContent(); |
90 | 93 |
// exit; |
91 | 94 |
} |