Commits

Anonymous committed 60bda16

Template updates.

  • Participants
  • Parent commits c3fe8eb

Comments (0)

Files changed (7)

File main/templates/base.html

 		<script type="text/javascript" src="{% static 'main/js/jquery.visage.init.js' %}"></script>
 		<script type="text/javascript" src="{% static 'main/js/common.js' %}"></script>
         {% block js %}{% endblock %}
+        {% render_block "js" %}
     </head>
     <body>
-        {% if user.is_authenticated %}{% cms_toolbar %}{% endif %}
         <div class="top-inside">
             <div class="container">
                 <div class="row">

File orange_website/settings.py

 
 CMSPLUGIN_BLOG_PLACEHOLDERS = ('on_index_page', 'the_rest')
 
-CMS_PLACEHOLDER_CONF = {
-    'content': {
-        'plugins': ['MarkupPlugin', 'TextPlugin', 'PicturePlugin'],
-        'text_only_plugins': ['LinkPlugin'],
-        'name':"Content",
-    },
-}
-
 JQUERY_JS = '%smain/jquery/jquery.min.js' % STATIC_URL
 JQUERY_UI_CSS = '%smain/jquery/jquery-ui.min.css' % STATIC_URL
 JQUERY_UI_JS = '%smain/jquery/jquery-ui.min.js' % STATIC_URL
     'tracmath.tracmath.TracMathPlugin',
 )
 
+CMS_SEO_FIELDS = False
+
 FILER_PAGINATE_BY = 50
 FILER_IS_PUBLIC_DEFAULT = True
 FILER_IMAGE_USE_ICON = True

File orange_website/templates/cmsplugin_blog/entry_detail.html

+{% extends "cmsplugin_blog/cmsplugin_blog_base.html" %}
+
+{% load placeholder_tags cmsplugin_blog_tags simple_translation_tags %}
+
+
+{% block left-col %}
+{{ block.super }}
+
+<h1>{% with object|get_preferred_translation_from_request:request as title %}{{ title }}{% endwith %}</h1>
+
+<p class="date"><span>{{ object.pub_date|date:"d F Y" }}</span></p>
+
+<div class="entry-content">
+{% with object.placeholders|choose_placeholder:"on_index_page" as on_index_page %}
+    {% render_placeholder on_index_page %}
+{% endwith %}
+{% with object.placeholders|choose_placeholder:"the_rest" as the_rest %}
+    {% render_placeholder the_rest %}
+{% endwith %}
+</div>
+
+{% endblock %}
+
+{% block right-col %}
+
+{% render_author_links %}
+
+{% render_month_links %}
+
+{% render_tag_links %}
+
+{% endblock %}

File orange_website/templates/cmsplugin_blog/entry_list.html

+{% extends "cmsplugin_blog/cmsplugin_blog_base.html" %}
+{% load i18n cmsplugin_blog_tags %}
+
+{% block extrahead %}
+{{ block.super }}
+<link rel="alternate" type="application/rss+xml" title="RSS feed for tag &quot;{{ tag|escape }}&quot;" href="{% if request.LANGUAGE_CODE %}/{{ request.LANGUAGE_CODE }}{% endif %}{% url blog_rss_tagged tag %}" />
+<link rel="alternate" type="application/rss+xml" title="RSS feed for tag &quot;{{ tag|escape }}&quot; (any language)" href="{% if request.LANGUAGE_CODE %}/{{ request.LANGUAGE_CODE }}{% endif %}{% url blog_rss_any_tagged tag %}" />
+{% endblock extrahead %}
+
+{% block left-col %}
+{{ block.super }}
+
+<h1>{% trans "Entries tagged" %} "{{ tag }}"</h1>
+{% if object_list %}
+   {% include "cmsplugin_blog/entry_list_include.html" %}
+{% else %}
+	<p>{% trans "No entries tagged" %} "{{ tag }}"</p>
+{% endif %}
+
+{% endblock %}
+
+{% block right-col %}
+
+{% render_author_links %}
+
+{% render_month_links %}
+
+{% render_tag_links %}
+
+{% endblock %}

File orange_website/templates/cmsplugin_blog/entry_list_include.html

+{% load i18n placeholder_tags cmsplugin_blog_tags simple_translation_tags %}
+{% for entry in object_list|annotate_with_translations %}
+    {% with entry|get_preferred_translation_from_request:request as title %}
+    {% with entry.placeholders|choose_placeholder:"excerpt" as excerpt %}
+    <h2><a href="{{ title.get_absolute_url }}">{{ title }}</a><span style='font-size: 14px;font-weight: normal;'> &bull; {{ entry.pub_date|date:"d M Y" }}</span></h2>
+    {% with entry.placeholders|choose_placeholder:"on_index_page" as on_index_page %}
+        {% render_placeholder on_index_page %}
+    {% endwith %}
+
+    {% render_placeholder excerpt %}
+    {% endwith %}
+    {% endwith %}
+{% endfor %}

File orange_website/templates/cmsplugin_filer_folder/folder.html

+{% load i18n thumbnail %}
+
+{% if object.view_option == "list" %}
+    {% firstof object.title object.folder.name  %}
+
+    <div class="cmsplugin_filer_folder_list" id="folder_{{ instance.id }}">
+        {% if folder_children %}
+        <p>{% trans "Folders" %}</p>
+        <ul>
+            {% for folder in folder_children %}
+                <li>{{ folder }}</li>
+            {% endfor %}
+        </ul>
+        {% endif %}
+        {% if folder_files %}
+        <p>{% trans "Files" %}</p>
+        <ul>
+            {% for files in folder_files %}
+                <li>{{ files }}</li>
+            {% endfor %}
+        </ul>
+        {% endif %}
+        {% if folder_images %}
+        <p>{% trans "Images" %}</p>
+        <ul>
+            {% for image in folder_images %}
+                <li><img src="{% thumbnail image.file 32x32 crop=True upscale=True %}" width="32" height="32" alt="{{ image.label }}" /></li>
+            {% endfor %}
+        </ul>
+        {% endif %}
+    </div>
+{% else %}
+    {% with max_images_number|default:"0"|add:"0" as max_images_number %}
+        {% for image in folder_images %}
+            {% thumbnail image.file 150x150 crop="True" upscale="False" as thumbnail %}
+            <a href="{{ image.image.url }}"{% if max_images_number and forloop.counter > max_images_number %} class="hidden-image"{% endif %}><img src="{{ thumbnail.url }}" alt="{{ image.label }}"{% if thumbnail.width %} width="{{ thumbnail.width }}"{% endif %}{% if thumbnail.height %} height="{{ thumbnail.height }}"{% endif %} /></a>
+        {% endfor %}
+    {% endwith %}
+{% endif %}

File requirements.txt

 easy-thumbnails==1.2
 django_polymorphic==0.4.2
 django-filer==0.9.4
-django-cms==2.4.1
+django-cms==2.4.2
 cmsplugin-filer==0.9.5
 django-missing==0.1.11
 cmsplugin-markup==0.2.4