This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/templates/inventory/binding.html

231 lines
11 KiB
HTML
Raw Normal View History

2022-07-28 15:48:14 +00:00
{% extends "ereuse_devicehub/base_site.html" %}
{% block main %}
<div class="pagetitle">
<h1>{{ title }}</h1>
<nav>
<ol class="breadcrumb">
<!-- TODO@slamora replace with lot list URL when exists -->
</ol>
</nav>
</div><!-- End Page Title -->
<section class="section profile">
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<div class="pt-4 pb-2">
<h5 class="card-title text-center pb-0 fs-4">{{ title }}</h5>
<p class="text-center">Please check that the information is correct.</p>
<p>This is a binding between:&nbsp;
<ul>
{% if new_placeholder.is_abstract %}
<li>1. Device abstract with DHID:<b>{{ new_placeholder.device.devicehub_id }}</b> and PHID: <b>{{ new_placeholder.phid }}</b></li>
<li>2. Device real with DHID: <b>{{ old_placeholder.device.devicehub_id }}</b> and PHID:<b>{{ old_placeholder.phid }}</b></li>
{% else %}
<li>1. Device abstract with DHID:<b>{{ old_placeholder.device.devicehub_id }}</b> and PHID: <b>{{ old_placeholder.phid }}</b></li>
<li>2. Device real with DHID: <b>{{ new_placeholder.device.devicehub_id }}</b> and PHID:<b>{{ new_placeholder.phid }}</b></li>
{% endif %}
</ul>
</p>
2022-08-29 10:50:01 +00:00
<p>The DHID and PHID information of the abstract will be lost.</p>
<p>The information in <span class="text-danger">red colour</span> will be losted and replaced by the information in <span class="text-success">green colour</span>.<br />
The information in <span class="text-warning">orange</span> will be replaced by the information in <span class="text-success">green</span> and you always can recover
it by doing an unbinding action or find this information into device details web.
</p>
2022-07-28 15:48:14 +00:00
</div>
<table class="table table-hover">
<thead>
<tr class="text-center">
<th scope="col">Basic Data</th>
<th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th>
2022-07-28 15:48:14 +00:00
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Manufacturer:</th>
<td class="table-success text-right">{{ new_placeholder.device.manufacturer or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.manufacturer or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Model:</th>
<td class="table-success">{{ new_placeholder.device.model or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.model or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Serial Number:</th>
<td class="table-success">{{ new_placeholder.device.serial_number or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.serial_number or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Brand:</th>
<td class="table-success">{{ new_placeholder.device.brand or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.brand or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Sku:</th>
<td class="table-success">{{ new_placeholder.device.sku or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.sku or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Generation:</th>
<td class="table-success">{{ new_placeholder.device.generation or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.generation or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Version:</th>
<td class="table-success">{{ new_placeholder.device.version or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.version or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Weight:</th>
<td class="table-success">{{ new_placeholder.device.weight or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.weight or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Width:</th>
<td class="table-success">{{ new_placeholder.device.width or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.width or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Height:</th>
<td class="table-success">{{ new_placeholder.device.height or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.height or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Depth:</th>
<td class="table-success">{{ new_placeholder.device.depth or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.depth or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Color:</th>
<td class="table-success">{{ new_placeholder.device.color or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.color or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Production date:</th>
<td class="table-success">{{ new_placeholder.device.production_date or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.production_date or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
<tr>
<th scope="row">Variant:</th>
<td class="table-success">{{ new_placeholder.device.variant or '' }}</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">{{ old_placeholder.device.variant or '' }}</td>
2022-07-28 15:48:14 +00:00
</tr>
</tbody>
</table>
<br />
{% if new_placeholder.device.components or old_placeholder.device.components %}
2022-07-28 15:48:14 +00:00
<h2>Components</h2>
<table class="table table-hover">
<thead>
<tr class="text-center">
<th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th>
2022-07-28 15:48:14 +00:00
</tr>
</thead>
<tbody>
<tr>
<td class="table-success text-right">
{% for c in new_placeholder.device.components %}
2022-07-28 15:48:14 +00:00
* {{ c.verbose_name }}<br />
{% endfor %}
</td>
2022-08-29 10:50:01 +00:00
<td class="table-warning">
{% for c in old_placeholder.device.components %}
2022-07-28 15:48:14 +00:00
* {{ c.verbose_name }}<br />
{% endfor %}
</td>
</tr>
</tbody>
</table>
{% endif %}
<br />
2022-08-08 16:09:25 +00:00
{% if actions %}
2022-07-28 15:48:14 +00:00
<h2>Actions</h2>
2022-08-29 10:50:01 +00:00
<p>
The actions will become real device and will no longer be in the abstract
</p>
2022-07-28 15:48:14 +00:00
<table class="table table-hover">
<thead>
<tr class="text-center">
<th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th>
2022-07-28 15:48:14 +00:00
</tr>
</thead>
<tbody>
<tr>
<td class="table-success text-right">
2022-08-08 16:09:25 +00:00
{% for a in actions %}
2022-07-28 15:48:14 +00:00
* {{ a.t }}<br />
{% endfor %}
</td>
<td class="table-danger">
2022-08-29 10:50:01 +00:00
{% for a in actions %}
* {{ a.t }}<br />
{% endfor %}
2022-08-08 16:09:25 +00:00
</td>
</tr>
</tbody>
</table>
{% endif %}
<br />
{% if tags %}
<h2>Tags</h2>
2022-08-29 10:50:01 +00:00
<p>
The tags will become real device and will no longer be in the abstract
</p>
2022-08-08 16:09:25 +00:00
<table class="table table-hover">
<thead>
<tr class="text-center">
<th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th>
2022-08-08 16:09:25 +00:00
</tr>
</thead>
<tbody>
<tr>
<td class="table-success text-right">
{% for tag in tags %}
* {{ tag.id }}<br />
2022-07-28 15:48:14 +00:00
{% endfor %}
</td>
2022-08-08 16:09:25 +00:00
<td class="table-danger">
2022-08-29 10:50:01 +00:00
{% for tag in tags %}
* {{ tag.id }}<br />
{% endfor %}
2022-08-08 16:09:25 +00:00
</td>
2022-07-28 15:48:14 +00:00
</tr>
</tbody>
</table>
{% endif %}
<div>
<form method="post">
2022-08-11 15:30:00 +00:00
<a href="{{ url_for('inventory.device_details', id=dhid) }}" class="btn btn-danger">Cancel</a>
2022-07-28 15:48:14 +00:00
<button class="btn btn-primary" type="submit">Confirm</button>
</form>
</div>
</div>
</div>
</div>
<div class="col-xl-8">
</div>
</div>
</section>
{% endblock main %}