90 lines
3.7 KiB
HTML
90 lines
3.7 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
|
|
|
|
{% block content %}
|
|
|
|
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">{% trans 'Lecturers' %}</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
{% if request.user.is_superuser %}
|
|
<div class="manage-wrap">
|
|
<a class="btn btn-primary" href="{% url 'add_lecturer' %}"><i class="fas fa-plus"></i>{% trans 'Add Lecturer' %}</a>
|
|
<a class="btn btn-primary" target="_blank" href="{% url 'lecturer_list_pdf' %}"><i class="fas fa-download"></i> {% trans 'Download pdf' %}</a><!--new-->
|
|
</div>
|
|
{% endif %}
|
|
|
|
<p class="title-1"><i class="fas fa-chalkboard-teacher"></i>{% trans 'Lecturers' %}</p>
|
|
|
|
{% include 'snippets/messages.html' %}
|
|
{% include 'snippets/filter_form.html' %}
|
|
|
|
<div class="table-responsive table-shadow table-light table-striped m-0 mt-4">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th> {% trans 'ID No.' %}' </th>
|
|
<th> {% trans 'Full Name' %} </th>
|
|
<th> {% trans 'Email' %} </th>
|
|
<th> {% trans 'Mob No.' %} </th>
|
|
<th> {% trans 'Address/city' %} </th>
|
|
<th> {% trans 'Last login' %} </th>
|
|
{% if request.user.is_superuser %}
|
|
<th> {% trans 'Action' %} </th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for lecturer in filter.qs %}
|
|
<tr>
|
|
<td> {{ forloop.counter }}.</td>
|
|
<td>{{ lecturer.username }}</td>
|
|
<td><a href="{% url 'profile_single' lecturer.id %}">{{ lecturer.get_full_name }}</a></td>
|
|
<td>{{ lecturer.email }}</td>
|
|
<td>{{ lecturer.phone }}</td>
|
|
<td>{{ lecturer.address }}</td>
|
|
<td>{{ lecturer.last_login }}</td>
|
|
{% if request.user.is_superuser %}
|
|
<td>
|
|
<div class="dropdown">
|
|
<button class="btn btn-sm" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i class="fa fa-ellipsis-vertical"></i>
|
|
</button>
|
|
<ul class="dropdown-menu position-fixed">
|
|
<li><a class="dropdown-item" href="{% url 'staff_edit' pk=lecturer.pk %}"><i class="fas fa-edit"></i>{% trans 'Update' %}</a></li>
|
|
<li><a class="dropdown-item" target="_blank" href="{% url 'profile_single' lecturer.id %}?download_pdf=1"><i class="fas fa-download"></i>{% trans 'Download PDF' %}</a></li>
|
|
<li><a class="dropdown-item text-danger" href="{% url 'lecturer_delete' pk=lecturer.pk %}"><i class="fas fa-trash-alt"></i> {% trans 'Delete' %}</a></li>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
{% endif %}
|
|
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="8">
|
|
<span class="text-danger">
|
|
{% trans 'No Lecturer(s).' %}
|
|
{% if request.user.is_superuser %}
|
|
<a href="{% url 'add_lecturer' %}">
|
|
<i class="primary" style="font-size: 22px;">
|
|
{% trans 'Add Lecturer Now.' %}
|
|
</i>
|
|
{% endif %}
|
|
</a>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock content %}
|
|
|