summaryrefslogtreecommitdiff
path: root/tbc/templates
diff options
context:
space:
mode:
authorhardythe12014-10-31 15:05:27 +0530
committerhardythe12014-10-31 15:05:27 +0530
commit11acd5a344b78c8d24ef107b871f5beddb592727 (patch)
treef57a4150c0f715e932c33fc8bad2e9f727d97798 /tbc/templates
parent38077ca7afd7d406810c9dbb001ead8b9346e9ff (diff)
downloadPython-TBC-Interface-11acd5a344b78c8d24ef107b871f5beddb592727.tar.gz
Python-TBC-Interface-11acd5a344b78c8d24ef107b871f5beddb592727.tar.bz2
Python-TBC-Interface-11acd5a344b78c8d24ef107b871f5beddb592727.zip
categorised aicte books & corrected a minor error for jquery
Diffstat (limited to 'tbc/templates')
-rwxr-xr-xtbc/templates/base.html5
-rw-r--r--tbc/templates/tbc/aicte-books.html42
2 files changed, 45 insertions, 2 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html
index 3551246..e5ad52f 100755
--- a/tbc/templates/base.html
+++ b/tbc/templates/base.html
@@ -68,8 +68,6 @@
}
</style>
{% endblock %}
- {% block script %}
- {% endblock %}
</head>
<body>
@@ -275,6 +273,9 @@
<script src="{% static 'js/jquery.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
+ {% block script %}
+ {% endblock %}
+
<!-- google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
diff --git a/tbc/templates/tbc/aicte-books.html b/tbc/templates/tbc/aicte-books.html
index 4cc3d15..5ed4021 100644
--- a/tbc/templates/tbc/aicte-books.html
+++ b/tbc/templates/tbc/aicte-books.html
@@ -1,5 +1,17 @@
{% extends 'base.html' %}
{% load static %}
+
+{% block script %}
+<script type="text/javascript">
+function submitCategory()
+{
+ alert("hello");
+ document.forms.aictebooks.submit();
+}
+</script>
+{% endblock %}
+
+
{% block content %}
<center><h3>List of AICTE Books</h3></center>
<hr>
@@ -7,6 +19,31 @@
<p>Below is the list of AICTE recommended books. You can propose a book just by clicking on the link. However, if you wish to submit your own preferences other than AICTE books, click the button given below.</p>
<a href="{% url 'tbc:SubmitProposal' %}" class="btn btn-primary">I don't want to propose AICTE book</a>
<hr>
+ <center><h4>Select a Category</h4></center>
+ <form name="aictebooks" action="/submit-aicte-proposal/" method=POST enctype="multipart/form-data">
+ {% csrf_token %}
+ <center><select name="category" id="category" onchange="submitCategory();">
+ <option value="all">All</option>
+ <option value="fluid mechanics">Fluid Mechanics</option>
+ <option value="control systems">Control Theory & Control Systems</option>
+ <option value="chemical engineering">Chemical Engineering</option>
+ <option value="thermodynamics">Thermodynamics</option>
+ <option value="Physics">Physics</option>
+ <option value="mechanical engineering">Mechanical Engineering</option>
+ <option value="Mechanics">Mechanics</option>
+ <option value="Signal Processing">Signal Processing</option>
+ <option value="Digital Signal Processing">Ditgital Signal Processing</option>
+ <option value="digital communications">Digital Communications</option>
+ <option value="Electrical Technology">Electrical Technology</option>
+ <option value="maths & science">Mathematics & Pure Science</option>
+ <option value="Analog Electronics">Analog Electronics</option>
+ <option value="digital electronics">Digital Electronics</option>
+ <option value="computer programming">Computer Programming</option>
+ <option value="others">Others</option>
+ </select>
+ {% if no_books %}
+ <h5>No books under the requested category</h5>
+ {% else %}
<table class="table table-bordered table-hover">
<th>SR #</th>
<th>Book (click on the link to propose the book)</th>
@@ -21,5 +58,10 @@
</tr>
{% endfor %}
</table>
+ {% endif %}
</div>
{% endblock %}
+
+<script>
+ document.getElementById('category').value = "{{ category }}";
+</script>