From 83063012ac3eac51983c83d3b1681595aa59eb1d Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Tue, 15 Apr 2014 16:01:00 +0530 Subject: major changes done, category logos added --- static/website/templates/base.html | 2 +- static/website/templates/get-question.html | 31 ++++++- static/website/templates/index.html | 115 ++++--------------------- static/website/templates/recent-questions.html | 106 +++++++++++++++++++++++ 4 files changed, 149 insertions(+), 105 deletions(-) create mode 100644 static/website/templates/recent-questions.html (limited to 'static/website/templates') diff --git a/static/website/templates/base.html b/static/website/templates/base.html index 286a2ec..97b9194 100644 --- a/static/website/templates/base.html +++ b/static/website/templates/base.html @@ -23,7 +23,7 @@ - + Spoken Tutorial Forums diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html index 3d2d3f0..48aa427 100644 --- a/static/website/templates/get-question.html +++ b/static/website/templates/get-question.html @@ -73,7 +73,7 @@ - {{ question.date_created|date:"y-d-m" }}, {{ question.date_created|time }} + {{ question.date_created|date:"d-m-y" }}, {{ question.date_created|time }} @@ -125,15 +125,31 @@ {{ comment.body|safe }} - - Edit - Save + + + + {{ question.date_created|date:"d-m-y" }}, {{ question.date_created|time }} + + + + + {{ question.user }} + + {% if user|can_edit:comment %} +
+ + Edit + Save + +
+ {% endif %} {% endfor %} + {% if user.is_authenticated %}
{% csrf_token %} @@ -147,6 +163,12 @@ cancel comment + {% else %} +
+ + Login to add comment + + {% endif %}

@@ -246,6 +268,7 @@ +
diff --git a/static/website/templates/index.html b/static/website/templates/index.html index af97707..6e7af78 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -1,104 +1,19 @@ {% extends 'website/templates/base.html' %} +{% load static %} {% block content %} -{% load count_tags %} -

Recent Questions

- - - - - - - - - - - {% for question in questions %} - - - - - - - - - - - - - - - - - - - +
+ {% for category in categories %} +
+
+ +
+

{{ category }}

+

+ View Questions +

+
+
+
{% endfor %} - -
FOSS Tutorial Min Sec Question Date Views Answers User
- - {{ question.category|truncatechars:12 }} - - - - - - - {{ question.tutorial|truncatechars:12 }} - - - - - - - - {{ question.minute_range }} - - - - - - {{ question.second_range }} - - - - - {{ question.title|truncatechars:40 }} - - - - - {{ question.date_created|date:"d-m-y" }} - - - - {{ question.views}} - - {{ question.answer_set.count }} - - - {{ question.user|truncatechars:10 }} - -
- {% if total > 25 %} - - {% endif %} - -{% endblock %} - -{% block javascript %} - +
{% endblock %} diff --git a/static/website/templates/recent-questions.html b/static/website/templates/recent-questions.html new file mode 100644 index 0000000..e5661c1 --- /dev/null +++ b/static/website/templates/recent-questions.html @@ -0,0 +1,106 @@ +{% endblock content %} +{% extends 'website/templates/base.html' %} +{% load static %} +{% block content %} +{% load count_tags %} +

Recent Questions

+ + + + + + + + + + + {% for question in questions %} + + + + + + + + + + + + + + + + + + + + {% endfor %} + +
FOSS Tutorial Min Sec Question Date Views Answers User
+ + {{ question.category|truncatechars:12 }} + + + + + + + {{ question.tutorial|truncatechars:12 }} + + + + + + + + {{ question.minute_range }} + + + + + + {{ question.second_range }} + + + + + {{ question.title|truncatechars:40 }} + + + + + {{ question.date_created|date:"d-m-y" }} + + + + {{ question.views}} + + {{ question.answer_set.count }} + + + {{ question.user|truncatechars:10 }} + +
+ {% if total > 25 %} + + {% endif %} + +{% endblock %} + +{% block javascript %} + +{% endblock %} -- cgit