f
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
{% extends "admin/change_list.html" %}
|
||||
{% load i18n admin_urls static admin_list unfold_list %}
|
||||
|
||||
{% block result_list %}
|
||||
{% if actions_on_top %}
|
||||
{% if cl.search_fields or action_form or cl.has_filters %}
|
||||
<div class="bg-gray-50 flex flex-col gap-3 mb-4 p-3 rounded-md lg:flex-row dark:bg-gray-800">
|
||||
{% block search %}
|
||||
{% search_form cl %}
|
||||
{% endblock %}
|
||||
|
||||
{% block filters %}
|
||||
{% if cl.has_filters %}
|
||||
<a class="{% if cl.has_active_filters %}bg-primary-600 border-primary-600 text-white{% else %}bg-white dark:bg-gray-900 dark:border-gray-700{% endif %} border cursor-pointer flex font-medium group items-center px-3 py-2 rounded-md shadow-sm text-sm lg:ml-auto md:mt-0 {% if not cl.model_admin.list_filter_sheet %}2xl:hidden{% endif %}" x-on:click="filterOpen = true" x-on:keydown.escape.window="filterOpen = false">
|
||||
{% trans "Filters" %}
|
||||
|
||||
<span class="material-symbols-outlined md-18 ml-auto -mr-1 pl-4 {% if cl.has_active_filters %}text-white{% else %}text-gray-400 group-hover:text-gray-500 dark:group-hover:text-gray-400 dark:text-gray-500{% endif %}">filter_list</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-4 pb-8">
|
||||
<!-- PENDING COLUMN -->
|
||||
<div class="bg-gray-50 dark:bg-gray-800 rounded-lg p-4 shadow-sm border border-gray-200 dark:border-gray-700">
|
||||
<h2 class="font-bold text-lg mb-4 text-gray-700 dark:text-gray-300 flex items-center">
|
||||
<span class="w-3 h-3 bg-yellow-400 rounded-full mr-2"></span>
|
||||
Ожидает проверки
|
||||
</h2>
|
||||
<div class="flex flex-col gap-3">
|
||||
{% for result in cl.result_list %}
|
||||
{% if result.status == 'PENDING' %}
|
||||
<div class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 p-4 rounded-lg shadow-sm hover:shadow-md transition-shadow relative overflow-hidden group">
|
||||
<div class="absolute top-0 left-0 w-1 h-full bg-yellow-400"></div>
|
||||
<h3 class="font-semibold text-gray-900 dark:text-white text-base pl-2">{{ result.assignment.title }}</h3>
|
||||
<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"><span class="material-symbols-outlined text-[16px]">schedule</span> {{ result.submitted_at|date:"d M Y, H:i" }}</p>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- GRADED COLUMN -->
|
||||
<div class="bg-gray-50 dark:bg-gray-800 rounded-lg p-4 shadow-sm border border-gray-200 dark:border-gray-700">
|
||||
<h2 class="font-bold text-lg mb-4 text-gray-700 dark:text-gray-300 flex items-center">
|
||||
<span class="w-3 h-3 bg-green-500 rounded-full mr-2"></span>
|
||||
Проверено
|
||||
</h2>
|
||||
<div class="flex flex-col gap-3">
|
||||
{% for result in cl.result_list %}
|
||||
{% if result.status == 'GRADED' %}
|
||||
<div class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 p-4 rounded-lg shadow-sm hover:shadow-md transition-shadow relative overflow-hidden group">
|
||||
<div class="absolute top-0 left-0 w-1 h-full bg-green-500"></div>
|
||||
<h3 class="font-semibold text-gray-900 dark:text-white text-base pl-2">{{ result.assignment.title }}</h3>
|
||||
<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 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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block pagination %}
|
||||
{% pagination cl %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user