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/resources/device/templates/devices/layout.html

199 lines
8.1 KiB
HTML
Raw Normal View History

2018-10-03 12:51:22 +00:00
{% import 'devices/macros.html' as macros %}
<!DOCTYPE html>
<html lang="en">
<head>
2020-08-17 14:45:18 +00:00
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.3.7/flatly/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-+ENW/yibaokMnme+vBLnHMphUYxHs34h9lpdbSLuAwGkOKFRl4C34WkjazBtb7eT"
crossorigin="anonymous">
<script src="https://use.fontawesome.com/7553aecc27.js"></script>
<title>Devicehub | {{ device.__format__('t') }}</title>
2019-10-22 15:53:26 +00:00
<style>
/*Sticky footer*/
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px; /* Margin bottom by footer height */
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 6em;
}
</style>
2018-10-03 12:51:22 +00:00
</head>
2018-10-16 14:30:10 +00:00
<body>
2018-10-03 12:51:22 +00:00
2018-10-16 14:30:10 +00:00
<nav class="navbar navbar-default" style="background-color: gainsboro; margin: 0 !important">
<div class="container-fluid">
<a href="https://www.usody.com/" target="_blank">
2019-10-22 15:53:26 +00:00
<h1 align="center">Usody Public Link</h1>
</a>
2020-08-17 14:45:18 +00:00
</div>
2018-10-16 14:30:10 +00:00
</nav>
<div class="container-fluid">
2020-08-17 14:45:18 +00:00
<div class="row">
<div class="page-header col-md-6 col-md-offset-3">
<h1>{{ device.__format__('t') }}<br>
<small>{{ device.__format__('s') }}</small>
</h1>
</div>
2020-08-17 14:45:18 +00:00
</div>
<div class="row">
<div class="col-md-3">
</div>
2020-08-17 14:45:18 +00:00
<div class="col-md-6">
<ul>
{% for key, value in device.public_properties.items() %}
<li>{{ key }}: {{ value }}</li>
2020-08-17 14:45:18 +00:00
{% endfor %}
</ul>
{% if isinstance(device, d.Computer) %}
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>Range</th>
</tr>
</thead>
<tbody>
{% if device.processor_model %}
<tr>
<td>
CPU {{ device.processor_model }}
</td>
<td>
Processor Rate = {% if device.rate %}
{{ device.rate.processor_range }}
({{ device.rate.processor }})
{% endif %}
</td>
</tr>
{% endif %}
{% if device.ram_size %}
<tr>
<td>
RAM {{ device.ram_size // 1000 }} GB
{{ macros.component_type(device.components, 'RamModule') }}
</td>
<td>
RAM Rate = {% if device.rate %}
{{ device.rate.ram_range }}
({{ device.rate.ram }})
{% endif %}
</td>
</tr>
{% endif %}
{% if device.data_storage_size %}
<tr>
<td>
Data Storage {{ device.data_storage_size // 1000 }} GB
{{ macros.component_type(device.components, 'SolidStateDrive') }}
{{ macros.component_type(device.components, 'HardDrive') }}
</td>
<td>
Data Storage Rate = {% if device.rate %}
{{ device.rate.data_storage_range }}
({{ device.rate.data_storage }})
{% endif %}
</td>
</tr>
{% endif %}
{% if device.graphic_card_model %}
<tr>
<td>
Graphics {{ device.graphic_card_model }}
{{ macros.component_type(device.components, 'GraphicCard') }}
</td>
<td></td>
</tr>
{% endif %}
{% if device.network_speeds %}
<tr>
<td>
Network
{% if device.network_speeds[0] %}
Ethernet
{% if device.network_speeds[0] != None %}
max. {{ device.network_speeds[0] }} Mbps
{% endif %}
{% endif %}
{% if device.network_speeds[0] and device.network_speeds[1] %}
+
{% endif %}
{% if device.network_speeds[1] %}
WiFi
{% if device.network_speeds[1] != None %}
max. {{ device.network_speeds[1] }} Mbps
{% endif %}
{% endif %}
{{ macros.component_type(device.components, 'NetworkAdapter') }}
</td>
<td></td>
</tr>
{% endif %}
{% if device.rate %}
<tr class="active">
<td class="text-right">
Total rate
</td>
<td>
{{ device.rate.rating_range }}
({{ device.rate.rating }})
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<h4>Public traceability log of the device</h4>
<div class="text-right">
<small>Latest one.</small>
</div>
<ol>
{% for action in device.public_actions %}
2020-08-17 14:45:18 +00:00
<li>
<strong>
{{ action.type }}
</strong>
{{ action }}
<br>
<div class="text-muted">
<small>
{{ action._date_str }}
</small>
</div>
{% if action.certificate %}
<a href="{{ action.certificate.to_text() }}">See the certificate</a>
{% endif %}
</li>
{% endfor %}
</ol>
<div class="text-right">
<small>Oldest one.</small>
</div>
{% endif %}
</div>
</div>
</div>
2019-10-22 15:53:26 +00:00
<footer class="container-fluid footer">
<div class="row">
<div class="col-md-4">
Page generated by:<br>
<img style="height: 9em"
2019-11-05 14:43:09 +00:00
src="{{ url_for('Device.static', filename='usody-logo-v4.png') }}">
2019-10-22 15:53:26 +00:00
</div>
</div>
</footer>
2018-10-03 12:51:22 +00:00
</body>
</html>