diff options
Diffstat (limited to 'tbc')
-rw-r--r-- | tbc/static/css/comments.css | 40 | ||||
-rw-r--r-- | tbc/static/forms/forms_professionals.zip | bin | 587853 -> 565942 bytes | |||
-rw-r--r-- | tbc/static/forms/forms_students.zip | bin | 587334 -> 565664 bytes | |||
-rwxr-xr-x | tbc/templates/base.html | 12 | ||||
-rw-r--r-- | tbc/templates/tbc/book-details.html | 13 | ||||
-rw-r--r-- | tbc/templates/tbc/book-review.html | 14 | ||||
-rw-r--r-- | tbc/templates/tbc/books_under_progress.html | 103 | ||||
-rw-r--r-- | tbc/templates/tbc/completed_books.html | 78 | ||||
-rw-r--r-- | tbc/templates/tbc/converted_textbooks.html | 103 | ||||
-rw-r--r-- | tbc/templates/tbc/unavailable.html | 166 | ||||
-rw-r--r-- | tbc/templates/tbc/upload-content.html | 6 | ||||
-rw-r--r-- | tbc/urls.py | 4 | ||||
-rwxr-xr-x | tbc/views.py | 75 |
13 files changed, 593 insertions, 21 deletions
diff --git a/tbc/static/css/comments.css b/tbc/static/css/comments.css new file mode 100644 index 0000000..552422b --- /dev/null +++ b/tbc/static/css/comments.css @@ -0,0 +1,40 @@ +#comments-container { + width: 1100px; +} +#content-wrapper { + max-width: 97%; +} +.accordion-inner { + background: #f5f5f5; +} +#new-comment-form, +#recent-comments-wrapper { + min-height: 300px; +} +#new-comment-form input[type=text], +#new-reply-form input[type=text], +#new-comment-form textarea, +#new-reply-form textarea { + width: 80%; +} +#new-comment-form textarea, +#new-reply-form textarea { + height: 100px; +} +.replies { + margin-left: 15px; +} +.replies .reply { + padding: 3px; + margin: 5px 0; + background: #ffffff; + border-left: 2px solid #1dccaa; +} +.replies .reply small { + display: block; + line-height: 20px; + color: #b4bcc2; +} +.replies .reply p { + margin-bottom: .6em; +} diff --git a/tbc/static/forms/forms_professionals.zip b/tbc/static/forms/forms_professionals.zip Binary files differindex 1ff4af8..f13edf4 100644 --- a/tbc/static/forms/forms_professionals.zip +++ b/tbc/static/forms/forms_professionals.zip diff --git a/tbc/static/forms/forms_students.zip b/tbc/static/forms/forms_students.zip Binary files differindex 45cc72c..b9b6506 100644 --- a/tbc/static/forms/forms_students.zip +++ b/tbc/static/forms/forms_students.zip diff --git a/tbc/templates/base.html b/tbc/templates/base.html index ccd6cc7..9f1607a 100755 --- a/tbc/templates/base.html +++ b/tbc/templates/base.html @@ -86,6 +86,13 @@ <li><a href="http://python.fossee.in" target="_blank">Python Team</a></li> </ul> </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Textbooks<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:CompletedBooks' %}">Completed Books</a></li> + <li><a href="{% url 'tbc:BooksUnderProgress' %}">Books Under Progress</a></li> + </ul> + </li> <li><a href="{% url 'tbc:InternshipForms' %}">Internship Forms</a></li> {% if user %} @@ -236,8 +243,9 @@ <hr> <footer> - <center><p>© FOSSEE - IIT Bombay 2013</p></center> - <center><img src="{% static 'images/fossee.png' %}" width=100 height=70></center> + <center><p>© FOSSEE - IIT Bombay 2014</p></center> + <center><img src="{% static 'images/fossee.png' %}" width=100 height=70><br><br> + <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</center> </footer> </div> <!-- /container --> diff --git a/tbc/templates/tbc/book-details.html b/tbc/templates/tbc/book-details.html index baaeaeb..415666d 100644 --- a/tbc/templates/tbc/book-details.html +++ b/tbc/templates/tbc/book-details.html @@ -1,6 +1,19 @@ {% extends 'base.html' %} {% load static %} +{% block script %} +<script> +function redirectToIpynb(notebook) +{ + alert(notebook); + notebook = notebook.split("/") + alert("http://ipynb.fossee.in/notebooks/"+notebook[1]+"/"+notebook[2]); + url = "http://ipynb.fossee.in/notebooks/"+notebook[1]+"/"+notebook[2] + window.location.replace(url) +} +</script> +{% endblock %} + {% block content %} <center><h3>{{ book.title }}</h3></center> <div class="row-fluid"> diff --git a/tbc/templates/tbc/book-review.html b/tbc/templates/tbc/book-review.html index 98d569a..7bb88ff 100644 --- a/tbc/templates/tbc/book-review.html +++ b/tbc/templates/tbc/book-review.html @@ -2,10 +2,20 @@ {% load static %} {% block content %} {% if book_review %} -<p>Book has been approved !</p> +<center> + <div class="alert" style="width:230px;height:23px;"> + <a class="close" data-dismiss="alert" href="#">×</a> + <p>Book has been approved !</p> + </div> + </center> {% endif %} {% if mail_notify %} -<p>Successfully notified the required changes !</p> +<center> + <div class="alert" style="width:230px;height:23px;"> + <a class="close" data-dismiss="alert" href="#">×</a> + <p>Successfully notified the required changes !</p> + </div> + </center> {% endif %} <center><h3>Books to be reviewed</h3></center> <ol> diff --git a/tbc/templates/tbc/books_under_progress.html b/tbc/templates/tbc/books_under_progress.html new file mode 100644 index 0000000..8eb2e29 --- /dev/null +++ b/tbc/templates/tbc/books_under_progress.html @@ -0,0 +1,103 @@ +{% extends "base.html" %} + +{% 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>Antenna and Wave Propagation by K. D.Prasad(3rd 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>Semiconductor Devices Physics and Technology by S. M. Sze(2nd 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 + <li>Aircraft Structures For Engineering Students (4th edition) + <li>A First Course in Programming with C by T. Jeyapoovan (1st Edition) + <li>Heat And Mass Transfer - A Practical Approach by Y. A. Cengel (3rd edition) + <li>Thermodynamics BY K. M. Gupta (1st edition) + <li>Applied physics by P. K. Palanisamy (8th edition) + <li>Analysis and Design of Analog Integrated Circuits by Paul R. Gray, Paul J. Hurst, Stephen H. Lewis and Robert G. Meyer (5th edition) + <li>Electronic Devices and Circuits by S.Salivahanan ,N.Suresh Kumar , A.Vallavaraj (2nd edition) + <li>Electronic Instrumentation and Measurements by David A. Bell (2nd edition) + <li>Mechanics of Materials by beer and johnston (6th edition) + <li>Thermodynamics by C.P Arora (1st Edition) + <li>Magnifying C by Arpita Goyal (1st Editon) + <li>C Programming: A Modern Approach by K.N King (2nd Edition) + <li>Fundamentals of Electrical Machines by M.A. Salam (2nd Editon) + <li>Chemical Engineering-Fluid Flow,Heat Transfer And Mass Transfer Vol-1 by J. M. Coulson, J. F. Richardson, J. R. Backhurst And J. H. Harker (6th edition) + <li>Elements Of Chemical Reaction Engineering by H. S. Fogler (3rd edition) + <li>Programming in ANSI C by E. Balagurusamy (4th edition) + <li>Fundamental of Internal Combustion Engine by H N Gupta (1st edition) + <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) + <li>Satellite Communications by D. C. Aggarwal (1st edition) + <li>Introduction To Chemical Engineering Thermodynamics by J. M. Smith, H. C. Van Ness And M. M. Abbott (6th edition) + <li>Worked Examples In Engineering In Si Units, Volume III, Electrical Engineering by M. Bates (1st Edition) + <li>Principles of Physics by P .V. Naik (2nd edition) + <li>Thermodynamics by J. P. Holman (4th edition) + <li>Statics And Strength Of Materials by I. J. Levinson + <li>Teach yourself C++ by Herbert Schildt (3rd edition) + <li>Thermal Engineering by A. V. Arasu (1st 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>Principles Of Fluid Mechanics by M. K. Natarajan (1st edition) + <li>Meterial Science by S. L. Kakani and A. Kakani (1st 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) + <li>Basic Engineering Thermodynamics by A. Venkatesh (1st edition) + <li>Introduction To Fluid Mechanics by R. W. Fox And A. T. McDonald (5th edition) + <li>Chemical Engineering Thermodynamics by T. E. Daubert (1st Edition) + <li>Elements Of Heat Transfer by M. Jacob And G. A. Hawkins (3rd Edition) + <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) + <li>C: How to program by H.M. Deitel and P.J. Deitel (3rd edition) + <li>Electric Machinery And Transformers by I. L. Kosow (2nd edition) + <li>Data Structures using C by ISRD group (2nd edition) + <li>Water & Wastewater Engineering by G.M. Fair, J. C. Geyer & D.A. Okun + <li>Engineering Physics by Shyam Sing & Rajeev Singh (1st Edition) + <li>Let Us C++ by Yashwant Kanetkar (2nd Edition) + <li>Power Plant Engineering by P.K. Nag (3rd Edition) + <li>Engineering Physics - I by G. SenthilKumar + <li>Elements of Mechanical Engineering by N.M. Bhatt & J.R. Mehta (6th Edition) + <li>Gas Dynamics & Jet Propulsion by P. Murugaperumal (1st Edition) + <li>Internal Combustion Engines by H.B. Keswani (4th Edition) + <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) +{% endblock %} diff --git a/tbc/templates/tbc/completed_books.html b/tbc/templates/tbc/completed_books.html new file mode 100644 index 0000000..7f95cfd --- /dev/null +++ b/tbc/templates/tbc/completed_books.html @@ -0,0 +1,78 @@ +{% extends 'base.html' %} +{% load static %} + +{% block script %} +<script type="text/javascript"> +function submitCategory() +{ + document.forms.completedbooks.submit(); +} +</script> +{% endblock %} + +{% block content %} + <center><h2> Completed Text Books </h2></center><br/> + <center><h4>Select a Category</h4></center> + <form name="completedbooks" action="/completed-books/" 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="mechanical engineering">Mechanical Engineering</option> + <option value="signal processing">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> + </form> + </center> + <table class="table table-bordered table-hover"> + <th>Sr #</th> + <th>Book</th> + {% for book in completed_books %} + <tr> + <td> + {{ forloop.counter }} + </td> + <td> + <a href="{% url 'tbc:BookDetails' book.id %}">{{ book.title }} by {{ book.author }}</a> + </td> + </tr> + {% endfor %} + </table> + + <hr> + + <center><strong><p>Following completed books are in ".py" format & are to be converted to IPython notebooks. Will be made available soon.</p></strong></center> + <ol> + <li>Introduction to Probability Models, Sixth Edition - Sheldon M. Ross + <li>Introduction to Flight by J.D. Anderson (6th Edition) + <li>Elementary Principles of Chemical Processes by Richard M. Felder, Ronald W. Rosseau (3rd Edition) + <li>Modern Compressible Flow with Historical Perspective by John D. Anderson (2nd Edition) + <li>Fluid Mechanics by F.M. White (6th Edition) + <li>A Textbook of Engineering Physics by M. S. Avadhanulu (9th Edition) + <li>Introduction to thermodynamics & Heat transfer by David A. mooney(1st Edition) + <li>Structural and Stress analysis by Dr. T. H. G. Megson(2nd Edition) + <li>The C programming language by Brian W. Kernighan & Dennis M. Ritchie(2nd Edition) + <li>An Introduction to the C Programming Language and Software design by Tim Bailey(1st Edition) + <li>Elements of thermal Technology by John H. Seely(1st Edition) + <li>Object Oriented Programming with C++ by E. Balagurusamy(4th Edition) + <li>Programming in C by D. Ravichandran(1st Edition) + <li>A first of C++ from here to there by Gary J. Bronson(3rd Edition) + <li>Solid State Physics: Structure and Properties of materials by M. A. Wahab(2nd Edition) + <li>Heat Transfer(in S.I. units) by J. P. Holman(9th Edition) + <li>Op-Amps & Linear integrated circuits by Ramakant Gaykwad(4th Edition) + <li>C++ for dummies by Stephen Randy Davis(5th Edition) + <li>C by dissection: The essentials of C programming by Al Kelly & Ira Pohl(1st Edition) + </ol> +<script> + document.getElementById('category').value = "{{ category }}"; +</script> +{% endblock %} diff --git a/tbc/templates/tbc/converted_textbooks.html b/tbc/templates/tbc/converted_textbooks.html new file mode 100644 index 0000000..125f8a3 --- /dev/null +++ b/tbc/templates/tbc/converted_textbooks.html @@ -0,0 +1,103 @@ +{% extends "base.html" %} + +{% block content %} +<center><h2> Converted Text Books </h2></center><br/> +<ol> +<li>Introduction to Probability Models, Sixth Edition - Sheldon M. Ross +<li>Introduction to Flight by J.D. Anderson (6th Edition) +<li>Electronic Communication Systems by George Kennedy, Bernard Davis & S.R.M Prasanna (5th Edition) +<li>Elementary Principles of Chemical Processes by Richard M. Felder, Ronald W. Rosseau (3rd Edition) +<li>Elements of Practical Aerodynamics by Bradley Jones (4th Edition) +<li>Modern Compressible Flow with Historical Perspective by John D. Anderson (2nd Edition) +<li>The C Book by Mike Banahan, Declan Brady & Mark Doran (2nd Edition) +<li>Modern Physics by Serway, Moses, Moyer (3rd Edition) +<li>Fluid Mechanics by F.M. White (6th Edition) +<li>Applied Thermodynamics by Onkar Singh (3rd Edition) +<li>A Textbook of Engineering Physics by M. S. Avadhanulu (9th Edition) +<li>Introduction to thermodynamics & Heat transfer by David A. mooney(1st Edition) +<li>Structural and Stress analysis by Dr. T. H. G. Megson(2nd Edition) +<li>The C programming language by Brian W. Kernighan & Dennis M. Ritchie(2nd Edition) +<li>An Introduction to the C Programming Language and Software design by Tim Bailey(1st Edition) +<li>Elements of thermal Technology by John H. Seely(1st Edition) +<li>Object Oriented Programming with C++ by E. Balagurusamy(4th Edition) +<li>Programming in C by D. Ravichandran(1st Edition) +<li>A first of C++ from here to there by Gary J. Bronson(3rd Edition) +<li>Satellite Communications by Dennis Roddy(3rd Edition) +<li>Solid State Physics: Structure and Properties of materials by M. A. Wahab(2nd Edition) +<li>Fluid Mechanics by John F. Douglas(5th Edition) +<li>Heat Transfer(in S.I. units) by J. P. Holman(9th Edition) +<li>Op-Amps & Linear integrated circuits by Ramakant Gaykwad(4th Edition) +<li>C++ for dummies by Stephen Randy Davis(5th Edition) +<li>C by dissection: The essentials of C programming by Al Kelly & Ira Pohl(1st Edition) +<li>Schaum's Outlines - Programming with C++ by John R. Hubbard(2nd Edition) +<li>Engineering Physics by T. Sreekanth, K. Vijaya Kumar & S. Chandralingam(1st Edition) +<li>Electronic devices by Thomas L. Floyd +<li>Data Structures and Algorithms in Java by Robert Lafore(2nd Edition) +<li>Electric Machinery by A. E. Fitzgerald, Kingsley & Umans(6th Edition) +<li>Heat transfer applications for the Practicing Engineer by Louis Theodore(1st Edition) +<li>Principles and modern Applications of Mass transfer Operations by J. Benitez(2nd Edition) +<li>Practical C programming by Steve Qualline(3rd Edition) +<li>Basic electronics and Linear Circuits by N. N. Bhargava, D. C. Kulshreshtha, S. C. Gupta(1st Edition) +<li>Programming in C by Stephen G. Kochan(3rd Edition) +<li>Elements of electromagnetics by Mathew N. O. Sadiku(3rd Edition) +<li>C++ in Action - Industrial Strength Programming Techniques by Bartosz Milewski(2001) +<li>How to think like a Computer Scinetist: C++ version by Alleb B. Downey +<li>Beginning C++ through Game programming by Michael Dawson(3rd Edition) +<li>C++ Demystified: A self-teaching guide by Jeff Kent(1st Edition) +<li>Fundamentals of Fluid Mechanics by B. R. Munson, D. F. Young & T. H. Okishii(6th Edition) +<li>Fluid Mechanics - Worked Examples for Engineers by C. Schaschke(1st Edition) +<li> Fluidization Engineering by K. Daizo & O. Levenspiel(2nd Edition) +<li>Elements of mass transfer(Part 1) by N. Anantharaman & K. M. M. S. Begum(1st Edition) +<li>Let us C by Yashavant P. Kanetkar(5th Edition) +<li>Industrial Instrumentation by K. Krishnaswamy & S. Vijayachitra(2nd Edition) +<li>Basic Principles and Calculations in chemical Engineering by D. M. Himmelblau & J. B. Riggs(7th Edition) +<li>Beginning C by Ivon Horton(5th Edition) +<li>A Textbook of Chemical Engineering Thermodynamics by K. V. Narayanan +<li>Fundamentals of Heat and Mass transfer by Incropera(3rd Edition) +<li>Electronic Principles by Albert Malvino & David J. Bates(7th Edition) +<li>Thermodynamics: A core course by R. C. Srivastava, S. K. Saha & A. K. Jain(2nd Edition) +<li>C++ from the ground by Herbert Schildt(3rd Edition) +<li>Electrical circuit theory and technology by J. O. Bird(2nd revised edition) +<li>Engineering Thermodynamics: A Computer approach by R. K. Rajput(SI units version) +<li>Engineering heat transfer by W. S. Janna(2nd Edition) +<li>Basic Mechanical Engineering by G. K. Pathak & D. K. Chavan(1st Edition) +<li>Fundamentals of Electronic devices by J. B. Gupta(1st Edition) +<li>Engineering physics by A. Marikani(1st Edition) +<li>Heat transfer by K. A. Gavhane(10th Edition) +<li>Linear Integrated Circuits by S. Salivahanan, V. S. Kanchana Bhaaskaran(1stEdition) +<li>Microwave and radar engineering by M. Kulkarni(3rd Edition) +<li>Chemical Engineering Thermodynamics by K. V. Narayanan(1st Edition) +<li>A Comprehensive Textbook of Applied Physics by M. Kumar(1st Edition) +<li>Ansi C Programming by Yashwant Kanetkar(1st Edition) +<li>Fluid Mechanics for Chemical Engineers by N. D. Nevers +<li>Mechanics of Materials by J. M. Gere(6th Edition) +<li>Introduction to chemical engineering by S. K. Ghoshal & S. Datta(1st Edition) +<li>Physical and Chemical Equilibrium for chemical Engineers by N. De. Nevers(1st Edition) +<li>Satellite Communication by Anil K. Maini & Varsha Agarwal(1st Edition) +<li>Engineering Physics by G. Aruldhas(1st Edition) +<li>Principles of Data Structures using C and C++ by Vinu V. Das +<li>Solid State Physics by P. K. Palanisamy(1st Edition) +<li>Programming with Java: A primer by E. Balagurusamy(3rd Edition) +<li>Fluid Mechanics by Irafan A. Khan(1st Edition) +<li>Material Science and Engineering: An introduction by William D. Callister(7th Edition) +<li>Hydraulics by J. Lal(2nd Edition) +<li>Chemical Engineering Thermodynamics by P. Ahuja +<li>Surveying volume 3 by B. C. Punmia +<li>Power Electronics:Principles & Applications by J. M. Jacob +<li>Fluid Power Theory & Applications by J. Sullivan(4th Edition) +<li>Optical communication by S. Katiyar(3rd Edition) +<li>Engineering Physics by Dr. K. Vijaya Kumar +<li>Basic Electrical engineering by D. C. Kulshreshtha +<li>Transport Phenomena by R. S. Brodkey & H. C. Hershey(1st Edition) +<li>Electrical Power Systems: Concepts, theory and Practice by Subir Ray(EE Edition) +<li>Problems in Fluid Flow by D. J. Brasch and D. Whyman(1st Edition) +<li>Programming with ANSI and Turbo C by Ashok N. Kamthane(1st Edition) +<li>Fundamentals of Engineering Thermodynamics by Moran & Shapiro (5th Edition) +<li>Miller & Freunds Probability & Statistics for Engineers by Richard J. (8th Edition) +<li>Concepts of modern physics by Arthur Beiser(6th Edition) +<li>Fundamentals of electronic drives and control by B. R. Gupta & V. Singhal(1st Edition) +<li>Thermodynamics by F. P. Durham(2nd Edition) +<li>Applied Physics II by H. J. Sawant +</ol> + +{% endblock %} diff --git a/tbc/templates/tbc/unavailable.html b/tbc/templates/tbc/unavailable.html new file mode 100644 index 0000000..15d5233 --- /dev/null +++ b/tbc/templates/tbc/unavailable.html @@ -0,0 +1,166 @@ +{% load static %} +<!DOCTYPE html> +<html lang="en"> + <head> + <title> + {% block title %} + Python Textbook Companion Project | FOSSEE, IIT Bombay + {% endblock %} + </title> + {% block meta %} + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content=""> + {% endblock %} + + <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css" /> + <link rel ="stylesheet" href="{% static 'css/responsive.css' %}" type="text/css"/> + <style> + .module-list { + float: left; + height: 220px; + margin-top: 20px; + margin-bottom: 20px; + margin-left: 50px; + padding: 10px; + padding-bottom: 25px; + position: relative; + width: 300px; + background: #2c3e50; + } + .module-list img { + height: 220px; + } + .module-list img:hover{ + height: 220px; + border-radius: 15px; + } + + .module-list a{ + color: #ffffff; + } + .navbar .container { + max-width: 1100px; + } + #content-wrap{ + max-width: 1100px; + margin: 0 auto; + } + input[type="text"] { + width: 100%; + } + input[type="password"] { + width: 100%; + } + </style> + + {% block css %} + <style type="text/css"> + body { + padding-top: 60px; + padding-bottom: 40px; + } + </style> + {% endblock %} + + {% block script %} + {% endblock %} + </head> + +<body> +<div class="navbar navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="container"> + <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="/">Python Textbook Companion</a> + <div class="nav-collapse collapse"> + + <!--ul class="nav pull-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="http://fossee.in" target="_blank">FOSSEE</a></li> + <li><a href="http://python.fossee.in" target="_blank">Python Team</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Textbooks<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:CompletedBooks' %}">Completed Books</a></li> + <li><a href="{% url 'tbc:BooksUnderProgress' %}">Books Under Progress</a></li> + </ul> + </li> + <li><a href="{% url 'tbc:InternshipForms' %}">Internship Forms</a></li> + + {% if user %} + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.first_name }}<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:SubmitBook' %}">Submit Book</a></li> + <li><a href="{% url 'tbc:UpdateBook' %}">Update Submission</a></li> + <li><a href="{% url 'tbc:UpdatePassword' %}">Update Password</a></li> + <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> + </ul> + </li> + {% endif %} + + {% if reviewer %} + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ reviewer.first_name }} {{ reviewer.last_name }} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:BookReview' %}">Review Books</a></li> + <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> + </ul> + </li> + {% endif %} + + {% if anonymous %} + <li><a href="{% url 'tbc:UserLogin' %}">Login</a></li> + <li><a href="{% url 'tbc:UserRegister' %}">Sign Up</a></li> + {% endif %} + + </ul> <!--/.nav --> + </div><!--/.nav-collapse --> + </div> + </div> + </div> + <div class="container"> + {% block content %} + <center> + <h2>Sorry ! this site is temporarily unavailable.</h2> + <br> + <h4>We are currently working to fix some internal issues. We will be back on or before 21st June 00:00 hrs IST</h4> + <br> + <h5>For any queries please contact us at <b>"textbook[at]fossee[dot]in"</b></h5> + </center> + {% endblock %} + <hr> + + <footer> + <center><p>© FOSSEE - IIT Bombay 2013</p></center> + <center><img src="{% static 'images/fossee.png' %}" width=100 height=70></center> + </footer> + + </div> <!-- /container --> + + <script src="{% static 'js/jquery.js' %}"></script> + <script src="{% static 'js/bootstrap.min.js' %}"></script> + <!-- google analytics --> + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-44697375-2', 'fossee.in'); + ga('send', 'pageview'); + </script> + <!-- / google analytics --> + </body> +</html> + diff --git a/tbc/templates/tbc/upload-content.html b/tbc/templates/tbc/upload-content.html index 1b73691..2423bd4 100644 --- a/tbc/templates/tbc/upload-content.html +++ b/tbc/templates/tbc/upload-content.html @@ -15,7 +15,7 @@ function validate_content() alert("Chapter names & file fields cannot be empty !!"); return false; } - if(extension[1] == "ipynb") + if(extension.slice(Math.max(extension.length - 1, 1)) == "ipynb") continue; else alert("Oops !! You can upload only Ipython Notebooks (.ipynb extension)"); @@ -32,7 +32,7 @@ function validate_content() return false; } - if(extension[1] == "png") + if(extension.slice(Math.max(extension.length - 1, 1)) == "png") continue; else alert("Only .png files are allowed for screenshots"); @@ -60,7 +60,7 @@ function validate_content() {% endfor %} <br> <hr> - <p>Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any cahpter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper captions for each of them. Only .png files are acceptable.</p> + <p>Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any cahpter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper caption for the screen shots. Only .png files are acceptable.</p> {% for i in no_images %} <input type=text id=caption{{i}} name=caption{{i}} placeholder="Caption {{ forloop.counter }}"> <input type=file id=image{{i}} name=image{{i}}> diff --git a/tbc/urls.py b/tbc/urls.py index 9289155..7cf07a7 100644 --- a/tbc/urls.py +++ b/tbc/urls.py @@ -28,6 +28,10 @@ urlpatterns = patterns('', url(r'^browse-books/(?P<category>.+)$', 'tbc.views.BrowseBooks', name='BrowseBooks'), url(r'^convert-notebook/(?P<notebook_path>.+)$', 'tbc.views.ConvertNotebook', name='ConvertNotebook'), url(r'^book-details/(?P<book_id>\d+)/$', 'tbc.views.BookDetails', name='BookDetails'), + url(r'^completed-books/$', 'tbc.views.CompletedBooks', name='CompletedBooks'), + url(r'^completed-books/(?P<category>.+)$', 'tbc.views.CompletedBooks', name='CompletedBooks'), + url(r'^books-under-progress/$', 'tbc.views.BooksUnderProgress', name='BooksUnderProgress'), + url(r'^redirect-ipynb/(?P<notebook_path>.+)$', 'tbc.views.RedirectToIpynb', name='RedirectToIpynb'), url(r'^book-review/$', 'tbc.views.BookReview', name='BookReview'), diff --git a/tbc/views.py b/tbc/views.py index 8af5c2e..1fa3384 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -164,6 +164,7 @@ def UserLogin(request): def UserRegister(request): + context = {} if request.method == 'POST': form = UserRegisterForm(request.POST) if form.is_valid(): @@ -177,13 +178,13 @@ def UserRegister(request): return render_to_response('tbc/register.html', context) else: form = UserRegisterForm() - context = {} context.update(csrf(request)) context['form'] = form return render_to_response('tbc/register.html', context) def UserProfile(request): + context = {} user = request.user if user.is_authenticated(): if request.method == 'POST': @@ -199,13 +200,11 @@ def UserProfile(request): add_log(user, user, CHANGE,'Profile entry') return HttpResponseRedirect('/') else: - context = {} context.update(csrf(request)) context['form'] = form return render_to_response('tbc/profile.html', context) else: form = UserProfileForm() - context = {} context.update(csrf(request)) context['form'] = form context['user'] = user @@ -262,8 +261,8 @@ def ForgotPassword(request): def UpdatePassword(request): - user = request.user context = {} + user = request.user context.update(csrf(request)) if user.is_authenticated(): if request.method == 'POST': @@ -300,8 +299,8 @@ def UpdatePassword(request): def SubmitBook(request): - curr_user = request.user context = {} + curr_user = request.user if request.method == 'POST': form = BookForm(request.POST) if form.is_valid(): @@ -621,6 +620,7 @@ def SubmitSample(request, proposal_id=None, old_notebook_id=None): def UpdateBook(request): + context = {} current_user = request.user user_profile = Profile.objects.get(user=current_user) try: @@ -630,7 +630,6 @@ def UpdateBook(request): title = book_to_update.title chapters = Chapters.objects.filter(book=book_to_update) screenshots = ScreenShots.objects.filter(book=book_to_update) - context = {} if request.method == 'POST': book_form = BookForm(request.POST, instance=book_to_update) if book_form.is_valid(): @@ -714,11 +713,11 @@ def SubmitCode(request): def UpdateContent(request, book_id=None): + context = {} user = request.user current_book = Book.objects.get(id=book_id) chapters_to_update = Chapters.objects.filter(book=current_book) screenshots_to_update = ScreenShots.objects.filter(book=current_book) - context = {} if request.method == 'POST': for i in range(1, current_book.no_chapters+1): chapter = Chapters.objects.get(id=chapters_to_update[i-1].id) @@ -797,7 +796,7 @@ def BookDetails(request, book_id=None): else: context['user'] = request.user book = Book.objects.get(id=book_id) - chapters = Chapters.objects.filter(book=book) + chapters = Chapters.objects.filter(book=book).order_by('name') images = ScreenShots.objects.filter(book=book) context['chapters'] = chapters context['images'] = images @@ -810,7 +809,7 @@ def BookReview(request, book_id=None): if is_reviewer(request.user): if book_id: book = Book.objects.get(id=book_id) - chapters = Chapters.objects.filter(book=book) + chapters = Chapters.objects.filter(book=book).order_by('name') images = ScreenShots.objects.filter(book=book) proposal = Proposal.objects.get(accepted=book) logs = ActivityLog.objects.filter(proposal_id=proposal.id) @@ -838,8 +837,8 @@ def BookReview(request, book_id=None): def ApproveBook(request, book_id=None): - user = request.user context = {} + user = request.user if is_reviewer(request.user): if request.method == 'POST' and request.POST['approve_notify'] == "approve": book = Book.objects.get(id=book_id) @@ -849,13 +848,14 @@ def ApproveBook(request, book_id=None): proposal.status = "book completed" proposal.save() file_path = os.path.abspath(os.path.dirname(__file__)) - zip_path = "/".join(file_path.split("/")[1:-2]) - zip_path = "/"+zip_path+"/Python-Textbook-Companions/" + copy_path = "/".join(file_path.split("/")[1:-2]) + copy_path = "/"+copy_path+"/Python-Textbook-Companions/" file_path = file_path+"/static/uploads/" directory = file_path+book.contributor.user.first_name os.chmod(directory, 0777) os.chdir(directory) - fp = open(book.title+"/README.txt", 'w') + book_title = book.title.replace(" ", "_") + fp = open(book_title+"/README.txt", 'w') fp.write("Contributed By: "+book.contributor.user.first_name+" "+book.contributor.user.last_name+"\n") fp.write("Course: "+book.contributor.course+"\n") fp.write("College/Institute/Organization: "+book.contributor.insti_org+"\n") @@ -867,7 +867,7 @@ def ApproveBook(request, book_id=None): fp.write("Isbn: "+book.isbn+"\n") fp.write("Edition: "+book.edition) fp.close() - x = shutil.copytree(book.title, zip_path+book.title) + os.popen("cp -r '"+book_title+"' '"+copy_path+"'") subject = "Python-TBC: Book Completion" message = "Hi "+book.contributor.user.first_name+",\n"+\ "Congratulations !\n"+\ @@ -955,6 +955,7 @@ def BrowseBooks(request): def ConvertNotebook(request, notebook_path=None): + context = {} path = os.path.abspath(os.path.dirname(__file__)) path = path+"/static/uploads/" path = path+notebook_path @@ -974,6 +975,52 @@ def ConvertNotebook(request, notebook_path=None): return render_to_response(template, {}) +def CompletedBooks(request): + context = {} + context.update(csrf(request)) + category = "All" + if request.user.is_anonymous(): + context['anonymous'] = True + else: + if is_reviewer(request.user): + context['reviewer'] = request.user + else: + context['user'] = request.user + if request.method == "POST": + category = request.POST['category'] + if category == "all": + completed_books = Book.objects.filter(approved=True) + else: + completed_books = Book.objects.filter(category=category, approved=True) + else: + completed_books = Book.objects.filter(approved=True) + context['category'] = category + context['completed_books'] = completed_books + return render_to_response('tbc/completed_books.html', context) + + +def BooksUnderProgress(request): + context = {} + images = [] + if request.user.is_anonymous(): + context['anonymous'] = True + else: + if is_reviewer(request.user): + context['reviewer'] = request.user + else: + context['user'] = request.user + return render_to_response('tbc/books_under_progress.html', context) + + +def RedirectToIpynb(request, notebook_path=None): + context = {} + notebook = notebook_path.split("/") + notebook[0] = "notebooks" + notebook = "/".join(notebook) + redirect_url = "https://ipynb.fossee.in/"+notebook + return redirect(redirect_url) + + # ajax views @csrf_exempt def ajax_matching_books(request): |