mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
More templates updates
This commit is contained in:
parent
4abd8587ab
commit
fd4f33d45b
@ -31,11 +31,13 @@ src="{% static 'img/blank_image.png' %}"
|
||||
{% if roles.purchase_order.change %}
|
||||
<div class='btn-row'>
|
||||
<div class='btn-group action-buttons' role='group'>
|
||||
{% comment "for later" %}
|
||||
{% if roles.purchase_order.add %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='order-part' title='{% trans "Order part" %}'>
|
||||
<span class='fas fa-shopping-cart'></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='edit-part' title='{% trans "Edit manufacturer part" %}'>
|
||||
<span class='fas fa-edit icon-green'/>
|
||||
</button>
|
||||
|
@ -0,0 +1,31 @@
|
||||
{% extends "modal_delete_form.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block pre_form_content %}
|
||||
{% trans "Are you sure you want to delete the following Manufacturer Parts?" %}
|
||||
|
||||
<hr>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_data %}
|
||||
<table class='table table-striped table-condensed'>
|
||||
{% for part in parts %}
|
||||
<tr>
|
||||
<input type='hidden' name='manufacturer-part-{{ part.id}}' value='manufacturer-part-{{ part.id }}'/>
|
||||
|
||||
<td>
|
||||
{% include "hover_image.html" with image=part.part.image %}
|
||||
{{ part.part.full_name }}
|
||||
</td>
|
||||
<td>
|
||||
{% include "hover_image.html" with image=part.manufacturer.image %}
|
||||
{{ part.manufacturer.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ part.MPN }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
@ -3,7 +3,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/part_navbar.html" with tab='details' %}
|
||||
{% include "company/manufacturer_part_navbar.html" with tab='details' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
|
@ -0,0 +1,27 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul class='list-group'>
|
||||
|
||||
<li class='list-group-item'>
|
||||
<a href='#' id='manufacturer-part-menu-toggle'>
|
||||
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% comment "for later" %}
|
||||
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Manufacturer Part Stock" %}'>
|
||||
<a href='{% url "manufacturer-part-stock" part.id %}'>
|
||||
<span class='fas fa-boxes'></span>
|
||||
{% trans "Stock" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item {% if tab == "orders" %}active{% endif %}' title='{% trans "Manufacturer Part Orders" %}'>
|
||||
<a href='{% url "manufacturer-part-orders" part.id %}'>
|
||||
<span class='fas fa-shopping-cart'></span>
|
||||
{% trans "Orders" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endcomment %}
|
||||
|
||||
</ul>
|
@ -13,13 +13,16 @@
|
||||
<tr>
|
||||
<input type='hidden' name='supplier-part-{{ part.id}}' value='supplier-part-{{ part.id }}'/>
|
||||
|
||||
<td>
|
||||
{% include "hover_image.html" with image=part.part.image %}
|
||||
{{ part.part.full_name }}
|
||||
</td>
|
||||
<td>
|
||||
{% include "hover_image.html" with image=part.supplier.image %}
|
||||
{{ part.supplier.name }}
|
||||
</td>
|
||||
<td>
|
||||
{% include "hover_image.html" with image=part.part.image %}
|
||||
{{ part.part.full_name }}
|
||||
{{ part.SKU }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
@ -3,7 +3,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/part_navbar.html" with tab='details' %}
|
||||
{% include "company/supplier_part_navbar.html" with tab='details' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/part_navbar.html" with tab='orders' %}
|
||||
{% include "company/supplier_part_navbar.html" with tab='orders' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/part_navbar.html" with tab='pricing' %}
|
||||
{% include "company/supplier_part_navbar.html" with tab='pricing' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/part_navbar.html" with tab='stock' %}
|
||||
{% include "company/supplier_part_navbar.html" with tab='stock' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
|
@ -436,7 +436,7 @@ class ManufacturerPartDelete(AjaxDeleteView):
|
||||
"""
|
||||
|
||||
success_url = '/manufacturer/'
|
||||
ajax_template_name = 'company/partdelete.html'
|
||||
ajax_template_name = 'company/manufacturer_part_delete.html'
|
||||
ajax_form_title = _('Delete Manufacturer Part')
|
||||
|
||||
role_required = 'purchase_order.delete'
|
||||
@ -460,7 +460,7 @@ class ManufacturerPartDelete(AjaxDeleteView):
|
||||
if 'part' in self.request.GET:
|
||||
try:
|
||||
self.parts.append(ManufacturerPart.objects.get(pk=self.request.GET.get('part')))
|
||||
except (ValueError, SupplierPart.DoesNotExist):
|
||||
except (ValueError, ManufacturerPart.DoesNotExist):
|
||||
pass
|
||||
|
||||
elif 'parts[]' in self.request.GET:
|
||||
@ -666,7 +666,7 @@ class SupplierPartDelete(AjaxDeleteView):
|
||||
"""
|
||||
|
||||
success_url = '/supplier/'
|
||||
ajax_template_name = 'company/partdelete.html'
|
||||
ajax_template_name = 'company/supplier_part_delete.html'
|
||||
ajax_form_title = _('Delete Supplier Part')
|
||||
|
||||
role_required = 'purchase_order.delete'
|
||||
|
Loading…
Reference in New Issue
Block a user