From 6442f696ed2a8d4e32a59af7b89d153f8cc0c87b Mon Sep 17 00:00:00 2001
From: Bo-Chun Louis Chen <louistw@uab.edu>
Date: Thu, 24 May 2018 14:58:19 -0500
Subject: [PATCH] Added admin Employees templates

---
 app/templates/admin/employees/employee.html  | 25 +++++++
 app/templates/admin/employees/employees.html | 68 ++++++++++++++++++++
 2 files changed, 93 insertions(+)
 create mode 100644 app/templates/admin/employees/employee.html
 create mode 100644 app/templates/admin/employees/employees.html

diff --git a/app/templates/admin/employees/employee.html b/app/templates/admin/employees/employee.html
new file mode 100644
index 0000000..4a6e979
--- /dev/null
+++ b/app/templates/admin/employees/employee.html
@@ -0,0 +1,25 @@
+{% import "bootstrap/wtf.html" as wtf %}
+{% extends "base.html" %}
+{% block title %}Assign Employee{% endblock %}
+{% block body %}
+<div class="content-section">
+	<div class="outer">
+		<div class="middle">
+			<div class="inner">
+				<div class="center">
+					<h1> Assign Departments and Roles </h1>
+					<br/>
+					<p>
+						Select a department and role to assign to
+						<span style="color: #aec251;">
+							{{ employee.first_name }} {{ employee.last_name }}
+						</span>
+					</p>
+					<br/>
+					{{ wtf.quick_form(form) }}
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+{% endblock %}
diff --git a/app/templates/admin/employees/employees.html b/app/templates/admin/employees/employees.html
new file mode 100644
index 0000000..3a868be
--- /dev/null
+++ b/app/templates/admin/employees/employees.html
@@ -0,0 +1,68 @@
+{% import "bootstrap/utils.html" as utils %}
+{% extends "base.html" %}
+{% block title %}Employees{% endblock %}
+{% block body %}
+<div class="content-section">
+	<div class="outer">
+		<div class="middle">
+			<div class="inner">
+				<br/>
+				{{ utils.flashed_messages() }}
+				<br/>
+				<h1 style="text-align:center;">Employees</h1>
+					{% if employees %}
+						<hr class="intro-divider">
+						<div class="center">
+							<table class="table table-striped table-bordered">
+								<thead>
+									<tr>
+										<th width="15%"> Name </th>
+										<th width="30%"> Department </th>
+										<th width="30%"> Role </th>
+										<th width="15%"> Assign </th>
+									</tr>
+								</thead>
+								<tbody>
+									{% for employee in employees %}
+										{% if employee.is_admin %}
+												<tr style="background-color: #aec251; color: white;">
+													<td> <i class="fa fa-key"></i> Admin </td>
+													<td> N/A </td>
+													<td> N/A </td>
+													<td> N/A </td>
+												</tr>
+										{% else %}
+												<tr>
+													<td> {{ employee.first_name }} {{ employee.last_name }} </td>
+													<td>
+														{% if employee.department %}
+															{{ employee.department.name }}
+														{% else %}
+															-
+														{% endif %}
+													</td>
+													<td>
+														{% if employee.role %}
+															{{ employee.role.name }}
+														{% else %}
+															-
+														{% endif %}
+													</td>
+													<td>
+														<a href="{{ url_for('admin.assign_employee', id=employee.id) }}">
+															<i class="fa fa-user-plus"></i> Assign
+														</a>
+													</td>
+												</tr>
+										{% endif %}
+									{% endfor %}
+								</tbody>
+							</table>
+						</div>
+					{% endif %}
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+{% endblock %}
-- 
GitLab