From 5e3cd58c6c4adcf6108eba5062953bc6162976cd Mon Sep 17 00:00:00 2001 From: Aamir Khan Date: Fri, 22 Jun 2012 18:51:53 -0400 Subject: Templates refactoring : Added messages/ and threads/ template directories --- templates/message.html | 26 +------- templates/messages/first_email.html | 28 +++++++++ templates/messages/message.html | 24 ++++++++ templates/thread.html | 114 ++++-------------------------------- templates/threads/right_col.html | 48 +++++++++++++++ 5 files changed, 113 insertions(+), 127 deletions(-) create mode 100644 templates/messages/first_email.html create mode 100644 templates/messages/message.html create mode 100644 templates/threads/right_col.html diff --git a/templates/message.html b/templates/message.html index ce2f7f3..13a267f 100644 --- a/templates/message.html +++ b/templates/message.html @@ -14,32 +14,8 @@
- -
- -
- {{message.content}} -
- -
+ {% include 'messages/first_email.html' with first_mail=message %}
diff --git a/templates/messages/first_email.html b/templates/messages/first_email.html new file mode 100644 index 0000000..b319c31 --- /dev/null +++ b/templates/messages/first_email.html @@ -0,0 +1,28 @@ +{% load gravatar %} +
+ +
+ {{first_mail.content}} +
+ +
+ diff --git a/templates/messages/message.html b/templates/messages/message.html new file mode 100644 index 0000000..25452bd --- /dev/null +++ b/templates/messages/message.html @@ -0,0 +1,24 @@ +{% load gravatar %} + +
+ {% gravatar_img_for_email email.email 40 %} + + +
+
+ {{email.content}} +
+ + diff --git a/templates/thread.html b/templates/thread.html index b480128..7d08701 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -1,7 +1,6 @@ {% extends "base.html" %} -{% load gravatar %} -{% block title %}{{ app_name }}{% endblock %} +{% load gravatar %} {% block additional_stylesheets %} @@ -10,114 +9,23 @@ {% block content %}
- - -
- -
-
21
-
- days
inactive -
-
24
-
- days
old -
-
-

- Add to favorite discussions -

- -
-
- tags ({{tags|length}}) -
    - {% for tag in tags %} -
  • {{ tag }} |
  • - {% endfor %} -
-
-
-
- {% csrf_token %} - {{ addtag_form.as_p }} - -
-
-
- participants ({{participants|length}}) -
    - {% for key,value in participants.items %} -
  • - {% gravatar_img_for_email value.email 20%} - {{key}} -
  • - {% endfor %} -
-
-
+ + {% include 'threads/right_col.html' %}
-
- -
- {{first_mail.content}} -
- -
+ {% include 'messages/first_email.html' %} {% for email in threads %} - -
- - - -
+ +
+ {% include 'messages/message.html' %} +
+ + {% empty %} Sorry no emails could be found for your search. {% endfor %} @@ -127,6 +35,8 @@
{% endblock %} + + {% block addtionaljs %}