Fix buttons and rendering for supplierpart page

This commit is contained in:
Oliver Walters 2019-07-08 19:15:20 +10:00
parent 328f7887e8
commit 16e1be61f5

View File

@ -10,19 +10,26 @@ InvenTree | {{ company.name }} - Parts
<div class='row'> <div class='row'>
<div class='col-sm-6'> <div class='col-sm-6'>
<h3>Supplier Part</h3> <h3>Supplier Part</h3>
<p><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a> - {{ part.SKU }}</p> <div class='btn-row'>
<div class='btn-group'>
<button type='button' class='btn btn-default btn-glyph' id='edit-part' title='Edit supplier part'>
<span class='glyphicon glyphicon-edit'/>
</button>
<button type='button' class='btn btn-default btn-glyph' id='delete-part' title='Delete supplier part'>
<span class='glyphicon glyphicon-trash'/>
</button>
</div>
</div>
</div> </div>
<div class='col-sm-6'> <div class='col-sm-6'>
<h3> <div class='media-left'>
<div class="dropdown" style="float: right;"> <img class='part-thumb'
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options {% if part.part.image %}
<span class="caret"></span></button> src='{{ part.part.image.url }}'
<ul class="dropdown-menu"> {% else %}
<li><a href="#" id='edit-part' title='Edit supplier part'>Edit</a></li> src="{% static 'img/blank_image.png' %}"
<li><a href="#" id='delete-part' title='Delete supplier part'>Delete</a></li> {% endif %}/>
</ul> </div>
</div>
</h3>
</div> </div>
</div> </div>
@ -30,17 +37,18 @@ InvenTree | {{ company.name }} - Parts
<div class='row'> <div class='row'>
<div class='col-sm-6'> <div class='col-sm-6'>
<h4>Supplier Part Details</h4>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed">
<tr><td>Supplier</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
<tr><td>SKU</td><td>{{ part.SKU }}</tr></tr>
<tr> <tr>
<td>Internal Part</td> <td>Internal Part</td>
<td> <td>
{% if part.part %} {% if part.part %}
<a href="{% url 'part-suppliers' part.part.id %}">{{ part.part.full_name }}</a> <a href="{% url 'part-suppliers' part.part.id %}">{{ part.part.full_name }}</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr><td>Supplier</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
<tr><td>SKU</td><td>{{ part.SKU }}</tr></tr>
{% if part.URL %} {% if part.URL %}
<tr><td>URL</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr> <tr><td>URL</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr>
{% endif %} {% endif %}
@ -58,10 +66,8 @@ InvenTree | {{ company.name }} - Parts
</div> </div>
<div class='col-sm-6'> <div class='col-sm-6'>
<h4>Pricing Information</h4>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed">
<tr>
<th colspan='2'>Pricing</th>
</tr>
<tr><td>Order Multiple</td><td>{{ part.multiple }}</td></tr> <tr><td>Order Multiple</td><td>{{ part.multiple }}</td></tr>
{% if part.base_cost > 0 %} {% if part.base_cost > 0 %}
<tr><td>Base Price (Flat Fee)</td><td>{{ part.base_cost }}</td></tr> <tr><td>Base Price (Flat Fee)</td><td>{{ part.base_cost }}</td></tr>