mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix buttons in attachment table
This commit is contained in:
parent
d837a1f9a2
commit
6e1b7bf3f0
@ -31,8 +31,12 @@
|
||||
<td>{{ attachment.comment }}</td>
|
||||
<td>
|
||||
<div class='btn-group' style='float: right;'>
|
||||
<button type='button' class='btn btn-primary attachment-edit-button' url="{% url 'part-attachment-edit' attachment.id %}" data-toggle='tooltip' title='Edit attachment ({{ attachment.basename }})'><span class='glyphicon glyphicon-small glyphicon-edit'></span></button>
|
||||
<button type='button' class='btn btn-danger attachment-delete-button' url="{% url 'part-attachment-delete' attachment.id %}" data-toggle='tooltip' title='Delete attachment ({{ attachment.basename }})'><span class='glyphicon glyphicon-small glyphicon-trash'></span></button>
|
||||
<button type='button' class='btn btn-default btn-glyph' url="{% url 'part-attachment-edit' attachment.id %}" data-toggle='tooltip' title='Edit attachment ({{ attachment.basename }})'>
|
||||
<span class='glyphicon glyphicon-edit'/>
|
||||
</button>
|
||||
<button type='button' class='btn btn-default btn-glyph' url="{% url 'part-attachment-delete' attachment.id %}" data-toggle='tooltip' title='Delete attachment ({{ attachment.basename }})'>
|
||||
<span class='glyphicon glyphicon-trash'/>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -40,34 +40,41 @@
|
||||
</h4>
|
||||
<p><i>{{ part.description }}</i></p>
|
||||
<p>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-default btn-glyph' id='toggle-starred' title='Star this part'>
|
||||
<span id='part-star-icon' class='starred-part glyphicon {% if starred %}glyphicon-star{% else %}glyphicon-star-empty{% endif %}'/>
|
||||
</button>
|
||||
{% if part.is_template == False %}
|
||||
{% include "qr_button.html" %}
|
||||
{% if part.active %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='price-button' title='Show pricing information'>
|
||||
<span id='part-price-icon' class='part-price glyphicon glyphicon-usd'/>
|
||||
</button>
|
||||
{% if part.purchaseable %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-order' title='Order part'>
|
||||
<span id='part-order-icon' class='part-order glyphicon glyphicon-shopping-cart'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-duplicate' title='Duplicate part'>
|
||||
<span id='part-duplicate-icon' class='part-duplicate glyphicon glyphicon-duplicate'/>
|
||||
</button>
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-edit' title='Edit part'>
|
||||
<span id='part-edit-icon' class='glyphicon glyphicon-cog part-cog'/>
|
||||
</button>
|
||||
{% if not part.active %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-delete' title='Delete part'>
|
||||
<span id='part-delete-icon' class='glyphicon glyphicon-trash'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
<div class='btn-row'>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-default btn-glyph' id='toggle-starred' title='Star this part'>
|
||||
<span id='part-star-icon' class='starred-part glyphicon {% if starred %}glyphicon-star{% else %}glyphicon-star-empty{% endif %}'/>
|
||||
</button>
|
||||
{% if part.is_template == False %}
|
||||
{% include "qr_button.html" %}
|
||||
{% if part.active %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='price-button' title='Show pricing information'>
|
||||
<span id='part-price-icon' class='part-price glyphicon glyphicon-usd'/>
|
||||
</button>
|
||||
{% if not part.virtual %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-count' title='Count part stock'>
|
||||
<span class='glyphicon glyphicon-ok-circle'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if part.purchaseable %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-order' title='Order part'>
|
||||
<span id='part-order-icon' class='part-order glyphicon glyphicon-shopping-cart'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-duplicate' title='Duplicate part'>
|
||||
<span id='part-duplicate-icon' class='part-duplicate glyphicon glyphicon-duplicate'/>
|
||||
</button>
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-edit' title='Edit part'>
|
||||
<span id='part-edit-icon' class='glyphicon glyphicon-edit'/>
|
||||
</button>
|
||||
{% if not part.active %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='part-delete' title='Delete part'>
|
||||
<span id='part-delete-icon' class='glyphicon glyphicon-trash'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
<table class='table table-condensed'>
|
||||
@ -171,6 +178,16 @@
|
||||
);
|
||||
});
|
||||
|
||||
$("#part-count").click(function() {
|
||||
launchModalForm("/stock/adjust/", {
|
||||
data: {
|
||||
action: "count",
|
||||
part: {{ part.id }},
|
||||
reload: true,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#price-button").click(function() {
|
||||
launchModalForm(
|
||||
"{% url 'part-pricing' part.id %}",
|
||||
|
@ -26,6 +26,10 @@
|
||||
color: #5C5;
|
||||
}
|
||||
|
||||
.glyphicon-ok-circle {
|
||||
color: #55c;
|
||||
}
|
||||
|
||||
.glyphicon-remove {
|
||||
color: #C55;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user