Commits

Viktor Nagy committed c351c64 Merge with conflicts

Merge branch 'develop'

Conflicts:
django-mailchimp

Comments (0)

Files changed (17)

jalagati/jalagati_home/__init__.py

Empty file added.

jalagati/jalagati_home/admin.py

+from django.contrib import admin
+from . import models
+
+admin.site.register(models.HomepageBox)
+admin.site.register(models.HomepageRow)
+admin.site.register(models.HomepageQuote)

jalagati/jalagati_home/models.py

+from django.db import models
+
+# Create your models here.
+
+class HomepageBox(models.Model):
+    title = models.CharField(max_length=255)
+    content = models.TextField()
+    order = models.IntegerField()
+    created_on = models.DateTimeField(auto_now_add=True)
+
+    class Meta():
+        ordering = ["order"]
+        verbose_name_plural = "homepage boxes"
+
+    def __unicode__(self):
+        return self.title
+
+
+class HomepageRow(models.Model):
+    title = models.CharField(max_length=255)
+    content = models.TextField()
+    order = models.IntegerField()
+    created_on = models.DateTimeField(auto_now_add=True)
+
+    class Meta():
+        verbose_name_plural = "homepage rows"
+
+    def __unicode__(self):
+        return self.title
+
+class HomepageQuote(models.Model):
+    content = models.TextField()
+    active = models.BooleanField()
+
+    class Meta():
+        verbose_name_plural = "homepage quotes"
+
+    def __unicode__(self):
+        return self.content

jalagati/jalagati_home/processors.py

+from . import models
+
+
+def add_homepage_models_to_context(request):
+    '''
+    This plugin context processor adds the homepage models to context.
+    '''
+    boxes = models.HomepageBox.objects.all()
+    rows = models.HomepageRow.objects.all()
+    quotes = models.HomepageQuote.objects.filter(active=True)
+    return {'boxes': boxes, 'rows': rows, 'quotes': quotes}

jalagati/jalagati_home/static/css/homepage_style.css

+.wrap-left{
+    float: left;
+    width: 30%;
+}
+
+.wrap-center{
+    float: left;
+    margin-left: 3%;
+}
+
+.wrap-right{
+    float: right;
+    width: 25%;
+}
+
+/*The tyle of the news column*/
+.wrap-left ul{
+    margin-left: 0;
+}
+
+.wrap-left li{
+    padding-bottom: 0.2em;
+}
+
+/*The featured quote*/
+#featured{
+    background-color: none;
+}
+
+/*The signup form*/
+.wrap-right form p{
+    margin-bottom: 0;
+}
+
+.wrap-right form input{
+    height: 0.5em;
+}
+
+/*Timetable styles*/
+.timetable{
+    width: 100%;
+}
+.timetable td,
+.timetable th{
+    border: 1px solid #bbb;
+    padding: 10px;
+    background: rgba(200, 200, 200, 0.1);
+    text-align: center;
+}
+
+.timetable td:hover{
+    background: rgba(200, 200, 200, 0.3);
+    cursor: pointer;
+}
+.timetable td:hover .time{
+    font-weight: bold;
+}
+
+.timetable .empty,
+.timetable .empty:hover{
+    background: rgba(200, 200, 200, 0.5);
+}
+
+.timetable th{
+    font-weight: bold;
+     background: rgba(255, 255, 255, 0.7);  
+}

jalagati/jalagati_home/tests.py

+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+    def test_basic_addition(self):
+        """
+        Tests that 1 + 1 always equals 2.
+        """
+        self.assertEqual(1 + 1, 2)

jalagati/settings.py

     'sekizai.context_processors.sekizai',
     'zinnia.context_processors.version',
     'app.context_processors.site',
+    'jalagati_home.processors.add_homepage_models_to_context'
 )
 
 ROOT_URLCONF = 'urls'
     'easy_thumbnails',
     'filer',
     'facebook_comments',
