From a89a21f56fcc46bbf1049190959d343c3f9b1ce1 Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Sun, 20 Apr 2014 16:29:29 +0530 Subject: added questions page, other minor fixes, nicedit configs --- static/website/templates/index.html | 7 +- static/website/templates/new-question.html | 2 +- static/website/templates/questions.html | 117 +++++++++++++++++++ static/website/templates/recent-questions.html | 156 ++++++++++++------------- 4 files changed, 202 insertions(+), 80 deletions(-) create mode 100644 static/website/templates/questions.html (limited to 'static/website/templates') diff --git a/static/website/templates/index.html b/static/website/templates/index.html index 4162e42..39afa9f 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -60,7 +60,12 @@
- Recent Questions + Recent questions + + + View all questions + +
diff --git a/static/website/templates/new-question.html b/static/website/templates/new-question.html index 63ae19a..d9576bb 100644 --- a/static/website/templates/new-question.html +++ b/static/website/templates/new-question.html @@ -74,7 +74,7 @@ bkLib.onDomLoaded(function() { new nicEditor({ iconsPath: "{% static 'website/js/nicEditorIcons.gif' %}", - buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'] + buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link', 'forecolor', 'bgcolor'] }).panelInstance('id_body'); }); diff --git a/static/website/templates/questions.html b/static/website/templates/questions.html new file mode 100644 index 0000000..c6c77e3 --- /dev/null +++ b/static/website/templates/questions.html @@ -0,0 +1,117 @@ +{% extends 'website/templates/base.html' %} +{% load static %} +{% load count_tags %} + +{% block content %} +

+

+ Showing {{ questions.start_index }} - {{ questions.end_index }} of {{ questions.paginator.count }} 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 }} + +
+ +