summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtbc/templates/base.html5
-rw-r--r--tbc/templates/tbc/aicte-books.html42
-rw-r--r--tbc/templates/tbc/books_under_progress.html31
-rwxr-xr-xtbc/views.py15
4 files changed, 68 insertions, 25 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>
diff --git a/tbc/templates/tbc/books_under_progress.html b/tbc/templates/tbc/books_under_progress.html
index 4ce3798..01c9a2f 100644
--- a/tbc/templates/tbc/books_under_progress.html
+++ b/tbc/templates/tbc/books_under_progress.html
@@ -3,34 +3,16 @@
{% block content %}
<center><h2> Books Under Progress </h2></center><br/>
<ol>
- <li>Computer Programming in C by V. Rajaram(EE Edition)
- <li>Advanced C programming by A. P. Godse & D. A. Godse(1st Edition)
- <li>Radar Engineering and Fundamentals of Navigational Aida by G. S. N. Raju(1st Edition)
- <li>Principles of Electronics by V. K. Mehta and Rohit Mehta(11th Edition)
<li>Electronics Communication by Dennis Roddy and John Coolen (4th Edition)
- <li>Programming in C by Pradip Dey and Manas Ghosh(1st Edition)
- <li>Chemical Reactor analysis and applications for the practicing Engineer by Louis Theodore(1st Edition)
- <li>C for dummies by Dan Gookin(2nd Edition)
- <li>The complete reference Java 2 by Herbert Schildt(5th Edition)
- <li>Data Structures and Algorithms made easy by Narasimha Karumanchi(2nd Edition)
<li>Fundamentals of Data Structures in C++ by Ellis Horowitz, Sartaj Sahni & Dinesh Mehta(2nd Edition)
- <li>Stength of materials - Mechanics of solids by Er R. K. Rajput(revised Edition)
<li>Transport Processes and Unit Operations by C. J. Geankoplis(3rd Edition)
<li>Modern Physics by B. L. Theraja(16th Edition)
- <li>Electrical and Electronic Principles and Technology by John Bird(3rd Edition)
- <li>Op-Amps and Linear Integrated circuit by S. Sharma(1st Edition)
<li>Optical Fiber Communications Principles and practice by John M. Senior(3rd Edition)
- <li>Data structures through C in depth by S. K. Srivastava & Deepali Srivastava
- <li>Electric Power Transmission: System engineering and Design by Turan Gonen(2nd Edition)
<li>Programming in C by R. Subburaj(1st Edition)
- <li>Radar Engineering and fundamentals of Navigational Aids by G. S. N. Raju(1st Edition)
<li>Basic Electrical Engineering with numerical problems(Volume-1) by P. S. Dhogal(1st Edition)
<li>Engineering thermodynamics by P. K. Nag(4th Edition)
- <li>Introduction to heat transfer by S. K. Som(1st Edition)
- <li>Electronic Devices and Circuits by K. L. Kishore(1st Edition)
<li>Principles of Electronic Communication Systems by Louis E. Freznel(3rd Edition)
<li>Thermodynamics: An Engineering approach by Michael A. boles & Yunus A. cengel(5th Edition)
- <li>Analog Electronics by U. A. Bakshi & A. P. Godse
<li>Solid State Electronic Devices by Ben Streetman & sanjay Banerjee(EE Edition)
<li>Digital Communications by S. Sharma(6th edition)
<li>Fundamentals of Computing and Programming in C by V. Ramesh Babu, R. Samyuktha, M. Munirathnam
@@ -54,7 +36,6 @@
<li>Optical Fiber Communication by Gerd Keiser (4th edition)
<li>Thermodynamics by Obert (3rd edition)
<li>Heat Transfer: Principles And Applications by B. K. Dutta (1st edition)
- <li>Mastering C by K R Venugopal & S R Prasad (1st Edition)
<li>Thermodynamics for chemists by Glasstone & Samuel (8th edition)
<li>Numerical Methods : With Programs in C (2nd Edition)
<li>Linear Integrated circuits by D.Roy Choudhury and Shail B. Jain (4th edition)
@@ -65,7 +46,6 @@
<li>Statics And Strength Of Materials by I. J. Levinson
<li>Teach yourself C++ by Herbert Schildt (3rd edition)
<li>Turbomachinery Design And Theory by R. S. R. Gorla And A. A. Khan (1st edition)
- <li>Problmes in Hydraulics by R. S. Paradise (3rd edition)
<li>Diffusion: Mass Transfer In Fluid Systems by E. L. Cussler (2nd edition)
<li>Fluid Mechanics and Hydraulic Machines by B. K. Sarkar (1st Edition)
<li>Fluid Mechanics by A. K. Choudhary and Om Prakash (2nd Edition)
@@ -76,7 +56,6 @@
<li>Fluid Flow For The Practicing Chemical Engineer by J. P. Abulencia And L. Theodore (1st Edition)
<li>Engineering Economics by R. Panneerselvam (1st Edition)
<li>C Programming for the Absolute beginner Michael Vine (2nd Edition)
- <li>Problems in Hydraulics by R. S. Paradise (3rd Edition)
<li>Modern Physics by Kenneth Krane (2nd edition)
<li>Essentials of programming in C for Life Sciences by S. Parthasarathy (1st edition)
<li>DC Machines and Synchronous Machines by U. A. Bakshi and M. V. Bakshi (1st Edition)
@@ -93,4 +72,14 @@
<li>Irrigation & Water Power Engineering by B.C. Punmia (16th Edition)
<li>Fundamentals of Aerodynamic by J.D. Anderson Jr. (3rd Editon)
<li>Thyristors Theory & Applications by R.K. Sugandhi & K.K. Sugandhi (2nd Edition)
+ <li>Fundamentals Of Data Structure In C by S. Sahni , S. Anderson-freed And E. Horowitz (2nd edition)
+ <li>Unix: Concepts And Applications by S. Das (4th edition)
+ <li>Data Structures Using C And C++ by Y. Langsam, M. Augenstein And A. M. Tenenbaum
+ <li>Teach Yourself C in 24 hours by Tony Zhang
+ <li>Electronic Measurements and Instrumentation by R. K. Rajput (2nd edition)
+ <li>Introduction to Thermal Systems Engineering: Thermodynamics, Fluid Mechanics, and Heat Transfer by Moran, Shapiro, Munson, Dewitt
+ <li>Applied physics by Neeraj Mehta
+ <li>Advance Semiconductor Devices by S. Sharma (1st edition)
+ <li>Textbook Of Heat Transfer by S.P.Sukhatme (4th edition)
+ <li>Modern Physics by B.L.Theraja (16th edition)
{% endblock %}
diff --git a/tbc/views.py b/tbc/views.py
index 930deb0..cc3d12c 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -450,8 +450,19 @@ def ListAICTE(request):
context = {}
context.update(csrf(request))
context['user'] = curr_user
- aicte_books = AicteBook.objects.filter(proposed=0)
- context['aicte_books'] = aicte_books
+ if request.method == "POST":
+ category = request.POST['category']
+ return HttpResponse(category)
+ context['category'] = category
+ if category == "all":
+ aicte_books = AicteBook.objects.filter(proposed=0)
+ else:
+ aicte_books = AicteBook.objects.filter(category=category, proposed=0)
+ if len(aicte_books) == 0:
+ context['no_books'] = True
+ else:
+ aicte_books = AicteBook.objects.filter(proposed=0)
+ context['aicte_books'] = aicte_books
return render_to_response('tbc/aicte-books.html', context)