Przeglądaj źródła

mail encoded, pictures cleaned up

Juan Carlos 5 lat temu
rodzic
commit
835faf8197

+ 14 - 6
marktplatz/forms.py

@@ -124,9 +124,9 @@ class SignUpForm(UserCreationForm):
         model = User
         fields = ('username', 'password1', 'password2')
 
-class ProductForm(forms.ModelForm):
+class ProductForm(forms.ModelForm, GeneralFields):
 
-    terms = forms.BooleanField(required=True,  label= ('Ich habe die Teilnahmebedingungen gelesen und akzeptiert.'))
+    # terms = forms.BooleanField(required=True,  label= ('Ich habe die Teilnahmebedingungen gelesen und akzeptiert.'))
     product_fields = ( 'terms', 'name','claim','beschreibung','learning','gruendungsjahr','betriebgenommen','status','adresse','website','email','frei','kfrei','ort','rechtsform','orga','mitmachen','edit','public', )
     product_layout = Layout(
         Fieldset(
@@ -213,7 +213,7 @@ class WohnprojektForm(ProductForm):
 
            Fieldset(
              'Wohnprojekt',
-             'eigentum', 'inseratstext', 'altneu', 'schwerpunkt', 'wohnbaufoerderung', 'artmodell', 'bautraeger',
+             'eigentum',  'altneu', 'schwerpunkt', 'wohnbaufoerderung', 'artmodell', 'bautraeger',
 
               Div(
                   Div('aerwachsene',  css_class='col-sm-6 col-6'),
@@ -232,13 +232,21 @@ class WohnprojektForm(ProductForm):
                 'kflaechen',
              ),
               Div(
-                  Div('gemeinschaftr',  css_class='col-sm-6 col-6'),
-                  Div('raumangebot', css_class='col-sm-6 col-6'),
+                Div('gemeinschaftr',  css_class='col-sm-6 col-6'),
+                Div('raumangebot', css_class='col-sm-6 col-6'),
                 Div('kgemeinschaftr',  css_class='col-sm-6 col-6'),
                 Div('kraumangebot', css_class='col-sm-6 col-6'),
+              css_class='form-row  row'),
+
+              'inseratstext',
+              'sonderwohnformen',
+
+              Div(
+                  Div('parbeiten',  css_class='col-sm-6 col-6'),
+                  Div('karbeiten', css_class='col-sm-6 col-6'),
                   css_class='form-row  row'),
 
-              'sonderwohnformen', 'parbeiten', 'karbeiten', 'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote', 'gaestwohnungen',
+               'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote', 'gaestwohnungen',
 
            )
        )

+ 1 - 1
marktplatz/models.py

@@ -143,7 +143,7 @@ class Product(models.Model):
 
     name            = CharField( 'Name', max_length = 128, help_text="Name des Projekts", null = True, blank=True )
     claim           = CharField( 'Claim / Untertitel', max_length = 256, help_text="Claim / Untertitel", null = True, blank=True )
-    beschreibung    = TextField( 'Beschreibung', max_length = 2048, help_text="Beschreibung des Projektes", null = True, blank=True )
+    beschreibung    = TextField( 'Projektbeschreibung', max_length = 2048, help_text="Beschreibung des Projektes", null = True, blank=True )
     learning        = CharField( 'Learning', max_length = 256, help_text="Learning", null = True, blank=True )
     gruendungsjahr  = IntegerField('Gründungsjahr', help_text="Gründungsjahr des Projekts", validators=[MinValueValidator(0), MaxValueValidator(9999)], null = True, blank=True )
     betriebgenommen = IntegerField('in Betrieb genommen in Jahr', help_text="Wann wurde das Projekt in Betrieb genommen?", validators=[MinValueValidator(0), MaxValueValidator(9999)], null = True, blank=True )

+ 0 - 0
marktplatz/static/MAB_logo.png → marktplatz/static/MAB_logo.png~


BIN
marktplatz/static/logo.png


+ 0 - 0
marktplatz/static/newMAB.png → marktplatz/static/logo.png~


BIN
marktplatz/static/logo_end_card.jpg


BIN
marktplatz/static/logo_end_card.png~


+ 0 - 0
marktplatz/static/logo_MAI.jpg → marktplatz/static/logo_end_card~


BIN
marktplatz/static/main_card_pic.png


+ 8 - 30
marktplatz/templates/marktplatz/add.html

@@ -50,40 +50,18 @@
     </div>
              <div class="col-sm-10">
 
-       <p>Bitte lesen Sie unsere <strong  style="cursor:pointer" data-toggle="modal" data-target="#exampleModalLong">Teilnahmebedingungen</strong></p>
-
-                   <!-- Modal -->
-                    <div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
-                      <div class="modal-dialog" role="document">
-                        <div class="modal-content">
-                          <div class="modal-header">
-                            <h5 class="modal-title" id="exampleModalLongTitle">Teilnahmebedingungen</h5>
-                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-                              <span aria-hidden="true">&times;</span>
-                            </button>
-                          </div>
-                          <div class="modal-body">
-                            <p>Please note that by submitting photos you give us the right to publish them at no costs in the exhibition, in the “media architecture compendium” (iPad and iPhone App available at the Apple App Store), on the mediaarchitecture.org website and in publications related to the exhibition and scientific publications of members of the Media Architecture Institute and you declare that you have the right for publishing and the dissemination of the photos.</p>
-                            <p>Due to technical and organizational constraints, the organizers of the Media Architecture Biennale 2018 reserve the right to determine the actual extent, timing and layout/editing of the above-mentioned publications and documentaries. <p>
-                            <p>The organizers and the sponsors of Media Architecture Biennale desire to make the results of the competition accessible to as large an audience as possible. To achieve this end, a public relations campaign aimed at particular media outlets (press, radio, TV and Internet) will be conducted.<p>
-                            <p>The organizers reserve the right to determine which of the submitted works will be included in the exhibitions and determine which of the submitted works will be awarded. The entrants hereby consent to making their works available for this purpose. <p>
-                            <p>The entrant hereby declares that he/ she is legally authorized to convey such rights to the extent stipulated above, that he/ she has obtained any and all necessary consent from third parties as called for by regulations governing copyright, personal property rights or other such legal provisions, and that he/ she is prepared to provide proof of such at any time if called upon by the organizers of Media Architecture Biennale 2018 to do so. <p>
-                            <p>Additional stipulations with regard to the conveyance of rights within the framework of agreements concluded in conjunction with participation in the exhibition and awards supplement the rights conveyed in this agreement but do not limit them in the absence of an express written agreement to the contrary. <p>
-                            <p>This agreement elaborating the terms of participation is governed by Austrian law with the exception of the United Nations Convention on Contracts for the International Sale of Goods and all norms serving as legal reference (Verweisungsnormen). The place of jurisdiction is Vienna. <p>
-                            <p>The participants convey to the organizers the non-exclusive right free of temporal or geographic restriction to publish or post the submitted works on presently existing video streaming sites such as YouTube, Vimeo, Flickr. <p>
-                          </div>
-                          <div class="modal-footer">
-                            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
-                          </div>
-                        </div>
-                      </div>
-                    </div>
+
              </div>
 
     <div class="col-sm-10" style="margin-bottom: 5px">
+      <br><br>
       <div class="buttonHolder">
-        <input type="submit" name="submit" class=" btn border-dark rounded-0 mybtn" style="margin-right: " value="Save">
-        <input type="submit" name="addImage" class="btn border-dark rounded-0 mybtn" value="Save & Add Media now">
+        <input type="submit" name="submit" class=" btn border-thin mybtn" style="margin-right: " value="Absenden">
+        <span class="">
+          &nbsp;&nbsp;&nbsp;
+        </span>
+        <input type="submit" name="addImage" class="btn border-thin mybtn" value="Absenden & Bilder hochladen">
+        <br><br>
       </div>
     </div>
 

+ 4 - 2
marktplatz/templates/marktplatz/product_detail.html

@@ -3,6 +3,8 @@
 {% load tags %}
 {% load static %}
 {% block script %}
+{% load email_obfuscator %}
+
 <link href="{% static 'featherlight.min.css' %}" type="text/css" rel="stylesheet" />
 <script src="{% static 'featherlight.min.js' %}" type="text/javascript" charset="utf-8"></script>
 <link href="{% static 'featherlight.gallery.min.css' %}" type="text/css" rel="stylesheet" />
@@ -65,7 +67,7 @@
 					<div class="row">
 						<div class="col-sm-4">{% include "marktplatz/modal-share.html" %}</div>
 							<div class="col-sm-4"> {% include "marktplatz/modal-sa.html" %}</div>
-			        <div class="col-sm-4">{% if product.wohnprojekt.email  %} <a href="mailto:{{  product.wohnprojekt.email  }}" class="text-decoration-none" ><i class="fas fa-envelope"></i> {{  product.wohnprojekt.email  }}</a> {% endif %} </div>
+			        <div class="col-sm-4">{% if product.wohnprojekt.email  %} {{ product.wohnprojekt.email | obfuscate_mailto:'<i class="fas fa-envelope"></i> Email'  }}{% endif %}</div>
 			    </div>
 
 					<div class="">
@@ -198,7 +200,7 @@
 
 					<p>{{ product.wohnprojekt.adresse }}, {{ product.wohnprojekt.get_ort_display }}</p>
 
-					{% if product.wohnprojekt.email  %}<p><a href="mailto:{{  product.wohnprojekt.email  }}"><i class="fas fa-envelope"></i> {{  product.wohnprojekt.email  }}</a></p>{% endif %}
+					{% if product.wohnprojekt.email  %}<p>{{ product.wohnprojekt.email | obfuscate_mailto:'<i class="fas fa-envelope"></i> Email'  }}</p>{% endif %}
 					<p><a href="{{  product.wohnprojekt.website }}">Webseite</a></p>
 
 

+ 2 - 1
marktplatz/templates/marktplatz/product_detail_card.html

@@ -3,6 +3,7 @@
 {% load tags %}
 {% load static %}
 {% block script %}
+{% load email_obfuscator %}
 <link href="{% static 'featherlight.min.css' %}" type="text/css" rel="stylesheet" />
 <script src="{% static 'featherlight.min.js' %}" type="text/javascript" charset="utf-8"></script>
 <link href="{% static 'featherlight.gallery.min.css' %}" type="text/css" rel="stylesheet" />
@@ -105,7 +106,7 @@
 
 					<p>{{ product.wohnprojekt.adresse }}, {{ product.wohnprojekt.get_ort_display }}</p>
 
-					{% if product.wohnprojekt.email  %}<p><a href="mailto:{{  product.wohnprojekt.email  }}"><i class="fas fa-envelope"></i> {{  product.wohnprojekt.email  }}</a></p>{% endif %}
+					{% if product.wohnprojekt.email  %}<p>{{ product.wohnprojekt.email | obfuscate_mailto:'<i class="fas fa-envelope"></i> Email'  }}</p>{% endif %}
 					<p><a href="{{  product.wohnprojekt.website }}">Webseite</a></p>
 
 

+ 5 - 2
marktplatz/templatetags/tags.py

@@ -1,4 +1,5 @@
 from PIL import Image
+import re
 
 from django import template
 from django.template.defaulttags import register
@@ -6,8 +7,8 @@ from django.template.defaulttags import register
 from django.conf import settings
 from django.db.models import Avg
 
-register = template.Library()
 from ..models import Product, User, Vote, Media, Contact
+register = template.Library()
 
 
 
@@ -33,6 +34,8 @@ from ..models import Product, User, Vote, Media, Contact
 #     return obj._meta.verbose_name_plural.title()
 
 
+
+
 @register.simple_tag
 def field_name(obj, field):
     '''
@@ -46,7 +49,7 @@ def field_name(obj, field):
 
 
 
-...
+
 @register.filter
 def get_item(dictionary, key):
     return dictionary.get(key)

+ 3 - 2
project_base/settings.py

@@ -111,7 +111,7 @@ SPONSOR_CARDS = """
 <div class="mab-card card border-thin border-0 rounded-0" style="">
     <a href="https://www.mediaarchitecture.org">
         <div style="position: relative;text-align: center;">
-            <img class="card-img-top rounded-0" src="{% static 'logo_MAI.jpg' %}" style=" " alt="image">
+            <img class="card-img-top rounded-0" src="{% static 'logo_end_card.jpg' %}" style=" " alt="image">
         </div>
     </a>
     <div class="card-body" style="padding: 5px">
@@ -156,7 +156,7 @@ MAIN_CARD = """
   <div class="card rounded-0 border-0" style="width: 97%; height: 95%; display:inline-block; margin-top:4px; max-width: 100%">
     <a href="">
       <div style="position: relative;text-align: center;">
-        <img class="card-img-top rounded-0" src="{% static 'MAB_logo.png' %}" alt="image">
+        <img class="card-img-top rounded-0" src="{% static 'main_card_pic.png' %}" alt="image">
         <div style="position: absolute;bottom: 8px;left: 16px;color: white; font-size: medium; font-weight: bold; text-align: left;background-color: rgba(0,0,0,0.21)">Title</div>
       </div>
     </a>
@@ -233,6 +233,7 @@ INSTALLED_APPS = [
     'captcha',
     'debug_toolbar',
     'fullurl',
+     'email_obfuscator',
 
     'project_base.apps.PostOfficeBase',
     'project_base.apps.project_base',

+ 1 - 1
project_base/templates/base_generic.html

@@ -205,7 +205,7 @@
       <!-- <a class=" nav-link active nav-right boldkur mab-menu-elm  " style="" href="{% url 'login' %}">Suchagent</a> -->
     </li>
     <li class="nav-item mab-nav-item mab-menu-mega">
-      <span class=" active boldkur mab-menu-elm" onclick="window.location='{% url 'submit' %}' ">Projekt eintragen</span>
+      <span class=" active boldkur mab-menu-elm" onclick="window.location='{% url 'new-submit-view' %}' ">Projekt eintragen</span>
       <!-- <a class=" nav-link active nav-right boldkur mab-menu-elm " style="" href="{% url 'login' %}">Projekt eintragen</a> -->
     </li>
 

+ 1 - 0
requirements.txt

@@ -17,3 +17,4 @@ django-fullurl==1.1
 sorl-thumbnail==12.6.3
 django-newsletter==3.1.3
 django-tinymce==3.1.0
+django-email-obfuscator==0.1.5