Add late and expired time badges to custom admin submission list
This commit is contained in:
@@ -38,6 +38,12 @@
|
|||||||
<div class="mt-2 text-sm text-gray-600 dark:text-gray-400 pl-2">
|
<div class="mt-2 text-sm text-gray-600 dark:text-gray-400 pl-2">
|
||||||
<p class="flex items-center gap-1 mb-1"><span class="material-symbols-outlined text-[16px]">person</span> {{ result.student.first_name|default:result.student.username }}</p>
|
<p class="flex items-center gap-1 mb-1"><span class="material-symbols-outlined text-[16px]">person</span> {{ result.student.first_name|default:result.student.username }}</p>
|
||||||
<p class="flex items-center gap-1"><span class="material-symbols-outlined text-[16px]">schedule</span> {{ result.submitted_at|date:"d M Y, H:i" }}</p>
|
<p class="flex items-center gap-1"><span class="material-symbols-outlined text-[16px]">schedule</span> {{ result.submitted_at|date:"d M Y, H:i" }}</p>
|
||||||
|
{% if result.is_late %}
|
||||||
|
<p class="flex items-center gap-1 mt-1 text-xs font-medium text-red-500 dark:text-red-400 bg-red-50 dark:bg-red-900/20 py-0.5 px-2 rounded-md w-fit border border-red-100 dark:border-red-800/30"><span class="material-symbols-outlined text-[14px]">error</span> Сдано после дедлайна</p>
|
||||||
|
{% endif %}
|
||||||
|
{% if result.is_time_expired %}
|
||||||
|
<p class="flex items-center gap-1 mt-1 text-xs font-medium text-orange-500 dark:text-orange-400 bg-orange-50 dark:bg-orange-900/20 py-0.5 px-2 rounded-md w-fit border border-orange-100 dark:border-orange-800/30"><span class="material-symbols-outlined text-[14px]">timer_off</span> Время вышло</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 pl-2">
|
<div class="mt-4 pl-2">
|
||||||
<a href="{% url 'admin:lms_submission_change' result.pk %}" class="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded text-white bg-primary-600 hover:bg-primary-700 transition">
|
<a href="{% url 'admin:lms_submission_change' result.pk %}" class="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded text-white bg-primary-600 hover:bg-primary-700 transition">
|
||||||
@@ -66,6 +72,12 @@
|
|||||||
<p class="flex items-center gap-1 mb-1"><span class="material-symbols-outlined text-[16px]">person</span> {{ result.student.first_name|default:result.student.username }}</p>
|
<p class="flex items-center gap-1 mb-1"><span class="material-symbols-outlined text-[16px]">person</span> {{ result.student.first_name|default:result.student.username }}</p>
|
||||||
<p class="flex items-center gap-1 font-medium text-green-600 dark:text-green-400"><span class="material-symbols-outlined text-[16px]">done_all</span> Оценка: {{ result.grade|default:"-" }}</p>
|
<p class="flex items-center gap-1 font-medium text-green-600 dark:text-green-400"><span class="material-symbols-outlined text-[16px]">done_all</span> Оценка: {{ result.grade|default:"-" }}</p>
|
||||||
<p class="flex items-center gap-1 mt-1 text-xs"><span class="material-symbols-outlined text-[14px]">event</span> {{ result.submitted_at|date:"d M Y, H:i" }}</p>
|
<p class="flex items-center gap-1 mt-1 text-xs"><span class="material-symbols-outlined text-[14px]">event</span> {{ result.submitted_at|date:"d M Y, H:i" }}</p>
|
||||||
|
{% if result.is_late %}
|
||||||
|
<p class="flex items-center gap-1 mt-1 text-xs font-medium text-red-500 dark:text-red-400 bg-red-50 dark:bg-red-900/20 py-0.5 px-2 rounded-md w-fit border border-red-100 dark:border-red-800/30"><span class="material-symbols-outlined text-[14px]">error</span> Сдано после дедлайна</p>
|
||||||
|
{% endif %}
|
||||||
|
{% if result.is_time_expired %}
|
||||||
|
<p class="flex items-center gap-1 mt-1 text-xs font-medium text-orange-500 dark:text-orange-400 bg-orange-50 dark:bg-orange-900/20 py-0.5 px-2 rounded-md w-fit border border-orange-100 dark:border-orange-800/30"><span class="material-symbols-outlined text-[14px]">timer_off</span> Время вышло</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 pl-2">
|
<div class="mt-4 pl-2">
|
||||||
<a href="{% url 'admin:lms_submission_change' result.pk %}" class="inline-flex items-center px-3 py-1.5 border border-gray-300 dark:border-gray-600 text-xs font-medium rounded text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition">
|
<a href="{% url 'admin:lms_submission_change' result.pk %}" class="inline-flex items-center px-3 py-1.5 border border-gray-300 dark:border-gray-600 text-xs font-medium rounded text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition">
|
||||||
|
|||||||
Reference in New Issue
Block a user