summaryrefslogtreecommitdiff
path: root/static/website/templates/recent-questions.html
diff options
context:
space:
mode:
authorJayaram Pai2014-04-15 16:01:00 +0530
committerJayaram Pai2014-04-15 16:01:00 +0530
commit83063012ac3eac51983c83d3b1681595aa59eb1d (patch)
treeed7fb51e09e70ac0490f48c3ddf0c15a573d69ad /static/website/templates/recent-questions.html
parent7c74b30aafb85b026ce846de8d2fb6a514d6e4ae (diff)
downloadspoken-tutorial-forums-83063012ac3eac51983c83d3b1681595aa59eb1d.tar.gz
spoken-tutorial-forums-83063012ac3eac51983c83d3b1681595aa59eb1d.tar.bz2
spoken-tutorial-forums-83063012ac3eac51983c83d3b1681595aa59eb1d.zip
major changes done, category logos added
Diffstat (limited to 'static/website/templates/recent-questions.html')
-rw-r--r--static/website/templates/recent-questions.html106
1 files changed, 106 insertions, 0 deletions
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 %}
+<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 }}
+ </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 %}
+ <ul class="pagination pull-right">
+ {% for i in total|get_range:"0,10" %}
+ <li>
+ <a href="{% url 'website:home' %}?marker={{ i }}">
+ {% if i == marker %}
+ <strong>{{ i|div:"10"|inc }}</strong>
+ {% else %}
+ {{ i|div:"10"|inc }}
+ {% endif %}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
+{% endblock %}
+
+{% block javascript %}
+<script>
+ $('span').tooltip();
+</script>
+{% endblock %}