From: Guillaume Pellerin
Date: Wed, 23 Dec 2015 14:16:16 +0000 (+0100)
Subject: add default templates, cleanup
X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6ad8e95b35dd1e5d46abb5c819f399af3d21c3db;p=mezzo.git
add default templates, cleanup
---
diff --git a/Dockerfile b/Dockerfile
index ddcf70c0..2a9ab2c6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,6 +4,7 @@ ENV PYTHONUNBUFFERED 1
RUN apt-get update &&\
apt-get -y install locales netcat && \
+ apt-get install -y --force-yes netcat &&Â \
echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen &&\
locale-gen
diff --git a/app/deploy/start_app.sh b/app/deploy/start_app.sh
index 0b17902b..4ff5edfd 100644
--- a/app/deploy/start_app.sh
+++ b/app/deploy/start_app.sh
@@ -15,11 +15,6 @@ autoreload=3
# waiting for other services
sh $app/deploy/wait.sh
-if [ ! -f $app/.init ]; then
- python $manage makemigrations --noinput
- touch $app/.init
-fi
-
# django init
python $manage syncdb --noinput
python $manage migrate --noinput
diff --git a/app/deploy/wait.sh b/app/deploy/wait.sh
index 02289edf..202c4d13 100644
--- a/app/deploy/wait.sh
+++ b/app/deploy/wait.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-# apt-get install -y --force-yes netcat
-
set -e
host=$(env | grep _TCP_ADDR | cut -d = -f 2)
diff --git a/app/templates/accounts/account_form.html b/app/templates/accounts/account_form.html
new file mode 100644
index 00000000..1f4d44f8
--- /dev/null
+++ b/app/templates/accounts/account_form.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+{% load i18n mezzanine_tags %}
+
+{% block meta_title %}{{ title }}{% endblock %}
+{% block title %}{{ title }}{% endblock %}
+{% block body_id %}account{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+{{ title }}
+{% endblock %}
+
+{% block main %}
+
+{% errors_for form %}
+
+
+{% endblock %}
diff --git a/app/templates/accounts/account_login.html b/app/templates/accounts/account_login.html
new file mode 100644
index 00000000..5b10cb7b
--- /dev/null
+++ b/app/templates/accounts/account_login.html
@@ -0,0 +1,17 @@
+{% extends "accounts/account_form.html" %}
+{% load i18n %}
+
+{% block main %}
+
+{% if request.user.is_authenticated %}
+ {% trans "You're already logged in. If you'd like to log in as a different user, you'll need to log out first." %}
+{% else %}
+ {{ block.super }}
+ {% url "signup" as signup_url %}
+ {% blocktrans with request.GET.next as next %}If you don't have an account you can sign up for one now.{% endblocktrans %}
+ {% url "mezzanine_password_reset" as password_reset_url %}
+ {% url "profile_update" as profile_update_url %}
+ {% blocktrans %}You can also reset your password if you've forgotten it.
{% endblocktrans %}
+{% endif %}
+
+{% endblock %}
diff --git a/app/templates/accounts/account_password_reset.html b/app/templates/accounts/account_password_reset.html
new file mode 100644
index 00000000..2fe76312
--- /dev/null
+++ b/app/templates/accounts/account_password_reset.html
@@ -0,0 +1,7 @@
+{% extends "accounts/account_form.html" %}
+{% load i18n %}
+
+{% block main %}
+{{ block.super }}
+{% trans "Enter your username or email address and you'll receive an email with a link you need to click, in order to log in and change your password." %}
+{% endblock %}
diff --git a/app/templates/accounts/account_profile.html b/app/templates/accounts/account_profile.html
new file mode 100644
index 00000000..464a646e
--- /dev/null
+++ b/app/templates/accounts/account_profile.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+{% load i18n mezzanine_tags accounts_tags %}
+
+{% block meta_title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %}
+{% block title %}{{ profile_user|username_or:"get_full_name" }}{% endblock %}
+{% block body_id %}account{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+{{ profile_user|username_or:"get_full_name" }}
+{% endblock %}
+
+{% block main %}
+
+
+
+
{{ profile_user.get_full_name }}
+ {% for field, value in profile_user|profile_fields %}
+
{{ field }}
+
{{ value|linebreaksbr }}
+ {% endfor %}
+
+
+{% endblock %}
diff --git a/app/templates/accounts/account_profile_update.html b/app/templates/accounts/account_profile_update.html
new file mode 100644
index 00000000..8a7dcbe4
--- /dev/null
+++ b/app/templates/accounts/account_profile_update.html
@@ -0,0 +1 @@
+{% extends "accounts/account_form.html" %}
diff --git a/app/templates/accounts/account_signup.html b/app/templates/accounts/account_signup.html
new file mode 100644
index 00000000..d135deb9
--- /dev/null
+++ b/app/templates/accounts/account_signup.html
@@ -0,0 +1,17 @@
+{% extends "accounts/account_form.html" %}
+{% load i18n %}
+
+{% block main %}
+
+{% if request.user.is_authenticated %}
+ {% trans "You're already logged in. If you'd like to create a new account, you'll need to log out first." %}
+{% else %}
+ {{ block.super }}
+ {% if settings.ACCOUNTS_APPROVAL_REQUIRED %}
+ {% trans "After signing up, your account will be reviewed for approval. You'll receive an email when your account is activated." %}
+ {% elif settings.ACCOUNTS_VERIFICATION_REQUIRED %}
+ {% trans "After signing up, you'll receive an email with a link you need to click, in order to activate your account." %}
+ {% endif %}
+{% endif %}
+
+{% endblock %}
diff --git a/app/templates/accounts/includes/user_panel.html b/app/templates/accounts/includes/user_panel.html
new file mode 100644
index 00000000..4ae18505
--- /dev/null
+++ b/app/templates/accounts/includes/user_panel.html
@@ -0,0 +1,24 @@
+{% load i18n mezzanine_tags accounts_tags %}
+
+{% if request.user.is_authenticated %}
+
+ {% trans "Logged in as: " %}
+ {% url "profile" request.user.username as profile_url %}
+ {% if profile_url %}
+ {{ request.user|username_or:"email" }}
+
+
+ {% trans "Update profile" %}
+ {% else %}
+ {{ request.user|username_or:"email" }}
+
+ {% endif %}
+
+ {% trans "Log out" %}
+{% else %}
+
+ {% trans "Log in" %}
+ {% trans "or" %}
+
+ {% trans "Sign up" %}
+{% endif %}
diff --git a/app/templates/accounts/includes/user_panel_nav.html b/app/templates/accounts/includes/user_panel_nav.html
new file mode 100644
index 00000000..cd41199d
--- /dev/null
+++ b/app/templates/accounts/includes/user_panel_nav.html
@@ -0,0 +1,19 @@
+{% load i18n mezzanine_tags accounts_tags %}
+
+
+
diff --git a/app/templates/base.html b/app/templates/base.html
new file mode 100644
index 00000000..aa584fcf
--- /dev/null
+++ b/app/templates/base.html
@@ -0,0 +1,152 @@
+
+
+{% load pages_tags mezzanine_tags i18n staticfiles %}
+
+
+
+
+
+
+{% block meta_title %}{% endblock %}{% if settings.SITE_TITLE %} | {{ settings.SITE_TITLE }}{% endif %}
+
+
+{% ifinstalled mezzanine.blog %}
+
+
+{% endifinstalled %}
+
+{% compress css %}
+
+
+
+{% if LANGUAGE_BIDI %}
+
+{% endif %}
+{% ifinstalled cartridge.shop %}
+
+{% if LANGUAGE_BIDI %}
+
+{% endif %}
+{% endifinstalled %}
+{% block extra_css %}{% endblock %}
+{% endcompress %}
+
+{% compress js %}
+
+
+
+{% block extra_js %}{% endblock %}
+{% endcompress %}
+
+
+
+{% block extra_head %}{% endblock %}
+
+
+
+
+
+
+
+
+ {% search_form "all" %}
+ {% page_menu "pages/menus/dropdown.html" %}
+
+
+
+
+
+
+{% nevercache %}
+{% if messages %}
+
+{% for message in messages %}
+
+ ×
+ {{ message }}
+
+{% endfor %}
+
+{% endif %}
+{% endnevercache %}
+
+
{% block title %}{% endblock %}
+
+
+{% spaceless %}
+{% block breadcrumb_menu %}{% page_menu "pages/menus/breadcrumb.html" %}{% endblock %}
+{% endspaceless %}
+
+
+
+
+
+
+
+
+ {% block left_panel %}
+
{% page_menu "pages/menus/tree.html" %}
+ {% endblock %}
+
+
+
+ {% block main %}{% endblock %}
+
+
+
+ {% nevercache %}
+ {% include "includes/language_selector.html" %}
+ {% include "includes/user_panel.html" %}
+ {% endnevercache %}
+
+
+ {% block right_panel %}
+ {% ifinstalled mezzanine.twitter %}
+ {% include "twitter/tweets.html" %}
+ {% endifinstalled %}
+ {% endblock %}
+
+
+
+
+
+
+
+
+
+{% include "includes/footer_scripts.html" %}
+
+
+
diff --git a/app/templates/blog/blog_post_detail.html b/app/templates/blog/blog_post_detail.html
new file mode 100644
index 00000000..2f861bc5
--- /dev/null
+++ b/app/templates/blog/blog_post_detail.html
@@ -0,0 +1,133 @@
+{% extends "blog/blog_post_list.html" %}
+{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n disqus_tags %}
+
+{% block meta_title %}{{ blog_post.meta_title }}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for blog_post as tags %}
+{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ blog_post.description }}
+{% endmetablock %}{% endblock %}
+
+{% block title %}
+{% editable blog_post.title %}{{ blog_post.title }}{% endeditable %}
+{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+{{ blog_post.title }}
+{% endblock %}
+
+{% block main %}
+
+{% block blog_post_detail_postedby %}
+{% editable blog_post.publish_date %}
+
+ {% trans "Posted by" %}:
+ {% with blog_post.user as author %}
+ {{ author.get_full_name|default:author.username }}
+ {% endwith %}
+ {% blocktrans with sometime=blog_post.publish_date|timesince %}{{ sometime }} ago{% endblocktrans %}
+
+{% endeditable %}
+{% endblock %}
+{% block blog_post_detail_commentlink %}
+
+ {% if blog_post.allow_comments %}
+ {% if settings.COMMENTS_DISQUS_SHORTNAME %}
+ ({% spaceless %}
+ {% trans "Comments" %}
+ {% endspaceless %} )
+ {% else %}({% spaceless %}
+ {% blocktrans count comments_count=blog_post.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %}
+ {% endspaceless %} )
+ {% endif %}
+ {% endif %}
+
+{% endblock %}
+
+{% block blog_post_detail_featured_image %}
+{% if settings.BLOG_USE_FEATURED_IMAGE and blog_post.featured_image %}
+
+{% endif %}
+{% endblock %}
+
+{% if settings.COMMENTS_DISQUS_SHORTNAME %}
+{% include "generic/includes/disqus_counts.html" %}
+{% endif %}
+
+{% block blog_post_detail_content %}
+{% editable blog_post.content %}
+{{ blog_post.content|richtext_filters|safe }}
+{% endeditable %}
+{% endblock %}
+
+{% block blog_post_detail_keywords %}
+{% keywords_for blog_post as tags %}
+{% if tags %}
+{% spaceless %}
+
+{% endspaceless %}
+{% endif %}
+{% endblock %}
+
+{% block blog_post_detail_rating %}
+
+
+ {% rating_for blog_post %}
+
+
+{% endblock %}
+
+{% block blog_post_detail_sharebuttons %}
+{% set_short_url_for blog_post %}
+
+{% trans "Share on Facebook" %}
+{% endblock %}
+
+{% block blog_post_previous_next %}
+
+{% endblock %}
+
+{% block blog_post_detail_related_posts %}
+{% if related_posts %}
+
+
{% trans 'Related posts' %}
+
+
+{% endif %}
+{% endblock %}
+
+{% block blog_post_detail_comments %}
+{% if blog_post.allow_comments %}{% comments_for blog_post %}{% endif %}
+{% endblock %}
+
+{% endblock %}
diff --git a/app/templates/blog/blog_post_list.html b/app/templates/blog/blog_post_list.html
new file mode 100644
index 00000000..21ddf51e
--- /dev/null
+++ b/app/templates/blog/blog_post_list.html
@@ -0,0 +1,159 @@
+{% extends "base.html" %}
+{% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %}
+
+{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Blog" %}{% endif %}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for page as keywords %}
+{% for keyword in keywords %}
+ {% if not forloop.first %}, {% endif %}
+ {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ page.description }}
+{% endmetablock %}{% endblock %}
+
+{% block title %}
+{% if page %}
+{% editable page.title %}{{ page.title }}{% endeditable %}
+{% else %}
+{% trans "Blog" %}
+{% endif %}
+{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+{% if tag or category or year or month or author %}
+{% spaceless %}
+{% if tag %}
+ {% trans "Tag:" %} {{ tag }}
+{% else %}{% if category %}
+ {% trans "Category:" %} {{ category }}
+{% else %}{% if year or month %}
+ {% if month %}{{ month }}, {% endif %}{{ year }}
+{% else %}{% if author %}
+ {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
+{% endif %}{% endif %}{% endif %}{% endif %}
+{% endspaceless %}
+
+{% endif %}
+{% endblock %}
+
+{% block main %}
+
+{% if tag or category or year or month or author %}
+ {% block blog_post_list_filterinfo %}
+
+ {% if tag %}
+ {% trans "Viewing posts tagged" %} {{ tag }}
+ {% else %}{% if category %}
+ {% trans "Viewing posts for the category" %} {{ category }}
+ {% else %}{% if year or month %}
+ {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %}
+ {{ year }}
+ {% else %}{% if author %}
+ {% trans "Viewing posts by" %}
+ {{ author.get_full_name|default:author.username }}
+ {% endif %}{% endif %}{% endif %}{% endif %}
+ {% endblock %}
+
+{% else %}
+ {% if page %}
+ {% block blog_post_list_pagecontent %}
+ {% if page.get_content_model.content %}
+ {% editable page.get_content_model.content %}
+ {{ page.get_content_model.content|richtext_filters|safe }}
+ {% endeditable %}
+ {% endif %}
+ {% endblock %}
+ {% endif %}
+{% endif %}
+
+{% for blog_post in blog_posts.object_list %}
+{% block blog_post_list_post_title %}
+{% editable blog_post.title %}
+
+{% endeditable %}
+{% endblock %}
+{% block blog_post_list_post_metainfo %}
+{% editable blog_post.publish_date %}
+
+ {% trans "Posted by" %}:
+ {% with blog_post.user as author %}
+ {{ author.get_full_name|default:author.username }}
+ {% endwith %}
+ {% with blog_post.categories.all as categories %}
+ {% if categories %}
+ {% trans "in" %}
+ {% for category in categories %}
+ {{ category }} {% if not forloop.last %}, {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+ {% blocktrans with sometime=blog_post.publish_date|timesince %}{{ sometime }} ago{% endblocktrans %}
+
+{% endeditable %}
+{% endblock %}
+
+{% if settings.BLOG_USE_FEATURED_IMAGE and blog_post.featured_image %}
+{% block blog_post_list_post_featured_image %}
+
+
+
+{% endblock %}
+{% endif %}
+
+{% block blog_post_list_post_content %}
+{% editable blog_post.content %}
+{{ blog_post.description_from_content|safe }}
+{% endeditable %}
+{% endblock %}
+
+{% block blog_post_list_post_links %}
+
+ {% keywords_for blog_post as tags %}
+ {% if tags %}
+
+ {% endif %}
+
+ {% trans "read more" %}
+ {% if blog_post.allow_comments %}
+ /
+ {% if settings.COMMENTS_DISQUS_SHORTNAME %}
+
+ {% trans "Comments" %}
+
+ {% else %}
+
+ {% blocktrans count comments_count=blog_post.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %}
+
+ {% endif %}
+ {% endif %}
+
+
+{% endblock %}
+{% endfor %}
+
+{% pagination_for blog_posts %}
+
+{% if settings.COMMENTS_DISQUS_SHORTNAME %}
+{% include "generic/includes/disqus_counts.html" %}
+{% endif %}
+
+{% endblock %}
+
+{% block right_panel %}
+{% include "blog/includes/filter_panel.html" %}
+{% endblock %}
diff --git a/app/templates/blog/includes/filter_panel.html b/app/templates/blog/includes/filter_panel.html
new file mode 100644
index 00000000..d2817d8d
--- /dev/null
+++ b/app/templates/blog/includes/filter_panel.html
@@ -0,0 +1,101 @@
+{% load blog_tags keyword_tags mezzanine_tags i18n %}
+
+{% block blog_recent_posts %}
+{% blog_recent_posts 5 as recent_posts %}
+{% if recent_posts %}
+{% trans "Recent Posts" %}
+
+{% endif %}
+{% endblock %}
+
+{% block blog_months %}
+{% blog_months as months %}
+{% if months %}
+{% trans "Archive" %}
+{% for month in months %}
+ {% ifchanged month.date.year %}
+ {% if not forloop.first %}{% endif %}
+ {{ month.date.year }}
+{% endif %}
+{% endblock %}
+
+{% block blog_categories %}
+{% blog_categories as categories %}
+{% if categories %}
+{% trans "Categories" %}
+
+{% for category in categories %}
+{{ category }} ({{ category.post_count }})
+{% endfor %}
+
+{% endif %}
+{% endblock %}
+
+{% block blog_keywords %}
+{% keywords_for blog.blogpost as tags %}
+{% if tags %}
+{% trans "Tags" %}
+
+{% for tag in tags %}
+
+ {{ tag }}
+ ({{ tag.item_count }})
+
+{% endfor %}
+
+{% endif %}
+{% endblock %}
+
+{% block blog_authors %}
+{% blog_authors as authors %}
+{% if authors %}
+{% trans "Authors" %}
+
+{% endif %}
+{% endblock %}
+
+{% block blog_feeds %}
+{% trans "Feeds" %}
+{% if tag %}
+ {% trans "RSS" %} /
+ {% trans "Atom" %}
+{% endif %}
+{% if category %}
+ {% trans "RSS" %} /
+ {% trans "Atom" %}
+{% endif %}
+{% if author %}
+ {% trans "RSS" %} /
+ {% trans "Atom" %}
+{% endif %}
+{% if not tag and not category and not author %}
+ {% trans "RSS" %} /
+ {% trans "Atom" %}
+{% endif %}
+{% endblock %}
diff --git a/app/templates/email/account_approve.html b/app/templates/email/account_approve.html
new file mode 100644
index 00000000..809a825b
--- /dev/null
+++ b/app/templates/email/account_approve.html
@@ -0,0 +1,13 @@
+{% load i18n accounts_tags %}
+{% block main %}
+{% trans "Hey there, a new account has been created and requires activation." %}
+
+{% trans "Name" %}: {{ user.get_full_name }}
+{% trans "Email" %}: {{ user.email }}
+{% for field, value in user|profile_fields %}
+{{ field }}: {{ value|linebreaksbr }}
+{% endfor %}
+
+{% trans "Please use the link below to activate it." %}
+http://{{ request.get_host }}{{ change_url }}
+{% endblock %}
diff --git a/app/templates/email/account_approve.txt b/app/templates/email/account_approve.txt
new file mode 100644
index 00000000..763f0ce7
--- /dev/null
+++ b/app/templates/email/account_approve.txt
@@ -0,0 +1,11 @@
+{% load i18n accounts_tags %}
+{% block main %}
+{% trans "Hey there, a new account has been created and requires activation." %}
+
+{% trans "Name" %}: {{ user.get_full_name }}
+{% trans "Email" %}: {{ user.email }}
+{% for field, value in user|profile_fields %}{{ field }}: {{ value|linebreaksbr }}
+{% endfor %}
+{% trans "Please use the link below to activate it." %}
+http://{{ request.get_host }}{{ change_url }}
+{% endblock %}
diff --git a/app/templates/email/account_approve_subject.txt b/app/templates/email/account_approve_subject.txt
new file mode 100644
index 00000000..94b70f82
--- /dev/null
+++ b/app/templates/email/account_approve_subject.txt
@@ -0,0 +1,2 @@
+{% load i18n %}
+{% trans "An account requires activation" %}
diff --git a/app/templates/email/account_approved.html b/app/templates/email/account_approved.html
new file mode 100644
index 00000000..44642ab7
--- /dev/null
+++ b/app/templates/email/account_approved.html
@@ -0,0 +1,6 @@
+{% load i18n %}
+{% block main %}
+{% trans "Hey there, your account has been activated." %}
+{% trans "Please use the link below to log in." %}
+http://{{ request.get_host }}{% url "login" %}
+{% endblock %}
diff --git a/app/templates/email/account_approved.txt b/app/templates/email/account_approved.txt
new file mode 100644
index 00000000..746cecc0
--- /dev/null
+++ b/app/templates/email/account_approved.txt
@@ -0,0 +1,6 @@
+{% load i18n %}
+{% block main %}
+{% trans "Hey there, your account has been activated." %}
+{% trans "Please use the link below to log in." %}
+http://{{ request.get_host }}{% url "login" %}
+{% endblock %}
diff --git a/app/templates/email/account_approved_subject.txt b/app/templates/email/account_approved_subject.txt
new file mode 100644
index 00000000..e6ce5be5
--- /dev/null
+++ b/app/templates/email/account_approved_subject.txt
@@ -0,0 +1,2 @@
+{% load i18n %}
+{% trans "Your account has been activated" %}
diff --git a/app/templates/email/base.html b/app/templates/email/base.html
new file mode 100644
index 00000000..6030db4b
--- /dev/null
+++ b/app/templates/email/base.html
@@ -0,0 +1,3 @@
+{% block main %}{% endblock %}
+
+http://{{ request.get_host }}
diff --git a/app/templates/email/base.txt b/app/templates/email/base.txt
new file mode 100644
index 00000000..a8416a37
--- /dev/null
+++ b/app/templates/email/base.txt
@@ -0,0 +1,3 @@
+{% block main %}{% endblock %}
+
+http://{{ request.get_host }}
diff --git a/app/templates/email/comment_notification.html b/app/templates/email/comment_notification.html
new file mode 100644
index 00000000..0df6595c
--- /dev/null
+++ b/app/templates/email/comment_notification.html
@@ -0,0 +1,17 @@
+{% extends "email/base.html" %}
+{% load i18n %}
+
+{% block main %}
+
+ {% trans "A new comment has been posted on" %}
+ {{ obj }}
+
+
+ {% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %}
+ At {{ submit_date }} {{ user_name }} wrote:
+ {% endblocktrans %}
+
+
+ {{ comment.comment|linebreaksbr|urlize }}
+
+{% endblock %}
diff --git a/app/templates/email/comment_notification.txt b/app/templates/email/comment_notification.txt
new file mode 100644
index 00000000..d19ba84b
--- /dev/null
+++ b/app/templates/email/comment_notification.txt
@@ -0,0 +1,12 @@
+{% extends "email/base.txt" %}
+{% load i18n %}
+
+{% block main %}
+A new comment has been posted on {{ obj }} [http://{{ request.get_host }}{{ comment_url }}]
+
+{% blocktrans with submit_date=comment.submit_date user_name=comment.user_name %}
+At {{ submit_date }} {{ user_name }} wrote:
+{% endblocktrans %}
+
+{{ comment.comment }}
+{% endblock %}
diff --git a/app/templates/email/form_response.html b/app/templates/email/form_response.html
new file mode 100644
index 00000000..7948635d
--- /dev/null
+++ b/app/templates/email/form_response.html
@@ -0,0 +1,13 @@
+{% extends "email/base.html" %}
+
+{% block main %}
+{% if message %}{{ message }}
{% endif %}
+
+{% for field, value in fields %}
+
+ {{ field }}:
+ {{ value|linebreaks }}
+
+{% endfor %}
+
+{% endblock %}
diff --git a/app/templates/email/form_response.txt b/app/templates/email/form_response.txt
new file mode 100644
index 00000000..d4409e17
--- /dev/null
+++ b/app/templates/email/form_response.txt
@@ -0,0 +1,9 @@
+{% extends "email/base.txt" %}
+
+{% block main %}{% if message %}
+{{ message }}
+
+{% endif %}{% for field, value in fields %}
+{{ field }}: {{ value|safe }}
+{% endfor %}
+{% endblock %}
diff --git a/app/templates/email/form_response_copies.html b/app/templates/email/form_response_copies.html
new file mode 100644
index 00000000..22fdee75
--- /dev/null
+++ b/app/templates/email/form_response_copies.html
@@ -0,0 +1,5 @@
+{% extends "email/form_response.html" %}
+
+{% block main %}
+{{ block.super }}
+{% endblock %}
diff --git a/app/templates/email/form_response_copies.txt b/app/templates/email/form_response_copies.txt
new file mode 100644
index 00000000..fa358d62
--- /dev/null
+++ b/app/templates/email/form_response_copies.txt
@@ -0,0 +1,5 @@
+{% extends "email/form_response.txt" %}
+
+{% block main %}
+{{ block.super }}
+{% endblock %}
diff --git a/app/templates/email/password_reset_verify.html b/app/templates/email/password_reset_verify.html
new file mode 100644
index 00000000..015c2d17
--- /dev/null
+++ b/app/templates/email/password_reset_verify.html
@@ -0,0 +1,8 @@
+{% load i18n %}
+{% block main %}
+{% trans "Hey there, the password reset form was used for your account." %}
+{% trans "Please use the link below to log in and update your password." %}
+http://{{ request.get_host }}{{ verify_url }}
+{% trans "If you didn't request for your password to be reset, please ignore this email." %}
+{% endblock %}
+
diff --git a/app/templates/email/password_reset_verify.txt b/app/templates/email/password_reset_verify.txt
new file mode 100644
index 00000000..48b52500
--- /dev/null
+++ b/app/templates/email/password_reset_verify.txt
@@ -0,0 +1,7 @@
+{% load i18n %}
+{% block main %}
+{% trans "Hey there, the password reset form was used for your account." %}
+{% trans "Please use the link below to log in and update your password." %}
+http://{{ request.get_host }}{{ verify_url }}
+{% trans "If you didn't request for your password to be reset, please ignore this email." %}
+{% endblock %}
diff --git a/app/templates/email/password_reset_verify_subject.txt b/app/templates/email/password_reset_verify_subject.txt
new file mode 100644
index 00000000..72060ab7
--- /dev/null
+++ b/app/templates/email/password_reset_verify_subject.txt
@@ -0,0 +1,2 @@
+{% load i18n %}
+{% trans "Reset your password" %}
diff --git a/app/templates/email/signup_verify.html b/app/templates/email/signup_verify.html
new file mode 100644
index 00000000..93ff38ff
--- /dev/null
+++ b/app/templates/email/signup_verify.html
@@ -0,0 +1,6 @@
+{% load i18n %}
+{% block main %}
+{% trans "Hey there, thanks for creating your account." %}
+{% trans "Please use the link below to activate it." %}
+http://{{ request.get_host }}{{ verify_url }}
+{% endblock %}
diff --git a/app/templates/email/signup_verify.txt b/app/templates/email/signup_verify.txt
new file mode 100644
index 00000000..491d0124
--- /dev/null
+++ b/app/templates/email/signup_verify.txt
@@ -0,0 +1,6 @@
+{% load i18n %}
+{% block main %}
+{% trans "Hey there, thanks for creating your account." %}
+{% trans "Please use the link below to activate it." %}
+http://{{ request.get_host }}{{ verify_url }}
+{% endblock %}
diff --git a/app/templates/email/signup_verify_subject.txt b/app/templates/email/signup_verify_subject.txt
new file mode 100644
index 00000000..54999b2f
--- /dev/null
+++ b/app/templates/email/signup_verify_subject.txt
@@ -0,0 +1,2 @@
+{% load i18n %}
+{% trans "Activate your account" %}
diff --git a/app/templates/errors/404.html b/app/templates/errors/404.html
new file mode 100644
index 00000000..65788dea
--- /dev/null
+++ b/app/templates/errors/404.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% load i18n %}
+
+{% block meta_title %}
+{% trans "Page not found" %}
+{% endblock %}
+
+{% block title %}
+{% trans "Page not found" %}
+{% endblock %}
+
+{% block main %}
+
+
{% trans "Page not found" %}
+
{% trans "The page you requested does not exist." %}
+
+{% endblock %}
diff --git a/app/templates/errors/500.html b/app/templates/errors/500.html
new file mode 100644
index 00000000..26cbb4e6
--- /dev/null
+++ b/app/templates/errors/500.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% load i18n %}
+
+{% block meta_title %}
+{% trans "Error" %}
+{% endblock %}
+
+{% block title %}
+{% trans "Error" %}
+{% endblock %}
+
+{% block main %}
+
+
{% trans "Error" %}
+
{% trans "Sorry, an error occurred." %}
+
+{% endblock %}
diff --git a/app/templates/generic/comments.html b/app/templates/generic/comments.html
new file mode 100644
index 00000000..bf113a8b
--- /dev/null
+++ b/app/templates/generic/comments.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% load mezzanine_tags comment_tags keyword_tags %}
+
+{% block meta_title %}{{ obj }}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for obj as tags %}
+{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ obj.description }}
+{% endmetablock %}{% endblock %}
+
+{% block main %}
+{% comments_for obj %}
+{% endblock %}
diff --git a/app/templates/generic/includes/comment.html b/app/templates/generic/includes/comment.html
new file mode 100644
index 00000000..260d52ca
--- /dev/null
+++ b/app/templates/generic/includes/comment.html
@@ -0,0 +1,73 @@
+{% load i18n mezzanine_tags comment_tags rating_tags %}
+
+{% for comment in comments_for_thread %}
+
+
{{ comment.user_name }} + {% else %} +
+
+
+ {% rating_for comment %}
+
+ {% endif %}
+
+
+ {% else %}
+ {% endif %}
+ {% endeditable %}
+
{{ comment.user_name }} + {% endif %} + + {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} + +
+{{ comment.comment|comment_filter }}
+ {% endif %} + + {% if not comment.is_removed and comment.is_public %} + + {% trans "Link" %} + | + + {% trans "Reply" %} + + {% if settings.COMMENTS_USE_RATINGS %} ++ {% if comment.is_removed %} + {% trans "Comment deleted" %} + {% else %} + {% trans "Comment awaiting approval" %} + {% endif %} + {% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %} +
+ {% endif %} + + {% comment_thread comment %} + + {% if not comment.is_removed and comment.is_public or request.user.is_staff %}{% trans "There are currently no comments" %}
+{% endif %} + diff --git a/app/templates/generic/includes/comments.html b/app/templates/generic/includes/comments.html new file mode 100644 index 00000000..56932e3f --- /dev/null +++ b/app/templates/generic/includes/comments.html @@ -0,0 +1,29 @@ +{% load i18n mezzanine_tags comment_tags %} +{% trans "Comments" %}
+{% if settings.COMMENTS_DISQUS_SHORTNAME %} +{% include "generic/includes/disqus_comments.html" %} +{% else %} + + +{% comment_thread object_for_comments %} +{% trans "New Comment" %}
+ +{% endif %} ++ {% for e in field.errors %} + {% if not forloop.first %} / {% endif %}{{ e }} + {% endfor %} +
+ {% elif field.help_text %} +{{ field.help_text }}
+ {% endif %} ++ +-
+ {% trans "Page" %} {{ current_page.number }} {% trans "of" %} {{ current_page.paginator.num_pages }}
+
+-
+ ←
+
+{% for page in current_page.visible_page_range %}
+-
+ {{ page }}
+
+{% endfor %}
+-
+ →
+
+
+
+{% endif %} diff --git a/app/templates/includes/search_form.html b/app/templates/includes/search_form.html new file mode 100644 index 00000000..28d6d839 --- /dev/null +++ b/app/templates/includes/search_form.html @@ -0,0 +1,28 @@ +{% load mezzanine_tags i18n %} + diff --git a/app/templates/includes/user_panel.html b/app/templates/includes/user_panel.html new file mode 100644 index 00000000..8bd874aa --- /dev/null +++ b/app/templates/includes/user_panel.html @@ -0,0 +1,12 @@ +{% load mezzanine_tags %} +{% endifinstalled %} +{% include "accounts/includes/user_panel.html" %} +{% endifinstalled %} +
Congratulations!
++ Welcome to your new Mezzanine powered website. + Here are some quick links to get you started: +
++- Log in to the admin interface
+ - Creating custom page types
+ - Modifying HTML templates
+ - Changing this homepage
+ - Other frequently asked questions
+ - Full list of settings
+ - Deploying to a production server
+
+{% endblocktrans %} +{% endblock %} diff --git a/app/templates/pages/form.html b/app/templates/pages/form.html new file mode 100644 index 00000000..df287981 --- /dev/null +++ b/app/templates/pages/form.html @@ -0,0 +1,37 @@ +{% extends "pages/page.html" %} + +{% load mezzanine_tags i18n %} + +{% block main %} +{{ block.super }} +{% if request.GET.sent %} + {% editable page.form.response %} + {{ page.form.response|richtext_filters|safe }} + {% endeditable %} +{% else %} + {% with page.form as page_form %} + {% editable page_form.content %} + {{ page_form.content|richtext_filters|safe }} + {% endeditable %} + {% endwith %} + + {% errors_for form %} + + +{% endif %} + +{% endblock %} + + +{% block extra_js %} +{{ block.super }} + +{% endblock %} diff --git a/app/templates/pages/gallery.html b/app/templates/pages/gallery.html new file mode 100644 index 00000000..05f85e73 --- /dev/null +++ b/app/templates/pages/gallery.html @@ -0,0 +1,43 @@ +{% extends "pages/page.html" %} + +{% load mezzanine_tags staticfiles %} + +{% block extra_css %} + +{% endblock extra_css %} + +{% block main %} +{{ block.super }} + +{% editable page.gallery.content %} +{{ page.gallery.content|richtext_filters|safe }} +{% endeditable %} + ++ {% for page in page_branch %} +-
+
+
+ +
+ -
+
+ {% set_page_permissions page %}
+ {% if page.perms.delete %}
+
+ {% else %}
+
+ {% endif %}
+ {% if page.perms.change %}
+ {{ page.title.strip|default:" " }}
+ {% else %}
+ {{ page.title }}
+ {% endif %}
+
+
+
+
+ {% if page.perms.add %}
+
+ {% endif %}
+
+
+
+ {% endfor %}
+
diff --git a/app/templates/pages/menus/breadcrumb.html b/app/templates/pages/menus/breadcrumb.html new file mode 100644 index 00000000..5bd1a7f8 --- /dev/null +++ b/app/templates/pages/menus/breadcrumb.html @@ -0,0 +1,27 @@ +{% load i18n pages_tags %} + +{% if on_home %} ++ {% if page.has_children %}{% page_menu page %}{% endif %} +
+ {% for page in page_branch %} + {% if not has_home and page.is_primary and forloop.first %} +-
+ {% trans "Home" %}
+
+ {% endif %}
+ {% if page.in_menu %}
+ -
+
+ {{ page.title }}
+ {% if page.has_children_in_menu %}{% endif %}
+
+ {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+
+ {% endif %}
+ {% endfor %}
+
+ +{% else %} ++ {% for page in page_branch %} + {% if page.in_menu %} +-
+ {{ page.title }}
+ {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+
+ {% endif %}
+ {% endfor %}
+
+{% endif %} + +{% endif %} +{% endspaceless %} diff --git a/app/templates/pages/menus/footer.html b/app/templates/pages/menus/footer.html new file mode 100644 index 00000000..4e06131f --- /dev/null +++ b/app/templates/pages/menus/footer.html @@ -0,0 +1,45 @@ +{% load i18n pages_tags %} + +{% spaceless %} +{% if page_branch_in_menu %} + +{% for page in page_branch %} + {% if page.is_primary %} + {% if forloop.first %} ++ {% endif %} + {% endif %} + + {% if page.in_menu %} + {% if forloop.first and not page.parent.in_menu and not page.is_primary %} +
+ {% endif %} + {% if forloop.last %} ++ {% endif %} +-
+ {{ page.title }}
+ {% endif %}
+
+ {% if page.in_menu and page.has_children_in_menu %}{% page_menu page %}{% endif %}
+
+ {% if page.in_menu %}
+ {% if forloop.first and not page.parent.in_menu and not page.is_primary %}
+
+ {% endif %} + {% endif %} + + {% if page.is_primary %} + {% if page.in_menu %} ++ {% for page in page_branch %} + + {% if not has_home and page.is_primary and forloop.first %} +-
+ {% trans "Home" %}
+
+ {% endif %}
+
+ {% if page.in_menu %}
+ -
+ {{ page.title }}
+ {# remove this if tag to always show all nav items #}
+ {% if page.is_current_or_ascendant and page.has_children_in_menu %}
+ {% page_menu page %}
+ {% endif %}
+
+ {% endif %}
+
+ {% endfor %}
+
+{% endif %} +{% endspaceless %} diff --git a/app/templates/pages/menus/mobile.html b/app/templates/pages/menus/mobile.html new file mode 100644 index 00000000..07ce06cf --- /dev/null +++ b/app/templates/pages/menus/mobile.html @@ -0,0 +1,32 @@ +{% load i18n pages_tags %} + +{% spaceless %} +{% if page_branch %} +{% for page in page_branch %} + + {% if not has_home and page.is_primary and forloop.first %} ++- {% trans "Home" %}
+ {% endif %}
+
+ {% if page.is_current_or_ascendant and not page.is_current_child %}
+ {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+ {% endif %}
+
+ {% if page.is_current_child %}
+ -
+ {{ page.title }}
+
+ {% endif %}
+
+ {% if page.is_primary and forloop.last %}
+
+ {% endif %} + +{% endfor %} +{% endif %} +{% endspaceless %} diff --git a/app/templates/pages/menus/primary.html b/app/templates/pages/menus/primary.html new file mode 100644 index 00000000..e0be3193 --- /dev/null +++ b/app/templates/pages/menus/primary.html @@ -0,0 +1,20 @@ +{% load pages_tags i18n %} + +{% spaceless %} ++ {% for page in page_branch %} + {% if not has_home and page.is_primary and forloop.first %} +-
+ {% trans "Home" %}
+
+ {% endif %}
+ {% if page.in_menu %}
+ -
+ {{ page.title }}
+
+ {% endif %}
+ {% endfor %}
+
+
+{% endspaceless %} diff --git a/app/templates/pages/menus/tree.html b/app/templates/pages/menus/tree.html new file mode 100644 index 00000000..36108084 --- /dev/null +++ b/app/templates/pages/menus/tree.html @@ -0,0 +1,26 @@ +{% load i18n pages_tags %} + +{% spaceless %} +{% if page_branch_in_menu %} ++ {% for page in page_branch %} + {% if not has_home and page.is_primary and forloop.first %} +-
+ {% trans "Home" %}
+
+ {% endif %}
+ {% if page.in_menu %}
+ -
+ {{ page.title }}
+ {# wrap the next line with 'if page.is_current_or_ascendant' #}
+ {# to only show child pages in the menu for the current page #}
+ {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+
+ {% endif %}
+ {% endfor %}
+
+{% endif %} +{% endspaceless %} diff --git a/app/templates/pages/page.html b/app/templates/pages/page.html new file mode 100644 index 00000000..cf6a3351 --- /dev/null +++ b/app/templates/pages/page.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load mezzanine_tags keyword_tags %} + +{% block meta_title %}{{ page.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for page as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block meta_description %}{% metablock %} +{{ page.description }} +{% endmetablock %}{% endblock %} + +{% block title %} +{% editable page.title %}{{ page.title }}{% endeditable %} +{% endblock %} + +{% block main %} +{% endblock %} diff --git a/app/templates/pages/richtextpage.html b/app/templates/pages/richtextpage.html new file mode 100644 index 00000000..d61e95f8 --- /dev/null +++ b/app/templates/pages/richtextpage.html @@ -0,0 +1,11 @@ +{% extends "pages/page.html" %} + +{% load mezzanine_tags %} + +{% block main %}{{ block.super }} + +{% editable page.richtextpage.content %} +{{ page.richtextpage.content|richtext_filters|safe }} +{% endeditable %} + +{% endblock %} diff --git a/app/templates/search_results.html b/app/templates/search_results.html new file mode 100644 index 00000000..dd9129c2 --- /dev/null +++ b/app/templates/search_results.html @@ -0,0 +1,55 @@ +{% extends "base.html" %} + +{% load i18n mezzanine_tags %} + +{% block meta_title %}{% trans "Search Results" %}{% endblock %} +{% block title %}{% trans "Search Results" %}{% endblock %} +{% block extra_head %} + +{% endblock %} + +{% block breadcrumb_menu %} ++{% if results.paginator.count == 0 %} +{% blocktrans %} +No results were found in {{ search_type }} matching your query: {{ query }} +{% endblocktrans %} +{% else %} +{% blocktrans with start=results.start_index end=results.end_index total=results.paginator.count %} +Showing {{ start }} to {{ end }} of {{ total }} results in {{ search_type }} matching your query: {{ query }} +{% endblocktrans %} +{% endif %} +
+ ++ {{ forloop.counter0|add:results.start_index }}) + {% if result_url %} + {{ result }} + {% else %} + {{ result }} + {% endif %} +
+ {% if result.description != result|stringformat:"s" %} +{{ result.description|truncatewords_html:20|safe }}
+ {% endif %} + {% if result_url %} + {% trans "read more" %} + {% endif %} +{% endwith %} +{% endfor %} +{% trans "Recent Tweets" %}
++ {% for tweet in tweets %} +-
+
+
+ {% endfor %}
+
+{% endif %}{{ tweet.full_name }} @{{ tweet.user_name }}
+ {% if tweet.is_retweet %} ++ {{ tweet.retweeter_full_name }}
+ {% endif %} +{{ tweet.text|safe }}
++ + {% blocktrans with sometime=tweet.created_at|timesince %}{{ sometime }} ago{% endblocktrans %} + +