Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% import "bootstrap/utils.html" as utils %}
- {% extends "template.html" %}
- {% block title %}Courses{% endblock %}
- {% block body %}
- <div class="content-section">
- <div class="outer">
- <div class="middle">
- <div class="inner">
- <br/>
- {{ utils.flashed_messages() }}
- <br/>
- <h1>Courses</h1>
- {% if courses %}
- <hr class="intro-divider">
- <div class="center">
- <table class="table table-striped table-bordered">
- <thead>
- <tr>
- <th width="15%"> Name </th>
- <th width="40%"> Description </th>
- <th width="15%"> Student Count </th>
- <th width="15%"> Edit </th>
- <th width="15%"> Delete </th>
- </tr>
- </thead>
- <tbody>
- {% for course in courses %}
- <tr>
- <td> {{ course.name }} </td>
- <td> {{ course.description }} </td>
- <td>
- {% if course.students %}
- {{ course.students.count() }}
- {% else %}
- 0
- {% endif %}
- </td>
- <td>
- <a id="edit" href="{{ url_for('admin.edit_course', id=course.id) }}">
- <i class="fa fa-pencil"></i> Edit
- </a>
- </td>
- <td>
- <a id="delete" href="{{ url_for('admin.delete_course', id=course.id) }}">
- <i class="fa fa-trash"></i> Delete
- </a>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- <div>
- {% else %}
- <div >
- <h3> No departments have been added. </h3>
- <hr class="intro-divider">
- {% endif %}
- <a href="{{ url_for('admin.add_course') }}" class="btn btn-default btn-lg">
- <i class="fa fa-plus"></i>
- Add Course
- </a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement