2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Improve QR code display

- Pretty little glyphicon button!
This commit is contained in:
Oliver Walters
2019-05-05 08:39:16 +10:00
parent e63ae5e92f
commit 8a6932e993
5 changed files with 56 additions and 30 deletions

View File

@ -23,7 +23,6 @@
{% else %}
<li><a href="#" id='activate-part' title='Activate part'>Activate</a></li>
{% endif %}
<li><a href='#' id='show-qr-code' title='Generate QR Code'>Show QR Code</a></li>
</ul>
</div>
</h3>
@ -126,15 +125,6 @@
{% block js_ready %}
{{ block.super }}
$("#show-qr-code").click(function() {
launchModalForm(
"{% url 'part-qr' part.id %}",
{
no_post: true,
}
);
});
$("#duplicate-part").click(function() {
launchModalForm(

View File

@ -21,20 +21,31 @@
{% endif %}/>
</div>
<div class="media-body">
<h4>{{ part.name }}{% if part.active == False %} <i>- INACTIVE</i>{% endif %}</h4>
<h4>
{{ part.name }}
</h4>
<p><i>{{ part.description }}</i></p>
{% if part.IPN %}
<tr>
<td>IPN</td>
<td>{{ part.IPN }}</td>
</tr>
{% endif %}
{% if part.URL %}
<tr>
<td>URL</td>
<td><a href="{{ part.URL }}">{{ part.URL }}</a></td>
</tr>
{% endif %}
<p>
<div class='btn-group'>
<button type='button' class='btn btn-default btn-glyph' id='show-qr-code' title='Show QR code'><span class='glyphicon glyphicon-qrcode'></span></button>
</div>
</p>
<table class='table table-condensed'>
{% if part.IPN %}
<tr>
<td>IPN</td>
<td>{{ part.IPN }}</td>
</tr>
{% endif %}
{% if part.URL %}
<tr>
<td>URL</td>
<td><a href="{{ part.URL }}">{{ part.URL }}</a></td>
</tr>
{% endif %}
<tr>
</tr>
</table>
</div>
</div>
</div>
@ -82,6 +93,15 @@
{% block js_ready %}
{{ block.super }}
$("#show-qr-code").click(function() {
launchModalForm(
"{% url 'part-qr' part.id %}",
{
no_post: true,
}
);
});
$("#part-thumb").click(function() {
launchModalForm(
"{% url 'part-image' part.id %}",