mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-13 12:33:23 +02:00
235 lines
8.7 KiB
HTML
235 lines
8.7 KiB
HTML
{% extends "_base.html" %}
|
||
{% load i18n %}
|
||
{% load sekizai_tags %}
|
||
{% load labelbase_tags %}
|
||
{% load backgroundtask_tags %}
|
||
{% load attachments_tags %}
|
||
|
||
{% block title %}{{ object.type }} {{ object.ref }}{% endblock %}
|
||
|
||
|
||
{% block content %}
|
||
|
||
{% get_attachments_for object.get_label_attachment as my_attachments %}
|
||
<ul class="nav nav-tabs" style="padding-top: 2rem; ">
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if action == "update" %}active" aria-current="page" {% else %}"{% endif %} href="{% url 'edit_label' object.id %}">Label Detail</a>
|
||
</li>
|
||
|
||
{% is_self_hosted as my_labelbase_is_self_hosted %}
|
||
{% if object.labelbase.user.profile.use_attachments %}
|
||
<li class="nav-item">
|
||
{% if my_labelbase_is_self_hosted %}
|
||
<a class="nav-link {% if action == "attachments" %}active " aria-current="page" {% else %}"{% endif %}
|
||
href="{% url 'edit_label' object.id %}attachments/">
|
||
Attachments
|
||
{% if my_attachments.count %}
|
||
<span class="badge text-bg-secondary top-0 rounded-pill " >{% attachments_count object.get_label_attachment %}</span>
|
||
{% endif %}
|
||
</a>
|
||
{% else %}
|
||
|
||
<a class="nav-link disabled">Attachments</a>
|
||
|
||
{% endif %}
|
||
</li>
|
||
{% endif %}
|
||
{% comment %}<!--
|
||
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if action == "history" %}active" aria-current="page"{% else %}"{% endif %} href="{#% url 'edit_label' object.id %#}">Label History</a>
|
||
</li>
|
||
-->{% endcomment %}
|
||
|
||
|
||
{% switch object.type %}
|
||
{% case "addr" %}
|
||
|
||
{% comment %}<!--
|
||
<li class="nav-item">
|
||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Transaction Output Labeling</a>
|
||
</li>
|
||
-->{% endcomment %}
|
||
|
||
{% case "tx" %}
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if action == "labeling" %}active" aria-current="page" {% else %}"{% endif %} href="{% url 'edit_label' object.id %}labeling/">Transaction Labeling</a>
|
||
</li>
|
||
|
||
{% comment %}<!--
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if action == "detail" %}active" aria-current="page" {% else %}"{% endif %} href="{% url 'edit_label' object.id %}labeling/">Transaction Detail</a>
|
||
</li>
|
||
-->{% endcomment %}
|
||
{% case "output" %}
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if action == "output-details" %}active" aria-current="page" {% else %}"{% endif %} href="{% url 'edit_label' object.id %}output-details/">Output Details</a>
|
||
</li>
|
||
|
||
{% comment %}<!--
|
||
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if action == "labeling" %}active" aria-current="page" {% else %}"{% endif %} href="{% url 'edit_label' object.id %}labeling/">Derived Addresses Labeling</a>
|
||
</li>
|
||
-->{% endcomment %}
|
||
|
||
{% comment %}<!--
|
||
<li class="nav-item">
|
||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Coin Value</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Coin History</a>
|
||
</li>
|
||
-->{% endcomment %}
|
||
|
||
|
||
{% case "xpub" %}
|
||
{% comment %}<!--
|
||
<li class="nav-item">
|
||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Coin History</a>
|
||
</li>
|
||
-->{% endcomment %}
|
||
|
||
|
||
|
||
|
||
|
||
{% endswitch %}
|
||
|
||
|
||
|
||
{% if object.ref == "54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713" %}
|
||
<li class="nav-item">
|
||
<a class="nav-link" href="/static/bitcoin.pdf">Bitcoin White Paper</a>
|
||
</li>
|
||
{% endif %}
|
||
|
||
</ul>
|
||
|
||
<div style="padding-top: 0rem; padding-bottom: 2.1rem; ">
|
||
|
||
{% if output.last_error %}
|
||
<div class="alert bd-callout bd-callout-danger">
|
||
<div class="btn-group" role="group" style="position: absolute; top: -8px; right: -4px; padding: 1.25rem 1rem;">
|
||
<button type="button" class="btn btn-sm btn-outline-danger dropdown-toggle " data-bs-toggle="dropdown" aria-expanded="false">
|
||
Actions
|
||
</button>
|
||
<ul class="dropdown-menu">
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=none">Verify output status</a></li>
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=true">Mark output as spent</a></li>
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=false">Mark output as unspent</a></li>
|
||
</ul>
|
||
</div>
|
||
<strong>Ouch!</strong> Got "{{ output.last_error.message }}{% if output.last_error.code %} (code {{ output.last_error.code }}){% endif %}" from Electrum.
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% is_label_id_in_queue object.id as is_in_queue %}
|
||
{% if is_in_queue %}
|
||
<div class="alert bd-callout bd-callout-info">
|
||
<!--div class="btn-group" role="group" style="position: absolute; top: -8px; right: -4px; padding: 1.25rem 1rem;">
|
||
<button type="button" class="btn btn-sm btn-outline-danger dropdown-toggle " data-bs-toggle="dropdown" aria-expanded="false">
|
||
Actions
|
||
</button>
|
||
<ul class="dropdown-menu">
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=none">Verify output status</a></li>
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=true">Mark output as spent</a></li>
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=false">Mark output as unspent</a></li>
|
||
</ul>
|
||
</div-->
|
||
<strong>Output in queue!</strong> This output is currently in the processing queue. It will be checked shortly.
|
||
</div>
|
||
{% else %}
|
||
|
||
|
||
{% if object.type == "output" %}
|
||
{% switch output.get_spent_status %}
|
||
{% case "spent" %}
|
||
<div class="bd-callout bd-callout-warning">
|
||
<strong>Output spent!</strong> Blockchain records indicate that this output has been spent in another transaction.
|
||
</div>
|
||
{% case "unspent" %}
|
||
<div class="bd-callout bd-callout-good">
|
||
<strong>Output unspent!</strong> Blockchain records indicate that this output has not been spent yet.
|
||
</div>
|
||
{% case "unconfirmed" %}
|
||
<div class="alert bd-callout bd-callout-info">
|
||
<div class="btn-group" role="group" style="position: absolute; top: -8px; right: -4px; padding: 1.25rem 1rem;">
|
||
<button type="button" class="btn btn-sm btn-outline-info dropdown-toggle " data-bs-toggle="dropdown" aria-expanded="false">
|
||
Actions
|
||
</button>
|
||
<ul class="dropdown-menu">
|
||
<li><a class="dropdown-item" href="{% url 'outputstat_update_redirect' output_stats_id=output.id label_id=object.id %}?force-spent=none">
|
||
Verify output status</a></li>
|
||
</ul>
|
||
</div>
|
||
<strong>Output unconfirmed!</strong> Blockchain records indicate that this output has not been confirmed yet.
|
||
</div>
|
||
{% endswitch %}
|
||
{% endif %}
|
||
|
||
|
||
|
||
{% endif %}
|
||
|
||
|
||
|
||
|
||
<!--div class="bd-callout bd-callout-warning">
|
||
<strong>Heads up!</strong> There are multiple records for this transaction output. <a href="">Review & merge</a>
|
||
</div-->
|
||
|
||
{% comment %}
|
||
{% if object.type == "addr" %}
|
||
<div class="bd-callout bd-callout-warning">
|
||
<strong>Heads up!</strong> There are multiple transaction outputs sent to this address. For privacy reasons, do not reuse addresses.
|
||
</div>
|
||
{% endif %}
|
||
{% endcomment %}
|
||
|
||
{% block label_edit_content %}
|
||
{% endblock %}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<div class="modal" tabindex="-1" id="deleteLabelModal">
|
||
<div class="modal-dialog modal-dialog-centered">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">Delete label?</h5>
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="alert alert-warning" role="alert">
|
||
<strong>Warning:</strong>
|
||
<br>
|
||
<br>
|
||
This action will permanently delete the label and cannot be undone. Are you sure you want to proceed?
|
||
</div>
|
||
</div>
|
||
<form method="post" action="{% url 'del_label' object.pk %}">{% csrf_token %}
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">CANCEL</button>
|
||
<button type="submit" class="btn btn-danger" data-bs-dismiss="modal">DELETE</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div
|
||
|
||
|
||
<script>
|
||
{% addtoblock "js" %}
|
||
{% endaddtoblock %}
|
||
</script>
|
||
|
||
|
||
{% endblock %}
|