labelbase/templates/labelbase.html

110 lines
3.2 KiB
HTML
Raw Normal View History

2023-02-04 00:04:27 +01:00
{% extends "_base.html" %}
2023-02-02 23:54:55 +01:00
{% load i18n %}
{% block content %}
2023-02-03 00:04:14 +01:00
2023-02-03 00:08:09 +01:00
<div style="padding-top: 1em;">
2023-02-03 13:42:44 +01:00
{% if labelbase %}
2023-02-03 00:08:09 +01:00
<div class="row">
<div class="col float-start">
2023-02-03 13:36:42 +01:00
<h2>{% block title %}{{ labelbase.name }} {% endblock %}</h2>
2023-02-03 13:39:10 +01:00
{% if  labelbase.fingerprint %}<tt>{{ labelbase.fingerprint }} </tt>{% endif %}
2023-02-03 13:36:42 +01:00
{% if about.about %}
<p>{{ about.about}} </p>
{% endif %}
2023-02-03 00:04:14 +01:00
</div>
2023-02-04 09:29:36 +01:00
2023-02-03 00:08:09 +01:00
<div class="col float-end" >
2023-02-03 00:08:57 +01:00
<div class="btn-group float-end" role="group" aria-label="Button group with nested dropdown">
2023-02-03 14:23:27 +01:00
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addLabelModal">Add Label</button>
2023-02-03 00:08:09 +01:00
<div class="btn-group" role="group">
2023-02-03 00:12:42 +01:00
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
2023-02-03 00:13:40 +01:00
Import
2023-02-03 00:08:09 +01:00
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
</ul>
</div>
2023-02-03 00:13:40 +01:00
<div class="btn-group" role="group">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Export
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
</ul>
</div>
2023-02-03 00:04:14 +01:00
</div>
2023-02-03 13:37:56 +01:00
2023-02-03 13:39:10 +01:00
2023-02-03 00:04:14 +01:00
</div>
</div>
2023-02-03 13:42:19 +01:00
{% else %}
<p>There is no such labelbase.</p>
{% endif %}
2023-02-03 13:42:44 +01:00
</div>
2023-02-03 14:23:27 +01:00
2023-02-03 13:43:39 +01:00
{% if labelbase %}
2023-02-03 13:42:44 +01:00
2023-02-02 23:55:38 +01:00
<div class="table-responsive" style="padding-top:1em" >
2023-02-03 13:31:40 +01:00
{% if label_list %}
2023-02-02 23:55:38 +01:00
<table id="bip329labels" class="table table-striped table-sm">
<thead>
<tr>
2023-02-03 23:39:13 +01:00
<th scope="col">#</th>
2023-02-02 23:55:38 +01:00
<th scope="col">type</th>
<th scope="col">ref</th>
<th scope="col">label</th>
</tr>
</thead>
<tbody>
2023-02-03 13:31:40 +01:00
{% for label in label_list %}
2023-02-02 23:55:38 +01:00
<tr>
2023-02-03 23:39:13 +01:00
<td>{{ label.id }}</td>
2023-02-03 14:03:14 +01:00
<td>{{ label.get_type_display }}</td>
<td>{{ label.ref }}</td>
<td>{{ label.label }}</td>
2023-02-02 23:55:38 +01:00
</tr>
2023-02-03 13:31:40 +01:00
{% endfor %}
</tbody>
</table>
{% else %}
<p>There are no labels in this labelbase.</p>
{% endif %}
2023-02-03 13:43:39 +01:00
</div>
{% endif %}
2023-02-02 23:54:55 +01:00
2023-02-04 09:09:40 +01:00
{% if labelbase %}
2023-02-03 14:23:27 +01:00
<!-- modal -->
<div class="modal" tabindex="-1" id="addLabelModal">
2023-02-03 14:24:50 +01:00
<div class="modal-dialog modal-dialog-centered">
2023-02-03 14:23:27 +01:00
<div class="modal-content">
2023-02-03 23:15:21 +01:00
<form action=".{#% url 'addlabeltolabelbase' labelbase.id %#}" method="post">
{% csrf_token %}
2023-02-03 14:23:27 +01:00
<div class="modal-header">
<h5 class="modal-title">Add Label</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
2023-02-03 17:59:50 +01:00
{{ labelform.as_p }}
2023-02-03 14:23:27 +01:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
2023-02-03 23:15:21 +01:00
<button type="submit" class="btn btn-primary">Add Label</button>
2023-02-03 14:23:27 +01:00
</div>
2023-02-03 23:15:21 +01:00
</form>
2023-02-03 14:23:27 +01:00
</div>
</div>
</div>
2023-02-03 23:15:21 +01:00
{% endif %}
2023-02-03 14:23:27 +01:00
<!-- end modal -->
2023-02-02 23:54:55 +01:00
{% endblock %}