From d830b1ab3d95f8598de98b2a97cfed7ed19c4175 Mon Sep 17 00:00:00 2001
From: Aamir Khan
Date: Mon, 25 Jun 2012 16:17:10 -0400
Subject: Code Formatting
---
templates/base.html | 93 +++++----
templates/index.html | 24 +--
templates/lists/list_nav.html | 34 +--
templates/login.html | 82 ++++----
templates/message.html | 77 ++++---
templates/messages/message.html | 48 +++--
templates/month_view.html | 189 +++++++++--------
templates/recent_activities.html | 397 ++++++++++++++++++------------------
templates/search.html | 193 +++++++++---------
templates/thread.html | 131 ++++++------
templates/threads/add_tag_form.html | 12 +-
templates/threads/right_col.html | 100 +++++----
templates/user_profile.html | 6 +-
urls.py | 2 +-
14 files changed, 720 insertions(+), 668 deletions(-)
diff --git a/templates/base.html b/templates/base.html
index 3d51c0d..8842887 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,51 +1,60 @@
-
-
-
- {% block title %}{{ app_name }}{% endblock %}
-
-
-
- {% block additional_stylesheets %} {% endblock %}
-
- {% load i18n %}
-
-
-
-
+
+
+ {% block content %} {% endblock %}
+
+ {% block footer %} {% endblock %}
+
-
- {% block additionaljs %} {% endblock %}
+
+ {% block additionaljs %} {% endblock %}
diff --git a/templates/index.html b/templates/index.html
index 6c0b831..87ba148 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,18 +1,18 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
- {% trans 'Lists' %}
+{% trans 'Lists' %}
-
-
- {% for mlist in lists %}
-
- {{ mlist }}
- Overview
- Archives
-
- {% endfor %}
-
-
+
+
+ {% for mlist in lists %}
+
+ {{ mlist }}
+ Overview
+ Archives
+
+ {% endfor %}
+
+
{% endblock %}
diff --git a/templates/lists/list_nav.html b/templates/lists/list_nav.html
index 44ece68..ab16818 100644
--- a/templates/lists/list_nav.html
+++ b/templates/lists/list_nav.html
@@ -1,20 +1,28 @@
{% if month_participants and month_discussions %}
-
- {{month_participants}} participants
- {{month_discussions}} discussions
- 1 saved
-
+
+
+ {{month_participants}} participants
+
+
+ {{month_discussions}} discussions
+
+
+ 1 saved
+
+
{% endif %}
{% if list_address %}
-
- {{list_address}}
-
-
+
+ {{list_address}}
+
+
All lists
-
-
-
-
+
+
-
- {% include 'threads/right_col.html' %}
+
-
-
+ {% include 'threads/right_col.html' %}
-
- {% include 'messages/first_email.html' %}
-
+
+
- {% for email in threads %}
-
-
+
+ {% include 'messages/first_email.html' %}
+
+
+ {% for email in threads %}
+
+
{% include 'messages/message.html' %}
-
+
- {% empty %}
- Sorry no emails could be found for your search.
- {% endfor %}
+ {% empty %}
+ Sorry no emails could be found for your search.
+ {% endfor %}
-
+
-
+
+
{% endblock %}
-
-
{% block additionaljs %}
-
-
-
-
-
+
+
+
+ $(".voteup").click(function() {
+ // @TODO: Extract the message id from the HTML DOM element instead of hard coding it in Javascript.
+ message_id = this.parentElement.getAttribute('messageid');
+ $.ajax({
+ type : "POST",
+ url : '/vote/{{list_address}}/',
+ data : {
+ vote : 1,
+ messageid : message_id,
+ list : "{{list_address}}",
+ csrfmiddlewaretoken : '{{ csrf_token }}'
+ },
+ success : function(response) {
+ alert(response);
+ }
+ });
+ return false;
+ });
+
+ $(".votedown").click(function() {
+ message_id = this.parentElement.getAttribute('messageid');
+ $.ajax({
+ type : "POST",
+ url : '/vote/{{list_address}}/',
+ data : {
+ vote : -1,
+ messageid : message_id,
+ list : "{{list_address}}",
+ csrfmiddlewaretoken : '{{ csrf_token }}'
+ },
+ success : function(response) {
+ alert(response);
+ }
+ });
+ return false;
+ });
+
+ });
+
{% endblock %}
diff --git a/templates/threads/add_tag_form.html b/templates/threads/add_tag_form.html
index da1014d..65f6577 100644
--- a/templates/threads/add_tag_form.html
+++ b/templates/threads/add_tag_form.html
@@ -3,9 +3,11 @@
{% block header %} {% endblock %}
{% block content %}
-
+
{% endblock %}
diff --git a/templates/threads/right_col.html b/templates/threads/right_col.html
index 200e47a..9a1e448 100644
--- a/templates/threads/right_col.html
+++ b/templates/threads/right_col.html
@@ -1,48 +1,60 @@
{% load gravatar %}
-
-
-
-
21
-
- days inactive
-
-
24
-
- days old
-
-
-
- Add to favorite discussions
-
-
-
-
-
-
-
-
-
participants ({{participants|length}})
-
- {% for key,value in participants.items %}
-
- {% gravatar_img_for_email value.email 20%}
- {{key}}
-
- {% endfor %}
-
-
-
+
+
+
+
+ 21
+
+
+ days
+
+ inactive
+
+
+ 24
+
+
+ days
+
+ old
+
+
+
+ Add to favorite discussions
+
+
+
+
+
+
+
+
+
participants ({{participants|length}})
+
+ {% for key,value in participants.items %}
+
+ {% gravatar_img_for_email value.email 20%}
+ {{key}}
+
+ {% endfor %}
+
+
+
diff --git a/templates/user_profile.html b/templates/user_profile.html
index 70fe2bc..a4c21e9 100644
--- a/templates/user_profile.html
+++ b/templates/user_profile.html
@@ -1,3 +1,7 @@
{% extends "base.html" %}
-{% block content %}
User profiles are under contruction.
{% endblock %}
+{% block content %}
+
+ User profiles are under contruction.
+
+{% endblock %}
\ No newline at end of file
diff --git a/urls.py b/urls.py
index 6c17fe3..5ee4a59 100644
--- a/urls.py
+++ b/urls.py
@@ -16,7 +16,7 @@ urlpatterns = patterns('',
# Index
url(r'^/$', 'views.pages.index', name='index'),
- url(r'^$', 'views.pages.index', name='index'),
+ url(r'^$', 'views.pages.index', name='index'),
# Archives
url(r'^archives/(?P
.*@.*)/(?P\d{4})/(?P\d\d?)/(?P\d\d?)/$',
--
cgit