80 lines
3.7 KiB
Twig
80 lines
3.7 KiB
Twig
<div{{ attributes }} class="min-w-48">
|
|
<p class="text-white mb-1">The items you're currently monitoring to automatically download.</p>
|
|
<table id="downloads" class="divide-y divide-gray-200 bg-gray-50 overflow-hidden rounded-lg table-fixed" {{ turbo_stream_listen('App\\Download\\Framework\\Entity\\Download') }}>
|
|
<thead>
|
|
<tr class="bg-orange-500 bg-filter bg-blur-lg bg-opacity-80 text-gray-950">
|
|
<th scope="col"
|
|
class="px-6 py-3 text-start text-xs font-medium uppercase min-w-[45ch] max-w-[45ch] truncate">
|
|
Title
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-start text-xs font-medium uppercase">
|
|
Search Count
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-start text-xs font-medium uppercase">
|
|
Created at
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-start text-xs font-medium uppercase">
|
|
Last Search Date
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-start text-xs font-medium uppercase">
|
|
Status
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-50">
|
|
{% if this.userMonitors.items|length > 0 %}
|
|
{% for monitor in this.userMonitors.items %}
|
|
<tr id="monitor_{{ monitor.id }}">
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-stone-800 min-w-[50ch] max-w-[50ch] truncate">
|
|
{{ monitor.title }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800">
|
|
{{ monitor.searchCount }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800">
|
|
{{ monitor.createdAt|date('m/d/Y h:i a') }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800">
|
|
{{ monitor.lastSearch|date('m/d/Y h:i a') }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800">
|
|
{% if monitor.status == "New" %}
|
|
<twig:StatusBadge color="orange" status="{{ monitor.status }}" />
|
|
{% elseif monitor.status == "In Progress" or monitor.status == "Active" %}
|
|
<twig:StatusBadge color="purple" status="{{ monitor.status }}" />
|
|
{% else %}
|
|
<twig:StatusBadge color="green" status="{{ monitor.status }}" />
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if this.userMonitors.items|length > 5 %}
|
|
<tr id="monitor_view_all">
|
|
<td colspan="5" class="py-2 whitespace-nowrap bg-orange-500 uppercase text-sm font-medium text-center text-white min-w-[50ch] max-w-[50ch] truncate">
|
|
<a href="#">View All Monitors</a>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% else %}
|
|
<tr>
|
|
<td class="px-6 py-4 whitespace-nowrap text-xs uppercase text-center col-span-2 font-medium text-stone-800" colspan="2">
|
|
No monitors
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if this.isWidget == false %}
|
|
{% if this.userMonitors.items|length > 0 %}
|
|
{% set paginator = this.userMonitors %}
|
|
{% include 'partial/paginator.html.twig' %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|