From 1541ab6a4ff28a6a0a4e37873367314e3b898dac Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Sun, 22 Dec 2013 22:50:27 +0530 Subject: making forum in table format --- static/website/templates/ajax-keyword-search.html | 112 ++++++++++-------- static/website/templates/ajax-time-search.html | 112 ++++++++++-------- static/website/templates/filter.html | 137 ++++++++++++++++------ static/website/templates/get-question.html | 32 +++-- static/website/templates/index.html | 105 ++++++++++------- 5 files changed, 317 insertions(+), 181 deletions(-) (limited to 'static/website/templates') diff --git a/static/website/templates/ajax-keyword-search.html b/static/website/templates/ajax-keyword-search.html index 7d38a42..234332a 100644 --- a/static/website/templates/ajax-keyword-search.html +++ b/static/website/templates/ajax-keyword-search.html @@ -1,55 +1,75 @@ {% if questions %} +
+ + + + + + + + {% for question in questions %} -
-
- {{ question.title }} -
-
- - - - {{ question.category }} - - - +
+ - - - - {{ question.tutorial}} - - - + - - - - {{ question.minute_range }} min - - - + - - - - {{ question.second_range }} sec - - - - - - - - {{ question.date_created }} - - + - - {{ question.user }} - - - + + + + + + {% endfor %} +
FOSS TUTORIAL MIN SEC QUESTION DATE USER
+ + {{ question.category|truncatechars:15 }} + + + + + + + {{ question.tutorial|truncatechars:15 }} + + + + + + + + {{ question.minute_range }} + + + + + + {{ question.second_range }} + + + + + {{ question.title|truncatechars:45 }} + + + + + {{ question.date_created|date:"y-d-m" }} + + + + {{ question.user }} +
{% else %} -

No results found . . .

+

No results found . . .

{% endif %} + +{% block javascript %} + +{% endblock %} diff --git a/static/website/templates/ajax-time-search.html b/static/website/templates/ajax-time-search.html index 7d38a42..234332a 100644 --- a/static/website/templates/ajax-time-search.html +++ b/static/website/templates/ajax-time-search.html @@ -1,55 +1,75 @@ {% if questions %} +
+ + + + + + + + {% for question in questions %} -
-
- {{ question.title }} -
-
- - - - {{ question.category }} - - - +
+ - - - - {{ question.tutorial}} - - - + - - - - {{ question.minute_range }} min - - - + - - - - {{ question.second_range }} sec - - - - - - - - {{ question.date_created }} - - + - - {{ question.user }} - - - + + + + + + {% endfor %} +
FOSS TUTORIAL MIN SEC QUESTION DATE USER
+ + {{ question.category|truncatechars:15 }} + + + + + + + {{ question.tutorial|truncatechars:15 }} + + + + + + + + {{ question.minute_range }} + + + + + + {{ question.second_range }} + + + + + {{ question.title|truncatechars:45 }} + + + + + {{ question.date_created|date:"y-d-m" }} + + + + {{ question.user }} +
{% else %} -

No results found . . .

+

No results found . . .

{% endif %} + +{% block javascript %} + +{% endblock %} diff --git a/static/website/templates/filter.html b/static/website/templates/filter.html index 5d6fbb3..86a826c 100644 --- a/static/website/templates/filter.html +++ b/static/website/templates/filter.html @@ -1,12 +1,10 @@ {% extends 'website/templates/base.html' %} {% block content %} - {% if question %}
-
+ - @@ -38,49 +36,118 @@ + + + + + {{ question.date_created|date:"y-d-m" }}, {{ question.date_created|time }} + + + + + {{ question.user }} + + +
{% endif %} -
You might also want to take a look at:
{% if questions %} - {% for question in questions %} -
- +
+ These are the similar questions in: + {% if category %} + {{ category }} + {% endif %} + {% if tutorial %} + > + {{ tutorial }} + {% endif %} + {% if minute_range %} + > + {{ minute_range }} min + {% endif %} + {% if second_range %} + > + {{ second_range }} sec + {% endif %} +
- - - - {{ question.category }} - - - + + + + + + + + + + {% for question in questions %} + + - - - - {{ question.tutorial}} - - - + - - + - - + + + + + + + + + + + {% endfor %} +
FOSS ST MIN SEC QUESTION DATEVIEWS USER
+ + {{ question.category|truncatechars:15 }} + + + + + + + {{ question.tutorial|truncatechars:15 }} + + + + + + - {{ question.minute_range }} min + {{ question.minute_range }} - - + + + - {{ question.second_range }} sec + {{ question.second_range }} - - - - {% endfor %} + + + + {{ question.title|truncatechars:45 }} + + + + + {{ question.date_created|date:"y-d-m" }} + + + + {{ question.views}} + + {{ question.user }} +
+{% else %} +

There are no similar questions.

{% endif %} {% endblock %} + +{% block javascript %} + +{% endblock %} diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html index cc4aca1..15c0197 100644 --- a/static/website/templates/get-question.html +++ b/static/website/templates/get-question.html @@ -55,7 +55,7 @@ - {{ question.date_created }} + {{ question.date_created|date:"y-d-m" }}, {{ question.date_created|time }} @@ -91,20 +91,26 @@
{% endfor %} -
{% csrf_token %} - {% with WIDGET_ERROR_CLASS='field_error' %} -
-
-
- {% render_field form.question value=question.id %} - - {% render_field form.body class+='form-control' %} +{% if user.is_authenticated %} + {% csrf_token %} + {% with WIDGET_ERROR_CLASS='field_error' %} +
+
+
+ {% render_field form.question value=question.id %} + + {% render_field form.body class+='form-control' %} +
-
- {% endwith %} - - + {% endwith %} + + +{% else %} +

+ Log-in to reply to this question. +

+{% endif %} +{% endblock %} -- cgit