diff options
author | Jayaram Pai | 2014-04-20 16:29:29 +0530 |
---|---|---|
committer | Jayaram Pai | 2014-04-20 16:29:29 +0530 |
commit | a89a21f56fcc46bbf1049190959d343c3f9b1ce1 (patch) | |
tree | e94a1379b830d20e7aecec09315707795d533a2f /static/website | |
parent | 4614a1fa876a5ee2b089879a5bc46d1ab0ae7294 (diff) | |
download | FOSSEE-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')
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 Binary files differnew file mode 100644 index 0000000..4550d61 --- /dev/null +++ b/static/website/images/originals/Advanced-C++.jpg diff --git a/static/website/images/originals/BASH.jpg b/static/website/images/originals/BASH.jpg Binary files differnew file mode 100644 index 0000000..9d29c7e --- /dev/null +++ b/static/website/images/originals/BASH.jpg diff --git a/static/website/images/originals/Blender.jpg b/static/website/images/originals/Blender.jpg Binary files differnew file mode 100644 index 0000000..14e8734 --- /dev/null +++ b/static/website/images/originals/Blender.jpg diff --git a/static/website/images/originals/C-and-C++.jpg b/static/website/images/originals/C-and-C++.jpg Binary files differnew file mode 100644 index 0000000..b1e972b --- /dev/null +++ b/static/website/images/originals/C-and-C++.jpg diff --git a/static/website/images/originals/CellDesigner.jpg b/static/website/images/originals/CellDesigner.jpg Binary files differnew file mode 100644 index 0000000..17f9d00 --- /dev/null +++ b/static/website/images/originals/CellDesigner.jpg diff --git a/static/website/images/originals/Digital-Divide.jpg b/static/website/images/originals/Digital-Divide.jpg Binary files differnew file mode 100644 index 0000000..e6595cf --- /dev/null +++ b/static/website/images/originals/Digital-Divide.jpg diff --git a/static/website/images/originals/Drupal.jpg b/static/website/images/originals/Drupal.jpg Binary files differnew file mode 100644 index 0000000..a01f8bc --- /dev/null +++ b/static/website/images/originals/Drupal.jpg diff --git a/static/website/images/originals/Firefox.jpg b/static/website/images/originals/Firefox.jpg Binary files differnew file mode 100644 index 0000000..189daf4 --- /dev/null +++ b/static/website/images/originals/Firefox.jpg diff --git a/static/website/images/originals/GChemPaint.jpg b/static/website/images/originals/GChemPaint.jpg Binary files differnew file mode 100644 index 0000000..f1c7d20 --- /dev/null +++ b/static/website/images/originals/GChemPaint.jpg diff --git a/static/website/images/originals/GIMP.jpg b/static/website/images/originals/GIMP.jpg Binary files differnew file mode 100644 index 0000000..af6b211 --- /dev/null +++ b/static/website/images/originals/GIMP.jpg diff --git a/static/website/images/originals/GNS3.jpg b/static/website/images/originals/GNS3.jpg Binary files differnew file mode 100644 index 0000000..7656f84 --- /dev/null +++ b/static/website/images/originals/GNS3.jpg diff --git a/static/website/images/originals/GSchem.jpg b/static/website/images/originals/GSchem.jpg Binary files differnew file mode 100644 index 0000000..e0cf4e1 --- /dev/null +++ b/static/website/images/originals/GSchem.jpg diff --git a/static/website/images/originals/GeoGebra-for-Engineering-drawing.jpg b/static/website/images/originals/GeoGebra-for-Engineering-drawing.jpg Binary files differnew file mode 100644 index 0000000..3ff0a5e --- /dev/null +++ b/static/website/images/originals/GeoGebra-for-Engineering-drawing.jpg diff --git a/static/website/images/originals/Geogebra.jpg b/static/website/images/originals/Geogebra.jpg Binary files differnew file mode 100644 index 0000000..3ff0a5e --- /dev/null +++ b/static/website/images/originals/Geogebra.jpg diff --git a/static/website/images/originals/Java-Business-Application.jpg b/static/website/images/originals/Java-Business-Application.jpg Binary files differnew file mode 100644 index 0000000..e8046e4 --- /dev/null +++ b/static/website/images/originals/Java-Business-Application.jpg diff --git a/static/website/images/originals/Java.jpg b/static/website/images/originals/Java.jpg Binary files differnew file mode 100644 index 0000000..9934a4a --- /dev/null +++ b/static/website/images/originals/Java.jpg diff --git a/static/website/images/originals/KTouch.jpg b/static/website/images/originals/KTouch.jpg Binary files differnew file mode 100644 index 0000000..4221d96 --- /dev/null +++ b/static/website/images/originals/KTouch.jpg diff --git a/static/website/images/originals/KTurtle.jpg b/static/website/images/originals/KTurtle.jpg Binary files differnew file mode 100644 index 0000000..733e2c1 --- /dev/null +++ b/static/website/images/originals/KTurtle.jpg diff --git a/static/website/images/originals/KiCad.jpg b/static/website/images/originals/KiCad.jpg Binary files differnew file mode 100644 index 0000000..8df8ac0 --- /dev/null +++ b/static/website/images/originals/KiCad.jpg diff --git a/static/website/images/originals/LaTeX.jpg b/static/website/images/originals/LaTeX.jpg Binary files differnew file mode 100644 index 0000000..8fb73db --- /dev/null +++ b/static/website/images/originals/LaTeX.jpg diff --git a/static/website/images/originals/LibreOffice-Suite-Base.jpg b/static/website/images/originals/LibreOffice-Suite-Base.jpg Binary files differnew file mode 100644 index 0000000..0d9816a --- /dev/null +++ b/static/website/images/originals/LibreOffice-Suite-Base.jpg diff --git a/static/website/images/originals/LibreOffice-Suite-Calc.jpg b/static/website/images/originals/LibreOffice-Suite-Calc.jpg Binary files differnew file mode 100644 index 0000000..51d6cc0 --- /dev/null +++ b/static/website/images/originals/LibreOffice-Suite-Calc.jpg diff --git a/static/website/images/originals/LibreOffice-Suite-Draw.jpg b/static/website/images/originals/LibreOffice-Suite-Draw.jpg Binary files differnew file mode 100644 index 0000000..9c42a88 --- /dev/null +++ b/static/website/images/originals/LibreOffice-Suite-Draw.jpg diff --git a/static/website/images/originals/LibreOffice-Suite-Impress.jpg b/static/website/images/originals/LibreOffice-Suite-Impress.jpg Binary files differnew file mode 100644 index 0000000..ce82703 --- /dev/null +++ b/static/website/images/originals/LibreOffice-Suite-Impress.jpg diff --git a/static/website/images/originals/LibreOffice-Suite-Math.jpg b/static/website/images/originals/LibreOffice-Suite-Math.jpg Binary files differnew file mode 100644 index 0000000..b33de64 --- /dev/null +++ b/static/website/images/originals/LibreOffice-Suite-Math.jpg diff --git a/static/website/images/originals/LibreOffice-Suite-Writer.jpg b/static/website/images/originals/LibreOffice-Suite-Writer.jpg Binary files differnew file mode 100644 index 0000000..adce0fb --- /dev/null +++ b/static/website/images/originals/LibreOffice-Suite-Writer.jpg diff --git a/static/website/images/originals/Linux.jpg b/static/website/images/originals/Linux.jpg Binary files differnew file mode 100644 index 0000000..491bddb --- /dev/null +++ b/static/website/images/originals/Linux.jpg diff --git a/static/website/images/originals/Netbeans.jpg b/static/website/images/originals/Netbeans.jpg Binary files differnew file mode 100644 index 0000000..66c5753 --- /dev/null +++ b/static/website/images/originals/Netbeans.jpg diff --git a/static/website/images/originals/Ngspice.jpg b/static/website/images/originals/Ngspice.jpg Binary files differnew file mode 100644 index 0000000..a319e31 --- /dev/null +++ b/static/website/images/originals/Ngspice.jpg diff --git a/static/website/images/originals/OpenFOAM.jpg b/static/website/images/originals/OpenFOAM.jpg Binary files differnew file mode 100644 index 0000000..7e20f33 --- /dev/null +++ b/static/website/images/originals/OpenFOAM.jpg diff --git a/static/website/images/originals/Orca.jpg b/static/website/images/originals/Orca.jpg Binary files differnew file mode 100644 index 0000000..cf7797c --- /dev/null +++ b/static/website/images/originals/Orca.jpg diff --git a/static/website/images/originals/PERL.jpg b/static/website/images/originals/PERL.jpg Binary files differnew file mode 100644 index 0000000..5159d78 --- /dev/null +++ b/static/website/images/originals/PERL.jpg diff --git a/static/website/images/originals/PHP-and-MySQL.jpg b/static/website/images/originals/PHP-and-MySQL.jpg Binary files differnew file mode 100644 index 0000000..d8d7efa --- /dev/null +++ b/static/website/images/originals/PHP-and-MySQL.jpg diff --git a/static/website/images/originals/Python-Old-Version.jpg b/static/website/images/originals/Python-Old-Version.jpg Binary files differnew file mode 100644 index 0000000..cf40bb8 --- /dev/null +++ b/static/website/images/originals/Python-Old-Version.jpg diff --git a/static/website/images/originals/Python.jpg b/static/website/images/originals/Python.jpg Binary files differnew file mode 100644 index 0000000..4023cce --- /dev/null +++ b/static/website/images/originals/Python.jpg diff --git a/static/website/images/originals/QCad.jpg b/static/website/images/originals/QCad.jpg Binary files differnew file mode 100644 index 0000000..293046b --- /dev/null +++ b/static/website/images/originals/QCad.jpg diff --git a/static/website/images/originals/R.jpg b/static/website/images/originals/R.jpg Binary files differnew file mode 100644 index 0000000..b1fb8da --- /dev/null +++ b/static/website/images/originals/R.jpg diff --git a/static/website/images/originals/Rlogo.jpg b/static/website/images/originals/Rlogo.jpg Binary files differnew file mode 100644 index 0000000..656a6b1 --- /dev/null +++ b/static/website/images/originals/Rlogo.jpg diff --git a/static/website/images/originals/Ruby.jpg b/static/website/images/originals/Ruby.jpg Binary files differnew file mode 100644 index 0000000..f1e9245 --- /dev/null +++ b/static/website/images/originals/Ruby.jpg diff --git a/static/website/images/originals/Scilab.jpg b/static/website/images/originals/Scilab.jpg Binary files differnew file mode 100644 index 0000000..56f6e22 --- /dev/null +++ b/static/website/images/originals/Scilab.jpg diff --git a/static/website/images/originals/Selenium.jpg b/static/website/images/originals/Selenium.jpg Binary files differnew file mode 100644 index 0000000..756eac4 --- /dev/null +++ b/static/website/images/originals/Selenium.jpg diff --git a/static/website/images/originals/Single-Board-Heater-System.jpg b/static/website/images/originals/Single-Board-Heater-System.jpg Binary files differnew file mode 100644 index 0000000..b08dd00 --- /dev/null +++ b/static/website/images/originals/Single-Board-Heater-System.jpg diff --git a/static/website/images/originals/Spoken-Tutorial-Technology.jpg b/static/website/images/originals/Spoken-Tutorial-Technology.jpg Binary files differnew file mode 100644 index 0000000..8c12ba1 --- /dev/null +++ b/static/website/images/originals/Spoken-Tutorial-Technology.jpg diff --git a/static/website/images/originals/Step.jpg b/static/website/images/originals/Step.jpg Binary files differnew file mode 100644 index 0000000..a34d275 --- /dev/null +++ b/static/website/images/originals/Step.jpg diff --git a/static/website/images/originals/Thunderbird.jpg b/static/website/images/originals/Thunderbird.jpg Binary files differnew file mode 100644 index 0000000..91e3723 --- /dev/null +++ b/static/website/images/originals/Thunderbird.jpg diff --git a/static/website/images/originals/Tux-Typing.jpg b/static/website/images/originals/Tux-Typing.jpg Binary files differnew file mode 100644 index 0000000..4a22d6e --- /dev/null +++ b/static/website/images/originals/Tux-Typing.jpg diff --git a/static/website/images/originals/What-is-Spoken-Tutorial.jpg b/static/website/images/originals/What-is-Spoken-Tutorial.jpg Binary files differnew file mode 100644 index 0000000..8c12ba1 --- /dev/null +++ b/static/website/images/originals/What-is-Spoken-Tutorial.jpg diff --git a/static/website/images/originals/Xfig.jpg b/static/website/images/originals/Xfig.jpg Binary files differnew file mode 100644 index 0000000..3f142aa --- /dev/null +++ b/static/website/images/originals/Xfig.jpg diff --git a/static/website/images/originals/logo_openfoam.jpg b/static/website/images/originals/logo_openfoam.jpg Binary files differnew file mode 100644 index 0000000..9ef30e8 --- /dev/null +++ b/static/website/images/originals/logo_openfoam.jpg 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 }}">« <small>Prev</small></a></li> + {% else %} + <li class="disabled"><a href="#">«</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>»</a></li> + {% else %} + <li class="disabled"><a href="#">»</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 %} |