Эх сурвалжийг харах

product detail no pictures

Juan Carlos 5 жил өмнө
parent
commit
4bbebb8c9e

+ 8 - 9
marktplatz/templates/marktplatz/product_detail.html

@@ -140,7 +140,6 @@
 
 
 					<div class="image-detail" style="">
-					<!-- <div style="flex: {% get_ratio product.media_set.first %} ; margin:40px 60px 40px 0px; "> -->
 					<img href="{{product.media_set.first.image_big.url}}" align="middle" src="{{product.media_set.first.image_norm.url }}" class="gallery img-fluid img-responsive"  alt="" style="width: 100%;height: auto;vertical-align: middle;">
 
 					</div>
@@ -154,15 +153,16 @@
 					<p>Rechtsform: {{ product.wohnprojekt.rechtsform }}</p>
 					<p>{{ product.wohnprojekt.artmodell }}</p>
 					<p>{{ product.wohnprojekt.orga }}</p>
-					<p>{% if product.wohnprojekt.eigentum  %}{% field_name product.wohnprojekt 'eigentum' %}: {{ product.wohnprojekt.eigentum }}{% endif %}</p>
+					<p>{% if product.wohnprojekt.eigentum  %}{% field_name product.wohnprojekt 'eigentum' %}: {{ product.wohnprojekt.get_eigentum_display }}{% endif %}</p>
 					<p>Gemeinschaftliche Projekte: {{ product.wohnprojekt.gprojekte }}</p>
 					<p>Gemeinschaftsräume: {{ product.wohnprojekt.gemeinschaftr }}
 						{% if product.wohnprojekt.kgemeinschaftr  %} - {{ product.wohnprojekt.kgemeinschaftr }}{% endif %}
 					</p>
 
-					<p>{{ product.wohnprojekt.sonderwohnformen }}</p>
+					<p>{% if product.wohnprojekt.sonderwohnformen  %}{% field_name product.wohnprojekt 'sonderwohnformen' %}: {{ product.wohnprojekt.sonderwohnformen }}{% endif %}</p>
 					<p>Besondere Zielgruppen: {{ product.wohnprojekt.zielgruppen }}</p>
 					<p>Freiraumangebote: {{ product.wohnprojekt.freiraumangebote }}</p>
+					<p>{% if product.wohnprojekt.schwerpunkt  %}{% field_name product.wohnprojekt 'schwerpunkt' %}: {{ product.wohnprojekt.schwerpunkt }}{% endif %}</p>
 					<p>{{ product.wohnprojekt.oekologie }}</p>
 
 
@@ -172,29 +172,28 @@
 
 					<p>{{ product.wohnprojekt.get_altneu_display }}, {{ product.wohnprojekt.bauweise }}</p>
 					<p>Bautr&auml;ger: {{ product.wohnprojekt.bautraeger }}</p>
+					<p>{% if product.wohnprojekt.wohnbaufoerderung  %}{% field_name product.wohnprojekt 'wohnbaufoerderung' %}: {{ product.wohnprojekt.wohnbaufoerderung }}{% endif %}</p>
 					<p>im Haus Wohnen ca {{ product.wohnprojekt.aerwachsene }} Erwachsene und {{  product.wohnprojekt.akinder }} Kinder.
 						Anzahl an Mitglieder: {{ product.wohnprojekt.amitglieder }}
 					</p>
-					<p>{{  product.wohnprojekt.awohnungen  }} Wohnungen</p>
+					<p>{% if product.wohnprojekt.awohnungen  %}{% field_name product.wohnprojekt 'awohnungen' %}: {{  product.wohnprojekt.awohnungen  }} Wohnungen{% endif %}</p>
+					<p>{% if product.wohnprojekt.gaestwohnungen  %}{% field_name product.wohnprojekt 'gaestwohnungen' %}: {{ product.wohnprojekt.gaestwohnungen }}{% endif %}</p>
 					<p>{% if product.wohnprojekt.wohnflaeche  %}{% field_name product.wohnprojekt 'wohnflaeche' %}: {{ product.wohnprojekt.wohnflaeche }}{% endif %}</p>
 			    <p>{% if product.wohnprojekt.gewerbeflaechen  %}{% field_name product.wohnprojekt 'gewerbeflaechen' %}: {{ product.wohnprojekt.gewerbeflaechen }}{% endif %}</p>
 			    <p>{% if product.wohnprojekt.gemeinschaftsflaeche  %}{% field_name product.wohnprojekt 'gemeinschaftsflaeche' %}: {{ product.wohnprojekt.gemeinschaftsflaeche }}{% endif %}</p>
 			    <p>{% if product.wohnprojekt.sonstige_flaechen  %}{% field_name product.wohnprojekt 'sonstige_flaechen' %}: {{ product.wohnprojekt.sonstige_flaechen }}{% endif %}</p>
 			    <p>{% if product.wohnprojekt.flaeche  %}Fläche: {{ product.wohnprojekt.flaeche }}{% endif %}</p>
 					<p>{% if product.wohnprojekt.kflaechen  %}{% field_name product.wohnprojekt 'kflaechen' %}: {{ product.wohnprojekt.kflaechen }}{% endif %}</p>
-					<p>{% if product.wohnprojekt.gaestwohnungen  %}{% field_name product.wohnprojekt 'gaestwohnungen' %}: {{ product.wohnprojekt.gaestwohnungen }}{% endif %}</p>
-					<p>{% if product.wohnprojekt.wohnbaufoerderung  %}{% field_name product.wohnprojekt 'wohnbaufoerderung' %}: {{ product.wohnprojekt.wohnbaufoerderung }}{% endif %}</p>
 					<p>Im Haus arbeiten ca {{ product.wohnprojekt.parbeiten }} Personen {% if product.wohnprojekt.karbeiten  %}{{ product.wohnprojekt.karbeiten }}{% endif %}</p>
 					<p>{% if product.wohnprojekt.raumangebot  %}{% field_name product.wohnprojekt 'raumangebot' %}: {{ product.wohnprojekt.raumangebot }}{% endif %}</p>
 			    <p>{% if product.wohnprojekt.kraumangebot  %}{% field_name product.wohnprojekt 'kraumangebot' %}: {{ product.wohnprojekt.kraumangebot }}{% endif %}</p>
-			    <p>{% if product.wohnprojekt.schwerpunkt  %}{% field_name product.wohnprojekt 'schwerpunkt' %}: {{ product.wohnprojekt.schwerpunkt }}{% endif %}</p>
 
 					<br />
 					<h5 class="black mediumkur">Kontakt</h5>
 					<br />
 
-					<p>{{ product.wohnprojekt.adresse }}</p>
-					<p>{{  product.wohnprojekt.email  }}</p>
+					<p>{{ product.wohnprojekt.adresse }}, {{ product.wohnprojekt.get_ort_display }}</p>
+					<p><a href="mailto:{{  product.wohnprojekt.email  }}">{{  product.wohnprojekt.email  }}</a></p>
 					<p><a href="{{  product.wohnprojekt.website }}">Webseite</a></p>
 
 					<br />

+ 1 - 1
marktplatz/templatetags/tags.py

@@ -42,7 +42,7 @@ def field_name(obj, field):
     # if hasattr(obj, 'model'):
     #     obj = obj.model
 
-    return obj._meta.get_field(field).verbose_name.title().capitalize()
+    return obj._meta.get_field(field).verbose_name