|
14 | 14 |
|
15 | 15 | }); |
16 | 16 |
|
| 17 | +$("#activelistTable").tablesorter({ |
| 18 | + headers:{ |
| 19 | +5:{sorter:false} |
| 20 | +}, |
| 21 | + |
| 22 | +}); |
| 23 | + |
17 | 24 | }); |
| 25 | + |
| 26 | + |
18 | 27 | </script> |
19 | 28 | <div id="carousel-container"> |
20 | 29 | <div class="carousel"> |
@@ -66,9 +75,14 @@ <h3 align="center">Answers</h3> |
66 | 75 | <br> |
67 | 76 | <div class="panel panel-default"> |
68 | 77 | <div class="panel-heading"> |
69 | | - Recent questions |
| 78 | + <ul class="nav nav-tabs"> |
| 79 | + <li class="active"><a data-toggle="tab" href="#recent_question">Recent questions</a></li> |
| 80 | + <li><a data-toggle="tab" href="#most_active">Most active questions</a></li> |
| 81 | + </ul> |
70 | 82 | </div> |
71 | 83 | <div class="panel-body"> |
| 84 | + <div class="tab-content"> |
| 85 | + <div id="recent_question" class="tab-pane fade in active"> |
72 | 86 | <table id = "listTable" class="tablesorter-blue"> |
73 | 87 | <thead> |
74 | 88 | <tr> |
@@ -151,6 +165,106 @@ <h3 align="center">Answers</h3> |
151 | 165 | {% endfor %} |
152 | 166 | </tbody> |
153 | 167 | </table> |
| 168 | + </div> |
| 169 | + <div id="most_active" class="tab-pane fade"> |
| 170 | + |
| 171 | + <table id = "activelistTable" class="tablesorter-blue"> |
| 172 | + <thead> |
| 173 | + <tr> |
| 174 | + <th> FOSS </th> |
| 175 | + <th> Tutorial</th> |
| 176 | + <th> Min </th> |
| 177 | + <th> Sec </th> |
| 178 | + <th> Question <span class="glyphicon glyphicon-link"></span></th> |
| 179 | + <th> First Post on</th> |
| 180 | + <th> First Post by</th> |
| 181 | + <th>Recent Post on </th> |
| 182 | + <th>Recent Post by</th> |
| 183 | + <th> Views</th> |
| 184 | + <th> Answers</th> |
| 185 | + </tr> |
| 186 | + </thead> |
| 187 | + <tbody> |
| 188 | + {% for question in active_questions %} |
| 189 | + <tr> |
| 190 | + <td> |
| 191 | + <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}"> |
| 192 | + {{ question.category|truncatechars:12 }} |
| 193 | + </span> |
| 194 | + <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}"> |
| 195 | + <span class="glyphicon glyphicon-search"></span> |
| 196 | + </a> |
| 197 | + </td> |
| 198 | + |
| 199 | + <td> |
| 200 | + <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}"> |
| 201 | + {{ question.tutorial|truncatechars:12 }} |
| 202 | + </span> |
| 203 | + <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}"> |
| 204 | + <span class="glyphicon glyphicon-search"></span> |
| 205 | + </a> |
| 206 | + </td> |
| 207 | + |
| 208 | + <td> |
| 209 | + <span> |
| 210 | + <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}"> |
| 211 | + {{ question.minute_range }} |
| 212 | + </a> |
| 213 | + </span> |
| 214 | + </td> |
| 215 | + |
| 216 | + <td> |
| 217 | + <span> |
| 218 | + <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}"> |
| 219 | + {{ question.second_range }} |
| 220 | + </a> |
| 221 | + </span> |
| 222 | + </td> |
| 223 | + |
| 224 | + <td> |
| 225 | + <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}"> |
| 226 | + <a href="{% url 'website:get_question' question.id %}{% prettify question.title %}">{{ question.title|truncatechars:40 }}</a> |
| 227 | + </span> |
| 228 | + </td> |
| 229 | + <td> |
| 230 | + <span> |
| 231 | + <i> |
| 232 | + {{ question.date_created|date:"d-m-y" }} |
| 233 | + </i> |
| 234 | + </span> |
| 235 | + </td> |
| 236 | + <td> |
| 237 | + <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}"> |
| 238 | + {{ question.user|truncatechars:10 }} |
| 239 | + </span> |
| 240 | + </td> |
| 241 | + |
| 242 | + <td> |
| 243 | + <span> |
| 244 | + <i> |
| 245 | + {{ question.last_active }} |
| 246 | + </i> |
| 247 | + </span> |
| 248 | + </td> |
| 249 | + <td> |
| 250 | + <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.last_post_user }}"> |
| 251 | + {{ question.last_post_user|truncatechars:10 }} |
| 252 | + </span> |
| 253 | + </td> |
| 254 | + |
| 255 | + <td> |
| 256 | + {{ question.views}} |
| 257 | + </td> |
| 258 | + |
| 259 | + <td> |
| 260 | + {{ question.answer_set.count }} |
| 261 | + </td> |
| 262 | + </tr> |
| 263 | + {% endfor %} |
| 264 | + </tbody> |
| 265 | + </table> |
| 266 | + </div> |
| 267 | + </div> |
154 | 268 | </div> <!-- /.panel-body --> |
155 | 269 | </div> <!-- /.panel --> |
156 | 270 | {% endblock %} |
|
0 commit comments