summaryrefslogtreecommitdiff
path: root/static/website
diff options
context:
space:
mode:
authorJayaram Pai2014-04-20 16:29:29 +0530
committerJayaram Pai2014-04-20 16:29:29 +0530
commita89a21f56fcc46bbf1049190959d343c3f9b1ce1 (patch)
treee94a1379b830d20e7aecec09315707795d533a2f /static/website
parent4614a1fa876a5ee2b089879a5bc46d1ab0ae7294 (diff)
downloadFOSSEE-Forum-a89a21f56fcc46bbf1049190959d343c3f9b1ce1.tar.gz
FOSSEE-Forum-a89a21f56fcc46bbf1049190959d343c3f9b1ce1.tar.bz2
FOSSEE-Forum-a89a21f56fcc46bbf1049190959d343c3f9b1ce1.zip
added questions page, other minor fixes, nicedit configs
Diffstat (limited to 'static/website')
-rw-r--r--static/website/images/originals/Advanced-C++.jpgbin0 -> 1855 bytes
-rw-r--r--static/website/images/originals/BASH.jpgbin0 -> 1320 bytes
-rw-r--r--static/website/images/originals/Blender.jpgbin0 -> 1474 bytes
-rw-r--r--static/website/images/originals/C-and-C++.jpgbin0 -> 1449 bytes
-rw-r--r--static/website/images/originals/CellDesigner.jpgbin0 -> 1928 bytes
-rw-r--r--static/website/images/originals/Digital-Divide.jpgbin0 -> 1911 bytes
-rw-r--r--static/website/images/originals/Drupal.jpgbin0 -> 2052 bytes
-rw-r--r--static/website/images/originals/Firefox.jpgbin0 -> 2328 bytes
-rw-r--r--static/website/images/originals/GChemPaint.jpgbin0 -> 2112 bytes
-rw-r--r--static/website/images/originals/GIMP.jpgbin0 -> 1895 bytes
-rw-r--r--static/website/images/originals/GNS3.jpgbin0 -> 2300 bytes
-rw-r--r--static/website/images/originals/GSchem.jpgbin0 -> 1553 bytes
-rw-r--r--static/website/images/originals/GeoGebra-for-Engineering-drawing.jpgbin0 -> 1947 bytes
-rw-r--r--static/website/images/originals/Geogebra.jpgbin0 -> 1947 bytes
-rw-r--r--static/website/images/originals/Java-Business-Application.jpgbin0 -> 2153 bytes
-rw-r--r--static/website/images/originals/Java.jpgbin0 -> 1646 bytes
-rw-r--r--static/website/images/originals/KTouch.jpgbin0 -> 1476 bytes
-rw-r--r--static/website/images/originals/KTurtle.jpgbin0 -> 2090 bytes
-rw-r--r--static/website/images/originals/KiCad.jpgbin0 -> 2225 bytes
-rw-r--r--static/website/images/originals/LaTeX.jpgbin0 -> 1575 bytes
-rw-r--r--static/website/images/originals/LibreOffice-Suite-Base.jpgbin0 -> 1067 bytes
-rw-r--r--static/website/images/originals/LibreOffice-Suite-Calc.jpgbin0 -> 1764 bytes
-rw-r--r--static/website/images/originals/LibreOffice-Suite-Draw.jpgbin0 -> 1712 bytes
-rw-r--r--static/website/images/originals/LibreOffice-Suite-Impress.jpgbin0 -> 1764 bytes
-rw-r--r--static/website/images/originals/LibreOffice-Suite-Math.jpgbin0 -> 1461 bytes
-rw-r--r--static/website/images/originals/LibreOffice-Suite-Writer.jpgbin0 -> 1810 bytes
-rw-r--r--static/website/images/originals/Linux.jpgbin0 -> 1580 bytes
-rw-r--r--static/website/images/originals/Netbeans.jpgbin0 -> 1379 bytes
-rw-r--r--static/website/images/originals/Ngspice.jpgbin0 -> 1810 bytes
-rw-r--r--static/website/images/originals/OpenFOAM.jpgbin0 -> 1343 bytes
-rw-r--r--static/website/images/originals/Orca.jpgbin0 -> 1592 bytes
-rw-r--r--static/website/images/originals/PERL.jpgbin0 -> 1715 bytes
-rw-r--r--static/website/images/originals/PHP-and-MySQL.jpgbin0 -> 2159 bytes
-rw-r--r--static/website/images/originals/Python-Old-Version.jpgbin0 -> 2165 bytes
-rw-r--r--static/website/images/originals/Python.jpgbin0 -> 1365 bytes
-rw-r--r--static/website/images/originals/QCad.jpgbin0 -> 2027 bytes
-rw-r--r--static/website/images/originals/R.jpgbin0 -> 1635 bytes
-rw-r--r--static/website/images/originals/Rlogo.jpgbin0 -> 3173 bytes
-rw-r--r--static/website/images/originals/Ruby.jpgbin0 -> 1846 bytes
-rw-r--r--static/website/images/originals/Scilab.jpgbin0 -> 2150 bytes
-rw-r--r--static/website/images/originals/Selenium.jpgbin0 -> 1927 bytes
-rw-r--r--static/website/images/originals/Single-Board-Heater-System.jpgbin0 -> 2015 bytes
-rw-r--r--static/website/images/originals/Spoken-Tutorial-Technology.jpgbin0 -> 2458 bytes
-rw-r--r--static/website/images/originals/Step.jpgbin0 -> 1336 bytes
-rw-r--r--static/website/images/originals/Thunderbird.jpgbin0 -> 1658 bytes
-rw-r--r--static/website/images/originals/Tux-Typing.jpgbin0 -> 1732 bytes
-rw-r--r--static/website/images/originals/What-is-Spoken-Tutorial.jpgbin0 -> 2458 bytes
-rw-r--r--static/website/images/originals/Xfig.jpgbin0 -> 2049 bytes
-rw-r--r--static/website/images/originals/logo_openfoam.jpgbin0 -> 2083 bytes
-rw-r--r--static/website/js/thread-user.js6
-rw-r--r--static/website/templates/index.html7
-rw-r--r--static/website/templates/new-question.html2
-rw-r--r--static/website/templates/questions.html117
-rw-r--r--static/website/templates/recent-questions.html156
54 files changed, 205 insertions, 83 deletions
diff --git a/static/website/images/originals/Advanced-C++.jpg b/static/website/images/originals/Advanced-C++.jpg
new file mode 100644
index 0000000..4550d61
--- /dev/null
+++ b/static/website/images/originals/Advanced-C++.jpg
Binary files differ
diff --git a/static/website/images/originals/BASH.jpg b/static/website/images/originals/BASH.jpg
new file mode 100644
index 0000000..9d29c7e
--- /dev/null
+++ b/static/website/images/originals/BASH.jpg
Binary files differ
diff --git a/static/website/images/originals/Blender.jpg b/static/website/images/originals/Blender.jpg
new file mode 100644
index 0000000..14e8734
--- /dev/null
+++ b/static/website/images/originals/Blender.jpg
Binary files differ
diff --git a/static/website/images/originals/C-and-C++.jpg b/static/website/images/originals/C-and-C++.jpg
new file mode 100644
index 0000000..b1e972b
--- /dev/null
+++ b/static/website/images/originals/C-and-C++.jpg
Binary files differ
diff --git a/static/website/images/originals/CellDesigner.jpg b/static/website/images/originals/CellDesigner.jpg
new file mode 100644
index 0000000..17f9d00
--- /dev/null
+++ b/static/website/images/originals/CellDesigner.jpg
Binary files differ
diff --git a/static/website/images/originals/Digital-Divide.jpg b/static/website/images/originals/Digital-Divide.jpg
new file mode 100644
index 0000000..e6595cf
--- /dev/null
+++ b/static/website/images/originals/Digital-Divide.jpg
Binary files differ
diff --git a/static/website/images/originals/Drupal.jpg b/static/website/images/originals/Drupal.jpg
new file mode 100644
index 0000000..a01f8bc
--- /dev/null
+++ b/static/website/images/originals/Drupal.jpg
Binary files differ
diff --git a/static/website/images/originals/Firefox.jpg b/static/website/images/originals/Firefox.jpg
new file mode 100644
index 0000000..189daf4
--- /dev/null
+++ b/static/website/images/originals/Firefox.jpg
Binary files differ
diff --git a/static/website/images/originals/GChemPaint.jpg b/static/website/images/originals/GChemPaint.jpg
new file mode 100644
index 0000000..f1c7d20
--- /dev/null
+++ b/static/website/images/originals/GChemPaint.jpg
Binary files differ
diff --git a/static/website/images/originals/GIMP.jpg b/static/website/images/originals/GIMP.jpg
new file mode 100644
index 0000000..af6b211
--- /dev/null
+++ b/static/website/images/originals/GIMP.jpg
Binary files differ
diff --git a/static/website/images/originals/GNS3.jpg b/static/website/images/originals/GNS3.jpg
new file mode 100644
index 0000000..7656f84
--- /dev/null
+++ b/static/website/images/originals/GNS3.jpg
Binary files differ
diff --git a/static/website/images/originals/GSchem.jpg b/static/website/images/originals/GSchem.jpg
new file mode 100644
index 0000000..e0cf4e1
--- /dev/null
+++ b/static/website/images/originals/GSchem.jpg
Binary files differ
diff --git a/static/website/images/originals/GeoGebra-for-Engineering-drawing.jpg b/static/website/images/originals/GeoGebra-for-Engineering-drawing.jpg
new file mode 100644
index 0000000..3ff0a5e
--- /dev/null
+++ b/static/website/images/originals/GeoGebra-for-Engineering-drawing.jpg
Binary files differ
diff --git a/static/website/images/originals/Geogebra.jpg b/static/website/images/originals/Geogebra.jpg
new file mode 100644
index 0000000..3ff0a5e
--- /dev/null
+++ b/static/website/images/originals/Geogebra.jpg
Binary files differ
diff --git a/static/website/images/originals/Java-Business-Application.jpg b/static/website/images/originals/Java-Business-Application.jpg
new file mode 100644
index 0000000..e8046e4
--- /dev/null
+++ b/static/website/images/originals/Java-Business-Application.jpg
Binary files differ
diff --git a/static/website/images/originals/Java.jpg b/static/website/images/originals/Java.jpg
new file mode 100644
index 0000000..9934a4a
--- /dev/null
+++ b/static/website/images/originals/Java.jpg
Binary files differ
diff --git a/static/website/images/originals/KTouch.jpg b/static/website/images/originals/KTouch.jpg
new file mode 100644
index 0000000..4221d96
--- /dev/null
+++ b/static/website/images/originals/KTouch.jpg
Binary files differ
diff --git a/static/website/images/originals/KTurtle.jpg b/static/website/images/originals/KTurtle.jpg
new file mode 100644
index 0000000..733e2c1
--- /dev/null
+++ b/static/website/images/originals/KTurtle.jpg
Binary files differ
diff --git a/static/website/images/originals/KiCad.jpg b/static/website/images/originals/KiCad.jpg
new file mode 100644
index 0000000..8df8ac0
--- /dev/null
+++ b/static/website/images/originals/KiCad.jpg
Binary files differ
diff --git a/static/website/images/originals/LaTeX.jpg b/static/website/images/originals/LaTeX.jpg
new file mode 100644
index 0000000..8fb73db
--- /dev/null
+++ b/static/website/images/originals/LaTeX.jpg
Binary files differ
diff --git a/static/website/images/originals/LibreOffice-Suite-Base.jpg b/static/website/images/originals/LibreOffice-Suite-Base.jpg
new file mode 100644
index 0000000..0d9816a
--- /dev/null
+++ b/static/website/images/originals/LibreOffice-Suite-Base.jpg
Binary files differ
diff --git a/static/website/images/originals/LibreOffice-Suite-Calc.jpg b/static/website/images/originals/LibreOffice-Suite-Calc.jpg
new file mode 100644
index 0000000..51d6cc0
--- /dev/null
+++ b/static/website/images/originals/LibreOffice-Suite-Calc.jpg
Binary files differ
diff --git a/static/website/images/originals/LibreOffice-Suite-Draw.jpg b/static/website/images/originals/LibreOffice-Suite-Draw.jpg
new file mode 100644
index 0000000..9c42a88
--- /dev/null
+++ b/static/website/images/originals/LibreOffice-Suite-Draw.jpg
Binary files differ
diff --git a/static/website/images/originals/LibreOffice-Suite-Impress.jpg b/static/website/images/originals/LibreOffice-Suite-Impress.jpg
new file mode 100644
index 0000000..ce82703
--- /dev/null
+++ b/static/website/images/originals/LibreOffice-Suite-Impress.jpg
Binary files differ
diff --git a/static/website/images/originals/LibreOffice-Suite-Math.jpg b/static/website/images/originals/LibreOffice-Suite-Math.jpg
new file mode 100644
index 0000000..b33de64
--- /dev/null
+++ b/static/website/images/originals/LibreOffice-Suite-Math.jpg
Binary files differ
diff --git a/static/website/images/originals/LibreOffice-Suite-Writer.jpg b/static/website/images/originals/LibreOffice-Suite-Writer.jpg
new file mode 100644
index 0000000..adce0fb
--- /dev/null
+++ b/static/website/images/originals/LibreOffice-Suite-Writer.jpg
Binary files differ
diff --git a/static/website/images/originals/Linux.jpg b/static/website/images/originals/Linux.jpg
new file mode 100644
index 0000000..491bddb
--- /dev/null
+++ b/static/website/images/originals/Linux.jpg
Binary files differ
diff --git a/static/website/images/originals/Netbeans.jpg b/static/website/images/originals/Netbeans.jpg
new file mode 100644
index 0000000..66c5753
--- /dev/null
+++ b/static/website/images/originals/Netbeans.jpg
Binary files differ
diff --git a/static/website/images/originals/Ngspice.jpg b/static/website/images/originals/Ngspice.jpg
new file mode 100644
index 0000000..a319e31
--- /dev/null
+++ b/static/website/images/originals/Ngspice.jpg
Binary files differ
diff --git a/static/website/images/originals/OpenFOAM.jpg b/static/website/images/originals/OpenFOAM.jpg
new file mode 100644
index 0000000..7e20f33
--- /dev/null
+++ b/static/website/images/originals/OpenFOAM.jpg
Binary files differ
diff --git a/static/website/images/originals/Orca.jpg b/static/website/images/originals/Orca.jpg
new file mode 100644
index 0000000..cf7797c
--- /dev/null
+++ b/static/website/images/originals/Orca.jpg
Binary files differ
diff --git a/static/website/images/originals/PERL.jpg b/static/website/images/originals/PERL.jpg
new file mode 100644
index 0000000..5159d78
--- /dev/null
+++ b/static/website/images/originals/PERL.jpg
Binary files differ
diff --git a/static/website/images/originals/PHP-and-MySQL.jpg b/static/website/images/originals/PHP-and-MySQL.jpg
new file mode 100644
index 0000000..d8d7efa
--- /dev/null
+++ b/static/website/images/originals/PHP-and-MySQL.jpg
Binary files differ
diff --git a/static/website/images/originals/Python-Old-Version.jpg b/static/website/images/originals/Python-Old-Version.jpg
new file mode 100644
index 0000000..cf40bb8
--- /dev/null
+++ b/static/website/images/originals/Python-Old-Version.jpg
Binary files differ
diff --git a/static/website/images/originals/Python.jpg b/static/website/images/originals/Python.jpg
new file mode 100644
index 0000000..4023cce
--- /dev/null
+++ b/static/website/images/originals/Python.jpg
Binary files differ
diff --git a/static/website/images/originals/QCad.jpg b/static/website/images/originals/QCad.jpg
new file mode 100644
index 0000000..293046b
--- /dev/null
+++ b/static/website/images/originals/QCad.jpg
Binary files differ
diff --git a/static/website/images/originals/R.jpg b/static/website/images/originals/R.jpg
new file mode 100644
index 0000000..b1fb8da
--- /dev/null
+++ b/static/website/images/originals/R.jpg
Binary files differ
diff --git a/static/website/images/originals/Rlogo.jpg b/static/website/images/originals/Rlogo.jpg
new file mode 100644
index 0000000..656a6b1
--- /dev/null
+++ b/static/website/images/originals/Rlogo.jpg
Binary files differ
diff --git a/static/website/images/originals/Ruby.jpg b/static/website/images/originals/Ruby.jpg
new file mode 100644
index 0000000..f1e9245
--- /dev/null
+++ b/static/website/images/originals/Ruby.jpg
Binary files differ
diff --git a/static/website/images/originals/Scilab.jpg b/static/website/images/originals/Scilab.jpg
new file mode 100644
index 0000000..56f6e22
--- /dev/null
+++ b/static/website/images/originals/Scilab.jpg
Binary files differ
diff --git a/static/website/images/originals/Selenium.jpg b/static/website/images/originals/Selenium.jpg
new file mode 100644
index 0000000..756eac4
--- /dev/null
+++ b/static/website/images/originals/Selenium.jpg
Binary files differ
diff --git a/static/website/images/originals/Single-Board-Heater-System.jpg b/static/website/images/originals/Single-Board-Heater-System.jpg
new file mode 100644
index 0000000..b08dd00
--- /dev/null
+++ b/static/website/images/originals/Single-Board-Heater-System.jpg
Binary files differ
diff --git a/static/website/images/originals/Spoken-Tutorial-Technology.jpg b/static/website/images/originals/Spoken-Tutorial-Technology.jpg
new file mode 100644
index 0000000..8c12ba1
--- /dev/null
+++ b/static/website/images/originals/Spoken-Tutorial-Technology.jpg
Binary files differ
diff --git a/static/website/images/originals/Step.jpg b/static/website/images/originals/Step.jpg
new file mode 100644
index 0000000..a34d275
--- /dev/null
+++ b/static/website/images/originals/Step.jpg
Binary files differ
diff --git a/static/website/images/originals/Thunderbird.jpg b/static/website/images/originals/Thunderbird.jpg
new file mode 100644
index 0000000..91e3723
--- /dev/null
+++ b/static/website/images/originals/Thunderbird.jpg
Binary files differ
diff --git a/static/website/images/originals/Tux-Typing.jpg b/static/website/images/originals/Tux-Typing.jpg
new file mode 100644
index 0000000..4a22d6e
--- /dev/null
+++ b/static/website/images/originals/Tux-Typing.jpg
Binary files differ
diff --git a/static/website/images/originals/What-is-Spoken-Tutorial.jpg b/static/website/images/originals/What-is-Spoken-Tutorial.jpg
new file mode 100644
index 0000000..8c12ba1
--- /dev/null
+++ b/static/website/images/originals/What-is-Spoken-Tutorial.jpg
Binary files differ
diff --git a/static/website/images/originals/Xfig.jpg b/static/website/images/originals/Xfig.jpg
new file mode 100644
index 0000000..3f142aa
--- /dev/null
+++ b/static/website/images/originals/Xfig.jpg
Binary files differ
diff --git a/static/website/images/originals/logo_openfoam.jpg b/static/website/images/originals/logo_openfoam.jpg
new file mode 100644
index 0000000..9ef30e8
--- /dev/null
+++ b/static/website/images/originals/logo_openfoam.jpg
Binary files differ
diff --git a/static/website/js/thread-user.js b/static/website/js/thread-user.js
index d2c8f22..1c43342 100644
--- a/static/website/js/thread-user.js
+++ b/static/website/js/thread-user.js
@@ -1,6 +1,6 @@
bkLib.onDomLoaded(function() {
var questionNicEditor = new nicEditor({
- buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'],
+ buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link', 'forecolor', 'bgcolor'],
iconsPath: "/static/website/js/nicEditorIcons.gif",
});
questionNicEditor.setPanel('questionNicPanel');
@@ -156,7 +156,7 @@ $(document).ready(function() {
$answerPanelWrapper = $("#answerPanelWrapper");
var answerNicEditor = new nicEditor({
- buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'],
+ buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link', 'forecolor', 'bgcolor'],
iconsPath: "/static/website/js/nicEditorIcons.gif",
});
answerNicEditor.panelInstance('answerNicPanel');
@@ -217,7 +217,7 @@ $(document).ready(function() {
$(this).find(".modify-wrapper").hide();
});
var commentNicEditor = new nicEditor({
- buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link'],
+ buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image', 'link', 'forecolor', 'bgcolor'],
iconsPath: "/static/website/js/nicEditorIcons.gif",
});
commentNicEditor.panelInstance('commentNicPanel');
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 @@
<br>
<div class="panel panel-default">
<div class="panel-heading">
- Recent Questions
+ Recent questions
+ <a class="pull-right" href="{% url 'website:questions' %}">
+ <small>
+ View all questions
+ </small>
+ </a>
</div>
<div class="panel-body">
<table class="table table-bordered table-hover">
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');
});
</script>
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 %}
+ <h4>
+ <h5>
+ Showing {{ questions.start_index }} - {{ questions.end_index }} of {{ questions.paginator.count }} questions.
+ </h5>
+ </h4>
+ <table class="table table-bordered table-hover">
+ <th> FOSS </th>
+ <th> Tutorial</th>
+ <th> Min </th>
+ <th> Sec </th>
+ <th> Question</th>
+ <th> Date</th>
+ <th> Views</th>
+ <th> Answers</th>
+ <th> User</th>
+ {% for question in questions %}
+ <tr>
+ <td>
+ <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+ {{ question.category|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
+ </a>
+ </td>
+
+ <td>
+ <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
+ {{ question.tutorial|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
+ </a>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
+ {{ question.minute_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
+ {{ question.second_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <i>
+ {{ question.date_created|date:"d-m-y" }}
+ </i>
+ </span>
+ </td>
+
+ <td>
+ {{ question.views}}
+ </td>
+
+ <td>
+ {{ question.answer_set.count }}
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ {{ question.user|truncatechars:10 }}
+ </span>
+ </td>
+ </tr>
+ {% endfor %}
+
+ </table>
+
+ <ul class="pagination pull-right">
+ {% if questions.has_previous %}
+ <li><a href="?page={{ questions.previous_page_number }}">&laquo; <small>Prev</small></a></li>
+ {% else %}
+ <li class="disabled"><a href="#">&laquo;</a></li>
+ {% endif %}
+
+ {% for num in questions.paginator.page_range %}
+ {% ifequal num questions.number %}
+ <li class="active"><a href="#">{{ num }}<span class="sr-only">(current)</span></a></li>
+ {% else %}
+ <li><a href="?page={{ num }}">{{ num }}</a></li>
+ {% endifequal %}
+ {% endfor %}
+
+ {% if questions.has_next %}
+ <li><a href="?page={{ questions.next_page_number }}"><small>Next</small>&raquo;</a></li>
+ {% else %}
+ <li class="disabled"><a href="#">&raquo;</a></li>
+ {% endif %}
+ <ul>
+
+{% endblock %}
+
+{% block javascript %}
+<script>
+ $('span').tooltip();
+</script>
+{% endblock %}
diff --git a/static/website/templates/recent-questions.html b/static/website/templates/recent-questions.html
index e5661c1..3461908 100644
--- a/static/website/templates/recent-questions.html
+++ b/static/website/templates/recent-questions.html
@@ -1,91 +1,91 @@
-{% endblock content %}
{% extends 'website/templates/base.html' %}
{% load static %}
-{% block content %}
{% load count_tags %}
-<h4><u>Recent Questions</u></h4>
-<table class="table table-bordered table-hover">
- <th> FOSS </th>
- <th> Tutorial</th>
- <th> Min </th>
- <th> Sec </th>
- <th> Question</th>
- <th> Date</th>
- <th> Views</th>
- <th> Answers</th>
- <th> User</th>
- {% for question in questions %}
- <tr>
- <td>
- <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
- {{ question.category|truncatechars:12 }}
- </span>
- <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
- <span class="glyphicon glyphicon-search"></span>
- </a>
- </td>
-
- <td>
- <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
- {{ question.tutorial|truncatechars:12 }}
- </span>
- <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
- <span class="glyphicon glyphicon-search"></span>
- </a>
- </td>
- <td>
- <span>
- <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
- {{ question.minute_range }}
+{% block content %}
+ <h4><u>Recent Questions</u></h4>
+ <table class="table table-bordered table-hover">
+ <th> FOSS </th>
+ <th> Tutorial</th>
+ <th> Min </th>
+ <th> Sec </th>
+ <th> Question</th>
+ <th> Date</th>
+ <th> Views</th>
+ <th> Answers</th>
+ <th> User</th>
+ {% for question in questions %}
+ <tr>
+ <td>
+ <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+ {{ question.category|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
</a>
- </span>
- </td>
-
- <td>
- <span>
- <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
- {{ question.second_range }}
+ </td>
+
+ <td>
+ <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
+ {{ question.tutorial|truncatechars:12 }}
+ </span>
+ <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
+ <span class="glyphicon glyphicon-search"></span>
</a>
- </span>
- </td>
-
- <td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
- <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
- </span>
- </td>
-
-<td>
- <span>
- <i>
- {{ question.date_created|date:"d-m-y" }}
- </i>
- </span>
- </td>
-
- <td>
- {{ question.views}}
- </td>
-
- <td>
- {{ question.answer_set.count }}
- </td>
-
- <td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
- {{ question.user|truncatechars:10 }}
- </span>
- </td>
- </tr>
- {% endfor %}
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
+ {{ question.minute_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
+ {{ question.second_range }}
+ </a>
+ </span>
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
+ </span>
+ </td>
+
+ <td>
+ <span>
+ <i>
+ {{ question.date_created|date:"d-m-y" }}
+ </i>
+ </span>
+ </td>
+
+ <td>
+ {{ question.views}}
+ </td>
+
+ <td>
+ {{ question.answer_set.count }}
+ </td>
+
+ <td>
+ <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ {{ question.user|truncatechars:10 }}
+ </span>
+ </td>
+ </tr>
+ {% endfor %}
-</table>
- {% if total > 25 %}
+ </table>
+ {% if total > 10 %}
<ul class="pagination pull-right">
{% for i in total|get_range:"0,10" %}
<li>
- <a href="{% url 'website:home' %}?marker={{ i }}">
+ <a href="{% url 'website:all_questions' %}?marker={{ i }}">
{% if i == marker %}
<strong>{{ i|div:"10"|inc }}</strong>
{% else %}