jpscontracting/templates/project_index.html
Alexander Hosking b58bc5cc1b First flask push
2017-01-12 08:06:39 -05:00

47 lines
1.3 KiB
HTML

{% extends "layout.html" %}
{% block body %}
<h1>Add Project(s)</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form action="{{ url_for('projects_insert') }}" method="post">
<div class="form-group col-xs-8">
<label for="first_name">Name:</label>
<input type="text" class="form-control" id="project_name" name="project_name" placeholder="Project Name">
</div>
<div class="form-group col-xs-4">
<label for="last_name">Custom ID:</label>
<input type="text" class="form-control" id="project_id" name="project_id" placeholder="Project ID">
</div>
<button type="submit" class="btn btn-default">Create</button>
</form>
{% if projects %}
<h2>View</h2>
<table class="table table-condensed table-bordered table-striped">
<tr>
<th>Project Name</th>
<th>Project ID</th>
<th>Number of Employees</th>
</tr>
{% for project in projects %}
<tr>
<td>{{ project.project_name }}</td>
<td>{{ project.project_id }}</td>
<td></td>
<td><a href="{{ url_for('projects_delete', id=project.id) }}">Delete</a></td>
</tr>
{% endfor %}
</table>
{% else %}
<b>There is no data in project land!</b>
{% endif %}
{% endblock %}