-    'facebook_gallery',
+    #'facebook_gallery',
     'cmsplugin_facebook_gallery',
     'mailchimp',
+    'image_gallery',
 
     'zinnia',
     'cmsplugin_zinnia',
     'cmsplugin_filer_teaser',
     'cmsplugin_filer_video',
     'cmsplugin_guestbook',
+    'cmsplugin_contact',
+    
 
-#      'cmsplugin_faq',
+     #'cmsplugin_faq',
     'simple_open_graph',
      'app',
+    'jalagati_home',
 )
 
+FILLER_ENABLE_PERMISION = True
+
+
 # A sample logging configuration. The only tangible logging
 # performed by this configuration is to send an email to
 # the site admins on every HTTP 500 error when DEBUG=False.
 #    ('template_1.html', 'Template One'),
     ('template_w_sidebar.html', 'Template With Sidebar'),
     ('home.html', 'Home Page'),
+    ('template_full_width.html', 'Full Width Template'),
+    ('template_full_width_w_contact.html', 'Full Width Template with Contact Form')
 )
 
 CMS_SOFTROOT = True
 CMS_SEO_FIELDS = True
 
+
 CMS_LANGUAGES = LANGUAGES = [
     ('en', 'English'),
     ('hu', 'Magyar'),
 
 ZINNIA_ENTRY_BASE_MODEL = 'cmsplugin_zinnia.placeholder.EntryPlaceholder'
 
+FILLER_ENABLE_PERMISION = True
+
 THUMBNAIL_PROCESSORS = (
     'easy_thumbnails.processors.colorspace',
     'easy_thumbnails.processors.autocrop',

jalagati/templates/base.html

     <![endif]-->
 	<link rel="stylesheet" href="{{ STATIC_URL }}css/jquery.maximage.min.css">
     <link href="{{ STATIC_URL }}css/lightbox.css" rel="stylesheet" />
-	<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css">
+    <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css">
+	<link rel="stylesheet" href="{{ STATIC_URL }}css/homepage_style.css">
 	{% endaddtoblock %}
     <script>var _gaq=[['_setAccount','UA-36119599-1'],['_setDomainName','jalagati.hu'], ['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=true;g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'))</script>
     <script type="text/javascript" src="{{ STATIC_URL }}js/swfobject.js"></script>
 </head>
 <body class="{% block body_class %}{%endblock%}">
-<div class="container">
-    <div class="row">
-        <div id="logo-wrapper" class="span3">
-            <h1><a href="/">Jalagati Yoga Club</a></h1>
-        </div>
-        <div class="navbar offset3">
-            <div class="navbar-inner">
-                <div class="container">
-                    <div class="navbar-collapse">
-                    <ul id="top-menu" class="nav">
-                        {% show_menu 0 1 1 %}
-                    </ul>
-                    {% language_chooser %}
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div id="featured" class="offset6 span3"></div>
-    </div>
-</div>
-<div id="mainwrap" class="container">
-    {% block base_content%}{% endblock %}
-</div>
-<footer class="container">
-    <div class="row">
-        <div class="span12">
-            &copy; 2008-2012, Jalagati Jóga Egyesület
-        </div>
-    </div>
-</footer>
-<div id="maximage">
-<!--		<img src="{{ STATIC_URL }}img/bg/zup.png" alt="">
-<img src="{{ STATIC_URL }}img/bg/1.jpg" alt="">
-	<img src="{{ STATIC_URL }}img/bg/2.jpg" alt="">-->
+<div id="topbg">
+	<div id="fejlec_light">
+		<div id="fejlec" class="container">
+			<div class="row">
+				<div id="logo-wrapper" class="span3">
+					<h1><a href="/">Jalagati Yoga Club</a></h1>
+				</div>
+				<div class="navbar offset3">
+					<div class="navbar-inner">
+						<div class="container">
+							<div class="navbar-collapse">
+							<ul id="top-menu" class="nav">
+								 {% show_menu 0 3 3 3%}
+							</ul>
+							{% language_chooser %}
+							</div>
+						</div>
+					</div>
+				</div>
+				<div id="featured" class="span9"><q>{% autoescape off %}{{ quotes.0.content }}{% endautoescape %}</q></div>
+			</div>
+		</div>
+		<div id="mainwrap" class="container">
+			{% block base_content%}{% endblock %}
+		</div>
+		<footer class="container">
+			<div class="row">
+				<div class="span12">
+					&copy; 2008-{% now "Y" %} - Jalagati Jóga Egyesület
+				</div>
+			</div>
+		</footer>
+		<div id="maximage">
+		<!--		<img src="{{ STATIC_URL }}img/bg/zup.png" alt="">
+		<img src="{{ STATIC_URL }}img/bg/1.jpg" alt="">
+			<img src="{{ STATIC_URL }}img/bg/2.jpg" alt="">-->
+		</div>
+	</div>
 </div>
 {% block script %}{% endblock %}
 {% render_block "js" %}

jalagati/templates/home.html

 {% extends "base.html" %}
-{% load cms_tags sekizai_tags %}
+{% load cms_tags sekizai_tags zinnia_tags %}
 {% load chimptags %}
 
 {% addtoblock "js" %}
 {% block body_class %}home{% endblock %}
 
 {% block base_content %}
-<div id="maincontent" class="row">
-	<div id="home1" class="span4 contentarea">
-		<section>{% placeholder column_1 %}</section>
+<div id="maincontent" class="row box_row">
+	<div id="home_box1" class="span4 home_box contentarea">
+		<section>{% autoescape off %}{{ boxes.0.content }}{% endautoescape %}</section>
 	</div>
-	<div id="home2" class="span4 contentarea">
-		<section>{% placeholder column_2 %}</section>
+	<div id="home_box2" class="span4 home_box contentarea">
+		<section>{% autoescape off %}{{ boxes.1.content }}{% endautoescape %}</section>
 	</div>
-	<div id="home3" class="span4 contentarea">
-		<section>{% placeholder column_3 %}</section>
+	<div id="home_box3" class="span4 home_box contentarea">
+		<section><div class="hirek-div">{% get_recent_entries 2 %}</div>{% autoescape off %}{{ boxes.2.content }}{% endautoescape %}</section>
 	</div>
 </div>
 <div id="articles" class="row">
-	<div class="span9 contentarea">
-		<section>{% placeholder bottom_content %}</section>
+	<div class="span12 contentarea">
+		<section>
+			<div class="before-wrap">
+				{% placeholder before_wrap_content %}
+			</div>
+			<div class="wrapper">
+				<div class="wrap-center fb-iframe">
+					<h3>Kövess minket!</h3>
+					<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fjalagati%3Ffref%3Dts&amp;width=550&amp;height=258&amp;show_faces=true&amp;colorscheme=light&amp;stream=false&amp;border_color&amp;header=false&amp;appId=526763937382411" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height:258px;" allowTransparency="true"></iframe>
+				</div>
+				<div class="wrap-right">
+					{% placeholder wrap_right %}
+				</div>
+			</div>
+			<div class="after-wrap" style="clear: both">
+				{% placeholder after_wrap_content %}
+			</div>
+		</section>
 	</div>
-	<aside class="span3 contentarea">
-		<div class="wrapper">
-		{% placeholder sidebar %}
-		</div>
-	</aside>
 </div>
-{% endblock %}
+{% endblock %}

jalagati/templates/mailchimp/subscribe.html

 <h3>Hírlevél</h3>
 <form action="{% url 'mailchimp:subscribe' %}" method="post">{% csrf_token %}
 {{ form.as_p }}
-<button type="submit">{%trans "Submit" %}</button>
+<button type="submit">{%trans "Feliratkozom" %}</button>
 </form>

jalagati/templates/template_full_width.html

+{% extends "base.html" %}
+{% load menu_tags cms_tags %}
+
+{% block base_content %}
+<div class="row">
+<div id="maincontent" class="span12 contentarea" style="margin-top: 0">
+    <section>{%block content%}{% placeholder base_content %}{%endblock%}</section>
+</div>
+</div>
+{% endblock %}

jalagati/templates/template_full_width_w_contact.html

+{% extends "base.html" %}
+{% load menu_tags cms_tags %}
+
+{% block base_content %}
+<div class="row">
+<div id="maincontent" class="span12 contentarea" style="margin-top: 0">
+    <section>{%block content%}{% placeholder base_content %}{%endblock%}</section>
+    <section>
+        <hr>
+        <h3>Lépj kapcsolatba velünk!</h3>
+        {%block contact %}{% placeholder contact_form %}{%endblock%}
+    </section>
+</div>
+</div>
+{% endblock %}

jalagati/templates/zinnia/_entry_detail.html

-{% load tagging_tags comments i18n %}
-{% load fb_comments %}
+{% load tagging_tags i18n %}
 
 {% load url from future %}
 <div id="entry-{{ object.pk }}" class="hentry{% if object.featured %} featured{% endif %}">
 
   <div class="entry-footer">
     <p class="entry-info">
-      {% blocktrans with date=object.creation_date|date:"DATE_FORMAT" abbr_date=object.creation_date|date:"c" %}Published on <abbr class="published" title="{{ abbr_date }}">{{date}}</abbr>{% endblocktrans %}
       {% if object.categories.count %}
       {% trans "Kategória:" %}
       {% for category in object.categories.all %}
       {% endfor %}
     </ul>
     {% endif %}
-
-    <p class="entry-comments">
-      {% if object.comment_enabled %}
-      {% fb_comments width="680" include_cached_comments no_scripts %}
-      {% else %}
-      {% trans "Comments are closed" %}
-      {% endif %}
-      {% with pingback_count=object.pingbacks.count %}
-      {% if pingback_count %}
-      , <a href="{{ object.get_absolute_url }}#pingbacks" title="{% blocktrans with object=object.title %}Pingbacks on {{ object }}{% endblocktrans %}">
-        {% blocktrans count pingback_count=pingback_count %}{{ pingback_count }} pingback{% plural %}{{ pingback_count }} pingbacks{% endblocktrans %}
-      </a>
-      {% endif %}
-      {% endwith %}
-      {% with trackback_count=object.trackbacks.count %}
-      {% if trackback_count %}
-      , <a href="{{ object.get_absolute_url }}#trackbacks" title="{% blocktrans with object=object.title %}Trackbacks on {{ object }}{% endblocktrans %}">
-        {% blocktrans count trackback_count=trackback_count %}{{ trackback_count }} trackback{% plural %}{{ trackback_count }} trackbacks{% endblocktrans %}
-      </a>
-      {% endif %}
-      {% endwith %}
-    </p>
   </div>
 </div>

jalagati/templates/zinnia/_entry_excerpt.html

     {% endif %}
     </div>
     {% endif %}
+    <p class="entry-info">
+      {% blocktrans with date=object.creation_date|date:"DATE_FORMAT" abbr_date=object.creation_date|date:"c" %}<abbr class="published" title="{{ abbr_date }}">{{date}}</abbr>{% endblocktrans %}
+    </p>
     <div class="entry-content">
       {% if object.excerpt %}
         {{ object.excerpt|linebreaks }}
     </div>
     {% if continue_reading %}
     <a href="{{ object.get_absolute_url }}" class="readmore" title="{% blocktrans with object=object.title %}Continue reading {{ object }}{% endblocktrans %}"
-         rel="bookmark"><span>{% trans "Read more" %}</span></a>
+         rel="bookmark"><span>{% trans "Tovább" %}</span></a>
     {% endif %}
   </div>
 
   <div class="entry-footer">
-    <p class="entry-info">
-      {% blocktrans with date=object.creation_date|date:"DATE_FORMAT" abbr_date=object.creation_date|date:"c" %}Published on <abbr class="published" title="{{ abbr_date }}">{{date}}</abbr>{% endblocktrans %}
-      {% if object.categories.count %}
-      {% trans "Kategória:" %}
-      {% for category in object.categories.all %}
-      <a href="{{ category.get_absolute_url }}"
-         title="{% blocktrans %}Show all entries in {{ category }}{% endblocktrans %}"
-         rel="tag category">{{ category }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}{% endif %}.
-    </p>
+    <!--<p class="entry-info">
+      {% blocktrans with date=object.creation_date|date:"DATE_FORMAT" abbr_date=object.creation_date|date:"c" %}<abbr class="published" title="{{ abbr_date }}">{{date}}</abbr>{% endblocktrans %}
+    </p>-->
     {% if tag_list %}
     <ul class="entry-tags">
       {% tags_for_object object as tag_list %}
     </ul>
     {% endif %}
 
-    <p class="entry-comments">
-      {% if object.comment_enabled %}
-      {% fb_comments width="680" include_cached_comments no_scripts %}
-      {% else %}
-      {% trans "Comments are closed" %}
-      {% endif %}
-      {% with pingback_count=object.pingbacks.count %}
-      {% if pingback_count %}
-      , <a href="{{ object.get_absolute_url }}#pingbacks" title="{% blocktrans with object=object.title %}Pingbacks on {{ object }}{% endblocktrans %}">
-        {% blocktrans count pingback_count=pingback_count %}{{ pingback_count }} pingback{% plural %}{{ pingback_count }} pingbacks{% endblocktrans %}
-      </a>
-      {% endif %}
-      {% endwith %}
-      {% with trackback_count=object.trackbacks.count %}
-      {% if trackback_count %}
-      , <a href="{{ object.get_absolute_url }}#trackbacks" title="{% blocktrans with object=object.title %}Trackbacks on {{ object }}{% endblocktrans %}">
-        {% blocktrans count trackback_count=trackback_count %}{{ trackback_count }} trackback{% plural %}{{ trackback_count }} trackbacks{% endblocktrans %}
-      </a>
-      {% endif %}
-      {% endwith %}
-    </p>
   </div>
 </div>

jalagati/templates/zinnia/base.html

-{% extends "template_w_sidebar.html" %}
+{% extends "template_full_width.html" %}
 {% load zinnia_tags i18n cms_tags %}
 {% load url from future %}
 {% load menu_tags %}
     <link rel="pingback" href="/xmlrpc/" />
 {% endblock %}
 
-{% block sidebar %}
-    <div class="sidebar-nav">
-    <h3>{% trans "Menu" %}</h3>
-    <ul class="nav nav-list">
-	{% show_menu_below_id "blog_base" %}
-    </ul>
-    </div>
-{% endblock %}
-
 {% block link %}
     <link rel="index" href="{% url 'zinnia_entry_archive_index' %}" />
     <link rel="author" type="text/plain" href="{% url 'zinnia_humans' %}" />
     url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': {'cmspages': CMSSitemap}}),
     url(r'^googlef3660a6051bf1b77.html$', TemplateView.as_view(
         template_name='googlef3660a6051bf1b77.html')),
+    #url(r'^', include('jalagati_home.urls')),
+    url(r'^filer/', include('filer.server.urls')),
+    url(r'^zinnia/', include('zinnia.urls')),
 	url(r'^', include('cms.urls')),
+
 )
 
 if settings.DEBUG:
 PROJECT_DIR = os.path.dirname(__file__)
 newrelic.agent.initialize(os.path.join(PROJECT_DIR, 'newrelic.ini'))
 
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "jalagati.settings")
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
 
 # This application object is used by any WSGI server configured to use this
 # file. This includes Django's development server, if the WSGI_APPLICATION