From 07b5c481c3a6fe6d93a8002e17685e1d8e7e6f72 Mon Sep 17 00:00:00 2001 From: Nathan Bills <ndbills@gmail.com> Date: Sat, 19 Apr 2014 23:19:42 -0600 Subject: [PATCH] Built the loan page and updated other things. --- project/controllers/loan.py | 2 +- project/templates/loan/master.html | 32 ++++++++++++++++++++++++++++++ project/templates/usernav.html | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/project/controllers/loan.py b/project/controllers/loan.py index 9912213..52ab879 100644 --- a/project/controllers/loan.py +++ b/project/controllers/loan.py @@ -6,4 +6,4 @@ from flask.ext.wtf import Form, TextField, validators @app.route('/loaned') @security('user') def loaned(user=None): - return render_template('loan/master.html') \ No newline at end of file + return render_template('loan/master.html', user=user) \ No newline at end of file diff --git a/project/templates/loan/master.html b/project/templates/loan/master.html index 31c08e6..d031860 100644 --- a/project/templates/loan/master.html +++ b/project/templates/loan/master.html @@ -2,5 +2,37 @@ {% block content %} <div class="col-sm-12"> <h3>Movies Loaned Out</h3> + <table class="table table-striped table-hover"> + <thead> + <tr> + <td>Movie</td> + <td>Borrower</td> + <td>Date Borrowed</td> + <td>Due Date</td> + <td>Options</td> + </tr> + </thead> + <tbody> + <tr> + <td> + <p>The Bourne Identity</p> + </td> + <td> + <p>Brian Wood</p> + </td> + <td> + <p>Thur, April 17, 2014/p> + </td> + <td> + <p>Thur, May 1, 2014</p> + </td> + <td> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-hand-down"></span> Return + </button> + </td> + </tr> + </tbody> + </table> </div> {% endblock %} \ No newline at end of file diff --git a/project/templates/usernav.html b/project/templates/usernav.html index 56e88bb..b875e66 100644 --- a/project/templates/usernav.html +++ b/project/templates/usernav.html @@ -1,6 +1,6 @@ {% extends "index.html" %} -{% block usernav if user %} +{% block usernav %} <p class="navbar-text">Hello, {{ user.email }}</p> <ul class="nav navbar-nav navbar-right"> <li><a href="{{ url_for('libraries') }}">Libraries</a></li> -- GitLab