Add: collecor templatetags and filters

This commit is contained in:
2023-08-05 14:41:29 +09:00
parent 9478843c0f
commit 06648a237a
7 changed files with 62 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
{% load collector_extras %}
{% get_platforms as platforms %}
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
<symbol id="check2" viewBox="0 0 16 16">
<path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/>
@@ -43,11 +45,10 @@
{% for platform in platforms %}
<li>
<a
class="dropdown-item"
class="dropdown-item {% if request.resolver_match.kwargs.platform == platform.name %}active{% endif %}"
href="{{ platform.get_absolute_url }}"
>{{ platform.pretty_name}}
</a
>
</a>
</li>
{% endfor %}
<li><hr class="dropdown-divider" /></li>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -1,9 +1,10 @@
{% load collector_extras %}
<li
id="li-archive-{{ archive.id }}"
class="list-group-item list-group-item-action">
<smal>
<b>File:</b>
<span style="word-wrap: break-word">{{ archive.file }}</span>
<span style="word-wrap: break-word">{{ archive.file.name|clean_filename }}</span>
</small>
<small>
<br>
@@ -13,12 +14,12 @@
<small>
<br>
<b>Uploaded:</b>
<span style="word-wrap: break-word">{{ archive.time_update }}</span>
<span style="word-wrap: break-word">{{ archive.time_update|date:"D d.m.y H:i" }}</span>
</small>
<br>
<small>
<b>Size:</b>
<span style="word-wrap: break-word">{{ archive.size }}</span>
<span style="word-wrap: break-word">{{ archive.file.size|sizify }}</span>
</small>
<div class="row">
<div class="d-flex justify-content-sm-start justify-content-between" >

View File

@@ -1,6 +1,6 @@
<div class="d-sm-flex w-100 justify-content-between mb-2">
<h4 class="card-title mb-1">Ticket: {{ ticket.number }}</h4>
<small><i class="bi bi-clock-history"></i> {{ ticket.time_create }}</small>
<small><i class="bi bi-clock-history"></i> {{ ticket.time_create|date:"D d.m.y H:i" }}</small>
</div>
<div class="form-check form-switch form-check-reverse d-flex w-100 justify-content-left">
<label class="form-check-label" for="ticket-state">Resolved:</label>

View File

@@ -7,7 +7,7 @@
<!-- Ticket -->
{% for ticket in tickets %}
<div class="row">
<div id="div-ticket-{{ ticket.number }}" class="list-group mb-2">
<div id="div-ticket-{{ ticket.number }}" class="list-group mb-2 ms-1">
<div class="list-group-item list-group-item-action disable" aria-current="true">
{% include 'collector/includes/ticket_info.html' %}
<div class="col-xl-6 mt-1 mb-2">