diff options
author | hardythe1 | 2013-10-22 17:31:15 +0530 |
---|---|---|
committer | hardythe1 | 2013-10-22 17:31:15 +0530 |
commit | c7b48513fb2cb0cdd0e4ec0050b8dbcbddc698f5 (patch) | |
tree | 52b3a71ce8b42ca74a9bd92fff4560fcb3cf7895 /tbc/templates | |
parent | 266347a58de32b21c3fa1ae3b9a4b466d4584372 (diff) | |
download | Python-TBC-Interface-c7b48513fb2cb0cdd0e4ec0050b8dbcbddc698f5.tar.gz Python-TBC-Interface-c7b48513fb2cb0cdd0e4ec0050b8dbcbddc698f5.tar.bz2 Python-TBC-Interface-c7b48513fb2cb0cdd0e4ec0050b8dbcbddc698f5.zip |
Adding the project initial commit
Diffstat (limited to 'tbc/templates')
-rwxr-xr-x | tbc/templates/base.html | 116 | ||||
-rw-r--r-- | tbc/templates/base1.html | 75 | ||||
-rw-r--r-- | tbc/templates/tbc/book-details.html | 28 | ||||
-rw-r--r-- | tbc/templates/tbc/browse-books.html | 25 | ||||
-rw-r--r-- | tbc/templates/tbc/login.html | 8 | ||||
-rw-r--r-- | tbc/templates/tbc/profile.html | 8 | ||||
-rw-r--r-- | tbc/templates/tbc/register.html | 8 | ||||
-rw-r--r-- | tbc/templates/tbc/submit-book.html | 9 | ||||
-rw-r--r-- | tbc/templates/tbc/upload-chapters.html | 16 | ||||
-rw-r--r-- | tbc/templates/tbc/upload-images.html | 11 |
10 files changed, 304 insertions, 0 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html new file mode 100755 index 0000000..042203c --- /dev/null +++ b/tbc/templates/base.html @@ -0,0 +1,116 @@ +{% 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/base.css' %}" type="text/css" /> + <link rel ="stylesheet" href="{% static 'css/responsive.css' %}" type="text/css"/> + {% block css %} + <style type="text/css"> + body { + padding-top: 60px; + padding-bottom: 40px; + } + </style> + {% endblock %} + + {% block script %} + {% endblock %} + </head> + +<body> +<div class="navbar navbar-inverse 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"> + <li><a href="#">Internship Forms</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">Python TBC</a></li> + <li><a href="http://fossee.in" target="_blank">FOSSEE</a></li> + <li><a href="#" target="_blank">Python Team</a></li> + </ul> + </li> + </ul> + {% if not user %} + <form action="" method="post" class="navbar-form pull-right"> + <button type="button" class="btn" onclick='location.replace("{% url 'tbc:UserLogin' %}");'>Login</button> + <button type="button" class="btn" onclick='location.replace("{% url 'tbc:UserRegister' %}");'>Sign Up</button> + </form> + {% else %} + <div class="btn-group pull-right"> + <button class="btn">{{ user.first_name }} {{ user.last_name }}</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:SubmitBook' %}">Submit Book</a></li> + <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> + </ul> + </div> + {% endif %} + + </div><!--/.nav-collapse --> + </div> + </div> + </div> + <div class="container"> + <!-- Main hero unit for a primary marketing message or call to action --> + <div class="hero-unit"> + {% block content %} + <div class="row-fluid"> + <center><h3>Latest Books</h3></center> + {% for item in items %} + <div class ="module-list"> + <a href="{% url 'tbc:BookDetails' item.book.id %}"><img src="{% static 'uploads/' %}{{ item.image.image }}"></a> + <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.name }}</a></center> + </div> + {% endfor %} + </div> + <hr> + <input type=text> <input type=submit value=Search><a href="{% url 'tbc:BrowseBooks' %}" style="float:right;">Browse All Books</a> + {% endblock %} + </div> + <hr> + + <footer> + <center><p>© FOSSEE - IIT Bombay 2013</p></center> + </footer> + + </div> <!-- /container --> + + <script src="{% static 'js/jquery.js' %}"></script> + <script src="{% static 'js/bootstrap-transition.js' %}"></script> + <script src="{% static 'static/js/bootstrap-alert.js' %}"></script> + <script src="{% static 'js/bootstrap-modal.js' %}"></script> + <script src="{% static 'js/bootstrap-dropdown.js' %}"></script> + <script src="{% static 'js/bootstrap-scrollspy.js' %}"></script> + <script src="{% static 'js/bootstrap-tab.js' %}"></script> + <script src="{% static 'js/bootstrap-tooltip.js' %}"></script> + <script src="{% static 'js/bootstrap-popover.js' %}"></script> + <script src="{% static 'js/bootstrap-button.js' %}"></script> + <script src="{% static 'js/bootstrap-collapse.js' %}"></script> + <script src="{% static 'js/bootstrap-carousel.js' %}"></script> + <script src="{% static 'js/bootstrap-typeahead.js' %}"></script> + </body> +</html> + diff --git a/tbc/templates/base1.html b/tbc/templates/base1.html new file mode 100644 index 0000000..de6950c --- /dev/null +++ b/tbc/templates/base1.html @@ -0,0 +1,75 @@ +{% load static %} +<!DOCTYPE html> +<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> + +<head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width" /> + <title>Scipy India 2013 | IIT Bombay</title> + <link rel="stylesheet" href="{% static 'css/base.css' %}" type="text/css" /> + <link rel ="stylesheet" href="{% static 'css/responsive.css' %}" type="text/css"/> +</head> + +<body> +<div class="navbar navbar-inverse 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 Texbook Companion</a> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="/internshipforms">Internship Forms</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="/aboutpytbc">Python TBC</a></li> + <li><a href="http://fossee.in" target="_blank">FOSSEE</a></li> + </ul> + </li> + </ul> + {% if not user %} + <form action="" method="post" class="navbar-form pull-right"> + <button type="button" class="btn" onclick='location.replace("{% url 'tbc:UserLogin' %}");'>Login</button> + <button type="button" class="btn" onclick='location.replace("{{URL_ROOT}}/register");'>Sign Up</button> + </form> + {% else %} + <div class="btn-group pull-right"> + <button class="btn">{{ user.first_name }} {{ user.last_name }}</button> + <button class="btn dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li><a href="/submitproposal">Submit Book</a></li> + <li><a href="/logout">Edit Profile</a></li> + <li><a href="#">Python Team</a></li> + <li><a href="/logout">Logout</a></li> + </ul> + </div> + {% endif %} + </div><!--/.nav-collapse --> + </div> + </div> + </div> + <div class="container"> + <div class="hero-unit"> + {% block content %} + {% for book in books %} + <a href="{% url 'tbc:BookDetails' book.id %}">{{ book.name }}</a> + {% endfor %} + {% endblock %} + </div> + <hr> + + <footer> + <p>© FOSSEE - IIT Bombay 2013</p> + </footer> + + </div> <!-- /container --> +</body> +</html> diff --git a/tbc/templates/tbc/book-details.html b/tbc/templates/tbc/book-details.html new file mode 100644 index 0000000..20b472a --- /dev/null +++ b/tbc/templates/tbc/book-details.html @@ -0,0 +1,28 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} +<center><h3>{{ book.name }}</h3></center> +<div class="row-fluid"> +{% for image in images %} + <div class ="module-list"> + <img src="{% static 'uploads/' %}{{ image.image }}"> + <center><p>{{ image.caption }}</p></center> + </div> +{% endfor %} +</div> +<hr> +<ol> +{% for chapter in chapters %} + <li><a href="https://www.nbviewer.ipython.org/url/fosseeapps.in{% static 'uploads/' %}{{ chapter.notebook }}">{{ chapter.name }}</a> +{% endfor %} +</ol> +<hr> +<a href="{% url 'tbc:GetZip' book.id %}" style="float:right;">Download Book as Zip</a> +<table> +<tr><td>Author: <td>{{ book.author }} +<tr><td>Publisher: <td>{{ book.publisher }} +<tr><td>ISBN: <td>{{ book.isbn }} +<tr><td>Contributor: <td>{{ book.contributor.user.first_name }} {{ book.contributor.user.last_name }} +<tr><td>Email: <td>{{ book.contributor.user.email }}<br> +</table> +{% endblock %} diff --git a/tbc/templates/tbc/browse-books.html b/tbc/templates/tbc/browse-books.html new file mode 100644 index 0000000..36f292a --- /dev/null +++ b/tbc/templates/tbc/browse-books.html @@ -0,0 +1,25 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} +<form action="/browse-books/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +<center><select name="category"> + <option value="computer science">Computer Science</option> + <option value="chemical engg">Chemical Engg</option> + <option value="aerospace engg">Aerospace Engg</option> + <option value="electrical engg">Electrical Engg</option> + <option value="thermodynamics">Thermodynamics</option> + <option value="mechanical engg">Mechanical Engg</option> + <option value="mathematics">Mathematics</option> +</select> +<input type=submit value=Search> +</form> +<div class="row-fluid"> + {% for item in items %} + <div class ="module-list"> + <img src="{% static 'uploads/' %}{{ item.image.image }}"> + <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.name }}</a></center> + </div> + {% endfor %} + </div> +{% endblock %} diff --git a/tbc/templates/tbc/login.html b/tbc/templates/tbc/login.html new file mode 100644 index 0000000..6d7a050 --- /dev/null +++ b/tbc/templates/tbc/login.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% block content %} +<form action="/login/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +{{ form.as_p }} +<input type=submit value=Login> +</form> +{% endblock %} diff --git a/tbc/templates/tbc/profile.html b/tbc/templates/tbc/profile.html new file mode 100644 index 0000000..3a1abe3 --- /dev/null +++ b/tbc/templates/tbc/profile.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% block content %} +<form action="/profile/" method=POST> +{% csrf_token %} +{{ form.as_p }} +<input type=submit value=submit> +</form> +{% endblock %} diff --git a/tbc/templates/tbc/register.html b/tbc/templates/tbc/register.html new file mode 100644 index 0000000..72ff3bb --- /dev/null +++ b/tbc/templates/tbc/register.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% block content %} +<form action="/register/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +{{ form.as_p }} +<input type=submit value=submit> +</form> +{% endblock %} diff --git a/tbc/templates/tbc/submit-book.html b/tbc/templates/tbc/submit-book.html new file mode 100644 index 0000000..581f919 --- /dev/null +++ b/tbc/templates/tbc/submit-book.html @@ -0,0 +1,9 @@ +{% extends 'base.html' %} +{% block content %} +<form action="/submit-book/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +{{ form.as_table }} +<br> +<input type=submit value=submit> +</form> +{% endblock %} diff --git a/tbc/templates/tbc/upload-chapters.html b/tbc/templates/tbc/upload-chapters.html new file mode 100644 index 0000000..2467a9d --- /dev/null +++ b/tbc/templates/tbc/upload-chapters.html @@ -0,0 +1,16 @@ +{% extends 'base.html' %} +{% block content %} +<form action="/upload-chapters/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +{% for i in no_notebooks %} +<input type=text name=chapter{{i}}> +<input type=file name=notebook{{i}}> +{% endfor %} +<br> +<center><input type=submit value=submit></center> +</form> +<form action="/get-zip/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +<center><input type=submit value="Get Zip"></center> +</form> +{% endblock %} diff --git a/tbc/templates/tbc/upload-images.html b/tbc/templates/tbc/upload-images.html new file mode 100644 index 0000000..2cfc076 --- /dev/null +++ b/tbc/templates/tbc/upload-images.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} +{% block content %} +<form action="/upload-images/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +{% for i in no_images %} +<input type=text name=caption{{i}}> +<input type=file name=image{{i}}> +{% endfor %} +<br><input type=submit value=submit> +</form> +{% endblock %} |