Create: switch ticket status ajax handler

This commit is contained in:
2023-08-01 20:13:04 +09:00
parent d2bc9aba7f
commit ce56c3a774
6 changed files with 106 additions and 43 deletions

View File

@@ -8,26 +8,32 @@
rel="stylesheet"
href="{% static 'collector/css/bootstrap.min.css' %}"
rel="stylesheet"
/>
>
<link
rel="apple-touch-icon"
sizes="180x180"
href="{% static 'collector/img/apple-touch-icon.png' %}"
/>
>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="{% static 'collector/img/favicon-32x32.png' %}"
/>
>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="{% static 'collector/img/favicon-16x16.png' %}"
/>
<link rel="manifest" href="{% static 'collector/img/site.webmanifest' %}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
>
<link
rel="manifest"
href="{% static 'collector/img/site.webmanifest' %}"
>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css"
>
<title>Document</title>
</head>
<body>

View File

@@ -14,12 +14,13 @@
<small><i class="bi bi-clock-history"></i> {{ ticket.time_create }}</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-{{ ticket.number }}">Resolved:</label>
<label class="form-check-label" for="ticket-state">Resolved:</label>
<input
class="form-check-input ms-2 mb-2"
type="checkbox"
role="switch"
id="ticket-state-{{ ticket.number }}"
id="ticket-state"
ticket-state-url="{% url 'ticket' ticket.platform ticket.number %}"
{% if ticket.resolved %} checked {% endif %}>
</div>
<div class="col-xl-6 mb-2">
@@ -54,7 +55,12 @@
<b>SHA1:</b>
<span style="word-wrap: break-word">{{ archive.sha1 }}</span>
</small>
<br>
<small>
<br>
<b>Uploaded:</b>
<span style="word-wrap: break-word">{{ archive.time_update }}</span>
</small>
<br>
<small>
<b>Size:</b>
<span style="word-wrap: break-word">{{ archive.size }}</span>
@@ -128,5 +134,5 @@
</main>
{% endblock content %}
{% block jquery %}
<script src="{% static 'collector/js/jq.delete.archive.js' %}"></script>
<script src="{% static 'collector/js/jq.ticket.detail.js' %}"></script>
{% endblock jquery %}