Juan Carlos před 5 roky
rodič
revize
364b6bb545

+ 1 - 1
marktplatz/signals.py

@@ -15,7 +15,7 @@ from .models import *
 @receiver(post_save, sender=Product)
 @receiver(post_save, sender=Wohnprojekt)
 def search_agent(sender, instance, update_fields=None, **kwargs):
-    print("signal called")
+    # print("signal called")
     if update_fields is not None:
         if 'frei' in update_fields:
             if instance.frei == 'JAJA' :

+ 10 - 1
marktplatz/templates/marktplatz/modal-share.html

@@ -77,7 +77,16 @@
         <div class=""> &nbsp; </div>
         <div class=""> &nbsp; </div>
 
-        <input type="text" value="{% fullurl 'product-detail-embed' pk=product.wohnprojekt.pk %}" id="myInput">
+
+
+
+        <input type="text" value="&lt;iframe src=&quot;{% fullurl 'product-detail-embed' pk=product.wohnprojekt.pk %}&quot; style=&quot;border:0px #ffffff none;&quot; name=&quot;myiFrame&quot; scrolling=&quot;yes&quot; frameborder=&quot;0&quot; marginheight=&quot;0px&quot; marginwidth=&quot;0px&quot; height=&quot;400px&quot; width=&quot;600px&quot; allowfullscreen&gt;&lt;/iframe&gt;" id="myInput">
+
+        <div class=""> &nbsp; </div>
+        <div class=""> <span>Link</span> </div>
+
+        <input type="text" value="{% fullurl 'product-detail-embed' pk=product.wohnprojekt.pk %}" id="myLink">
+
         <div class=""> &nbsp; </div><div class=""> &nbsp; </div>
 
       </div>

+ 40 - 5
marktplatz/templates/marktplatz/product_overview.html

@@ -144,7 +144,7 @@ $(document).ready(function(){
 
 
 
-  .mab-Product-title {
+  .mab-product-title {
 
     position: absolute;
     bottom: 8px;
@@ -158,7 +158,35 @@ $(document).ready(function(){
 
   }
 
-  .mab-Product-vote {
+
+  .mab-product-button-text {
+  	color: #000;
+  	font-size: large;
+  	font-weight: bold;
+  	text-align: left;
+  	/* background-color: rgba(0, 0, 0, 0); */
+  	/* text-shadow: 0 0 6px #444, 0 0 20px #888; */
+  	vertical-align: bottom;
+  	top: 50%;
+  	left: 50%;
+  	transform: translate(-50%, -50%);
+  	position: inherit;
+  }
+
+    .mab-product-button {
+
+      position: absolute;
+      top: 16px;
+      left: 16px;
+      background-color: #FFF;
+      border: 2px solid #000;
+      border-radius: 50%;
+      width: 5em;
+      height: 5em;
+      text-align: center;
+  }
+
+  .mab-product-vote {
 
     position: absolute;
     top: 8px;
@@ -172,10 +200,12 @@ $(document).ready(function(){
     color: black;
     margin-top: 0px;
 }
-    .mab-card-highlight {
+  .card-columns   .mab-card-highlight {
 
-      background-color: #f0faf0;
+  /*    background-color: #f0faf0; */
 
+  box-shadow: 0 4px 8px 0 rgba(157, 255, 137, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+  margin-bottom: 40px;
     }
 
 
@@ -273,11 +303,16 @@ $(document).ready(function(){
   {% for product in wohnprojekt_list %}
 
 
-  <div class="mab-card  {{product.ort}} {{product.status}} {{product.frei}} {{product.altneu}} {% if product.frei == 'JAJA' %} mab-card-highlight {% endif %} card rounded-0 border-0 " style="">
+  <div class="mab-card  {{product.ort}} {{product.status}} {{product.frei}} {{product.altneu}} card rounded-0 border-0 {% if product.frei == 'JAJA' %} mab-card-highlight {% endif %}" style="">
     <a href="{% url 'product-detail' product.pk %}">
       <div style="position: relative;text-align: center;">
         <img class="{% if user.is_authenticated %}{% get_vote_class product user %} {% endif %} {% for category in product.category.all %} {{category.short_name}} {% endfor %} card-img-top rounded-0" src="{{product.media_set.first.image_norm.url}}" alt="image">
         <div class="mab-product-title" style="">{{product.name|upper }}</div>
+
+        {% if product.frei == 'JAJA' %} <div class="mab-product-button" style="">  <div class="mab-product-button-text">
+            Platz Frei!
+        </div>
+      </div> {% endif %}
         {% if user.is_authenticated %}
         <div class="mab-product-vote" style="">{% get_vote product user %}</div>
         {% endif %}

+ 2 - 1
marktplatz/views.py

@@ -149,8 +149,9 @@ class ProductsView(generic.ListView):
         if user.is_superuser:
             return qs
 
+        qs = qs.filter(public = True)
 
-        return qs.filter(public = True)
+        return qs
 
     def get_context_data(self, **kwargs):
             context = super().get_context_data(**kwargs)