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 %} + +
    +
    + {{ title }} + {% fields_for form %} +
    + {% block account_form_actions %} + + {% endblock %} +
    +
    +
    +{% 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 %} +
    +
    + + {% if profile_user == request.user %} +
    {% trans "Update profile" %} + {% endif %} +
    +
    +

    {{ 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 %} + + + + + + +
    + +{% nevercache %} +{% if messages %} +
    +{% for message in messages %} +
    + + {{ message }} +
    +{% endfor %} +
    +{% endif %} +{% endnevercache %} + +

    {% block title %}{% endblock %}

    + + + +
    + +
    +
    + +
    + {% 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 Twitter" %} +{% trans "Share on Facebook" %} +{% endblock %} + +{% block blog_post_previous_next %} + +{% endblock %} + +{% block blog_post_detail_related_posts %} +{% if 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 %} +

    + {{ 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" %}

    + +{% endif %} +{% endblock %} + +{% block blog_keywords %} +{% keywords_for blog.blogpost as tags %} +{% if tags %} +

    {% trans "Tags" %}

    + +{% 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 %} + + + + +{% endfor %} +
    {{ field }}:{{ value|linebreaks }}
    +{% 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 %} + +
    + + {% editable comment.is_public comment.is_removed %} + {% if not comment.is_removed and comment.is_public or request.user.is_staff %} + {% if comment.url %} + + + +
    +

    {{ comment.user_name }} + {% else %} + +
    +

    {{ 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 %} +
    + {% rating_for comment %} +
    + {% endif %} +
    + {% if replied_to == comment.id %} + {% fields_for posted_comment_form %} + {% else %} + {% fields_for unposted_comment_form %} + {% endif %} + + +
    + + {% else %} +

    + {% 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 %}
    {% endif %} + {% endeditable %} +

    +{% endfor %} + +{% if no_comments %} +

    {% 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" %}

    +
    + {% if not request.POST.replied_to %} + {% fields_for posted_comment_form %} + {% else %} + {% fields_for unposted_comment_form %} + {% endif %} +
    + +
    +
    +{% endif %} +
    diff --git a/app/templates/generic/includes/disqus_comments.html b/app/templates/generic/includes/disqus_comments.html new file mode 100644 index 00000000..76b206ba --- /dev/null +++ b/app/templates/generic/includes/disqus_comments.html @@ -0,0 +1,15 @@ +{% load disqus_tags %} + +
    +{% disqus_sso_script %} + diff --git a/app/templates/generic/includes/disqus_counts.html b/app/templates/generic/includes/disqus_counts.html new file mode 100644 index 00000000..793ab3ed --- /dev/null +++ b/app/templates/generic/includes/disqus_counts.html @@ -0,0 +1,12 @@ + diff --git a/app/templates/generic/includes/disqus_sso.html b/app/templates/generic/includes/disqus_sso.html new file mode 100644 index 00000000..f266c4a7 --- /dev/null +++ b/app/templates/generic/includes/disqus_sso.html @@ -0,0 +1,6 @@ + diff --git a/app/templates/generic/includes/rating.html b/app/templates/generic/includes/rating.html new file mode 100644 index 00000000..99c91bfd --- /dev/null +++ b/app/templates/generic/includes/rating.html @@ -0,0 +1,20 @@ +{% load mezzanine_tags rating_tags i18n %} + + + {% if rating_average %} + {% trans "Current rating" %}: {{ rating_average|floatformat }} + {% else %} + {% trans "Currently unrated" %} + {% endif %} + + +{% if not rated or request.user.is_authenticated %} +
    + {% nevercache %} + {% csrf_token %} + {% endnevercache %} +
      {{ rating_form.as_ul }}
    + +
    +{% endif %} diff --git a/app/templates/includes/editable_form.html b/app/templates/includes/editable_form.html new file mode 100644 index 00000000..d4ac0396 --- /dev/null +++ b/app/templates/includes/editable_form.html @@ -0,0 +1,28 @@ +{% load i18n %} + +{# Edit form #} +