Work on fixing bugs and reformat
This commit is contained in:
@@ -161,88 +161,88 @@
|
||||
|
||||
<div class="table-container">
|
||||
<table id="discovered-contacts-table" class="table is-fullwidth is-hoverable is-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-discovered-col="0" class="discovered-col-0">Person</th>
|
||||
<th data-discovered-col="1" class="discovered-col-1">Name</th>
|
||||
<th data-discovered-col="2" class="discovered-col-2">Service</th>
|
||||
<th data-discovered-col="3" class="discovered-col-3">Identifier</th>
|
||||
<th data-discovered-col="4" class="discovered-col-4">Suggest</th>
|
||||
<th data-discovered-col="5" class="discovered-col-5">Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in candidates %}
|
||||
<tr
|
||||
data-service="{{ row.service }}"
|
||||
data-person="{{ row.linked_person_name|default:'-'|lower }}"
|
||||
data-detected="{{ row.detected_name|default:'-'|lower }}"
|
||||
data-identifier="{{ row.identifier|lower }}"
|
||||
data-search="{{ row.linked_person_name|default:'-'|lower }} {{ row.detected_name|default:'-'|lower }} {{ row.service|lower }} {{ row.identifier|lower }}">
|
||||
<td data-discovered-col="0" class="discovered-col-0">{{ row.linked_person_name|default:"-" }}</td>
|
||||
<td data-discovered-col="1" class="discovered-col-1">{{ row.detected_name|default:"-" }}</td>
|
||||
<td data-discovered-col="2" class="discovered-col-2">
|
||||
{{ row.service|title }}
|
||||
</td>
|
||||
<td data-discovered-col="3" class="discovered-col-3"><code>{{ row.identifier }}</code></td>
|
||||
<td data-discovered-col="4" class="discovered-col-4">
|
||||
{% if not row.linked_person and row.suggestions %}
|
||||
<div class="buttons are-small">
|
||||
{% for suggestion in row.suggestions %}
|
||||
<form method="post" style="display: inline-flex;">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="service" value="{{ row.service }}">
|
||||
<input type="hidden" name="identifier" value="{{ row.identifier }}">
|
||||
<input type="hidden" name="person_id" value="{{ suggestion.person.id }}">
|
||||
<button
|
||||
type="submit"
|
||||
class="button is-small is-success is-light is-rounded"
|
||||
title="Accept suggested match">
|
||||
<span class="icon is-small"><i class="fa-solid fa-check"></i></span>
|
||||
<span>{{ suggestion.person.name }}</span>
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="has-text-grey">-</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-discovered-col="5" class="discovered-col-5">
|
||||
{% if row.linked_person %}
|
||||
<span class="tag is-success is-light">linked</span>
|
||||
{% else %}
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-discovered-col="0" class="discovered-col-0">Person</th>
|
||||
<th data-discovered-col="1" class="discovered-col-1">Name</th>
|
||||
<th data-discovered-col="2" class="discovered-col-2">Service</th>
|
||||
<th data-discovered-col="3" class="discovered-col-3">Identifier</th>
|
||||
<th data-discovered-col="4" class="discovered-col-4">Suggest</th>
|
||||
<th data-discovered-col="5" class="discovered-col-5">Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in candidates %}
|
||||
<tr
|
||||
data-service="{{ row.service }}"
|
||||
data-person="{{ row.linked_person_name|default:'-'|lower }}"
|
||||
data-detected="{{ row.detected_name|default:'-'|lower }}"
|
||||
data-identifier="{{ row.identifier|lower }}"
|
||||
data-search="{{ row.linked_person_name|default:'-'|lower }} {{ row.detected_name|default:'-'|lower }} {{ row.service|lower }} {{ row.identifier|lower }}">
|
||||
<td data-discovered-col="0" class="discovered-col-0">{{ row.linked_person_name|default:"-" }}</td>
|
||||
<td data-discovered-col="1" class="discovered-col-1">{{ row.detected_name|default:"-" }}</td>
|
||||
<td data-discovered-col="2" class="discovered-col-2">
|
||||
{{ row.service|title }}
|
||||
</td>
|
||||
<td data-discovered-col="3" class="discovered-col-3"><code>{{ row.identifier }}</code></td>
|
||||
<td data-discovered-col="4" class="discovered-col-4">
|
||||
{% if not row.linked_person and row.suggestions %}
|
||||
<div class="buttons are-small">
|
||||
{% for suggestion in row.suggestions %}
|
||||
<form method="post" style="display: inline-flex;">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="service" value="{{ row.service }}">
|
||||
<input type="hidden" name="identifier" value="{{ row.identifier }}">
|
||||
<input type="hidden" name="person_id" value="{{ suggestion.person.id }}">
|
||||
<button
|
||||
type="submit"
|
||||
class="button is-small is-success is-light is-rounded"
|
||||
title="Accept suggested match">
|
||||
<span class="icon is-small"><i class="fa-solid fa-check"></i></span>
|
||||
<span>{{ suggestion.person.name }}</span>
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="has-text-grey">-</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-discovered-col="5" class="discovered-col-5">
|
||||
{% if row.linked_person %}
|
||||
<span class="tag is-success is-light">linked</span>
|
||||
{% else %}
|
||||
<button
|
||||
type="button"
|
||||
class="tag is-warning is-light js-unlinked-link"
|
||||
data-service="{{ row.service }}"
|
||||
data-identifier="{{ row.identifier }}"
|
||||
title="Click to prefill link form">
|
||||
unlinked
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
type="button"
|
||||
class="tag is-warning is-light js-unlinked-link"
|
||||
data-service="{{ row.service }}"
|
||||
class="button is-small is-light js-contact-info"
|
||||
data-service="{{ row.service|title }}"
|
||||
data-identifier="{{ row.identifier }}"
|
||||
title="Click to prefill link form">
|
||||
unlinked
|
||||
data-person="{{ row.linked_person_name|default:'-' }}"
|
||||
data-detected="{{ row.detected_name|default:'-' }}"
|
||||
data-status="{% if row.linked_person %}linked{% else %}unlinked{% endif %}"
|
||||
data-suggested="{% if row.suggestions %}{% for suggestion in row.suggestions %}{{ suggestion.person.name }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}-{% endif %}">
|
||||
<span class="icon is-small"><i class="fa-solid fa-circle-info"></i></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
type="button"
|
||||
class="button is-small is-light js-contact-info"
|
||||
data-service="{{ row.service|title }}"
|
||||
data-identifier="{{ row.identifier }}"
|
||||
data-person="{{ row.linked_person_name|default:'-' }}"
|
||||
data-detected="{{ row.detected_name|default:'-' }}"
|
||||
data-status="{% if row.linked_person %}linked{% else %}unlinked{% endif %}"
|
||||
data-suggested="{% if row.suggestions %}{% for suggestion in row.suggestions %}{{ suggestion.person.name }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}-{% endif %}">
|
||||
<span class="icon is-small"><i class="fa-solid fa-circle-info"></i></span>
|
||||
</button>
|
||||
<a class="button is-small is-light" href="{{ row.compose_url }}">
|
||||
<span class="icon is-small"><i class="fa-solid fa-paper-plane"></i></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="button is-small is-light" href="{{ row.compose_url }}">
|
||||
<span class="icon is-small"><i class="fa-solid fa-paper-plane"></i></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user