diff options
author | holyantony | 2015-09-11 14:48:53 +0530 |
---|---|---|
committer | holyantony | 2015-09-11 14:48:53 +0530 |
commit | 9db68d4500530ea60f2b5fe21251446e2be306da (patch) | |
tree | 019e30271356d3403846edc595dd59967c20665d /static/website/templates/questions.html | |
parent | b8d639085609d15e8133f0f04ffd36a03fee87c7 (diff) | |
download | FOSSEE-Forum-9db68d4500530ea60f2b5fe21251446e2be306da.tar.gz FOSSEE-Forum-9db68d4500530ea60f2b5fe21251446e2be306da.tar.bz2 FOSSEE-Forum-9db68d4500530ea60f2b5fe21251446e2be306da.zip |
Subject: Added tablersorter to all table
Description:
1. tablesorter on all table
2. highlighted add comments, added css
Diffstat (limited to 'static/website/templates/questions.html')
-rw-r--r-- | static/website/templates/questions.html | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/static/website/templates/questions.html b/static/website/templates/questions.html index 3c3d355..b7c2a45 100644 --- a/static/website/templates/questions.html +++ b/static/website/templates/questions.html @@ -3,21 +3,40 @@ {% load count_tags %} {% block content %} + + + <script> + + $(document).ready(function() + { + $("#myTable").tablesorter(); + } + ); + + </script> + <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> Question <span class="glyphicon glyphicon-link"></span></th> - <th> Date</th> - <th> Views</th> - <th> Votes </th> - <th> Answers</th> - <th> User</th> + <table id="myTable" class="tablesorter-blue"> + <thead> + <tr> + <th>No.</th> + <th>FOSS</th> + <th>Question </th> + <th>Date</th> + <th>Views</th> + <th>Votes</th> + <th>Answers</th> + <th>User</th> + </tr> + </thead> + <tbody> {% for question in questions %} <tr> + <td> </td> <td> <span class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}"> @@ -63,7 +82,7 @@ </td> </tr> {% endfor %} - + </tbody> </table> <ul class="pagination pull-right"> @@ -93,5 +112,8 @@ {% block javascript %} <script> $('span').tooltip(); + $('table tbody tr').each(function(idx){ + $(this).children(":eq(0)").html(idx + 1); + }); </script> {% endblock %} |