mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Merge pull request #404 from SchrodingersGat/stock-item-buttons
Added pretty buttons to stock item page
This commit is contained in:
		| @@ -1,6 +1,7 @@ | ||||
| <h4>Required Parts</h4> | ||||
| <hr> | ||||
|  | ||||
| <div id='#build-item-toolbar'> | ||||
| <div id='build-item-toolbar'> | ||||
|     <div class='btn-group'> | ||||
|         <button class='btn btn-primary' type='button' id='btn-allocate' title='Allocate Stock'>Allocate</button> | ||||
|         <button class='btn btn-primary' type='button' id='btn-order-parts' title='Order Parts'>Order Parts</button> | ||||
|   | ||||
| @@ -7,6 +7,8 @@ | ||||
|  | ||||
| <h4>Build Details</h4> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| <table class='table table-striped'> | ||||
| <tr> | ||||
|     <td>Title</td><td>{{ build.title }}</td> | ||||
|   | ||||
| @@ -5,6 +5,4 @@ | ||||
|     <li{% if tab == 'allocate' %} class='active'{% endif %}> | ||||
|         <a href="{% url 'build-allocate' build.id %}">Parts</a> | ||||
|     </li> | ||||
| </ul> | ||||
|  | ||||
| <br> | ||||
| </ul> | ||||
| @@ -24,6 +24,19 @@ InvenTree | Company - {{ company.name }} | ||||
|             <div class='media-body'> | ||||
|               <h4>{{ company.name }}</h4> | ||||
|               <p>{{ company.description }}</p> | ||||
|               <div class='btn-group'> | ||||
|                   {% if company.is_supplier %} | ||||
|                   <button type='button' class='btn btn-default btn-glyph' id='company-order' title='Create purchase order'> | ||||
|                       <span class='glyphicon glyphicon-shopping-cart'/> | ||||
|                   </button> | ||||
|                   {% endif %} | ||||
|                   <button type='button' class='btn btn-default btn-glyph' id='company-edit' title='Edit company information'> | ||||
|                       <span class='glyphicon glyphicon-cog'/> | ||||
|                   </button> | ||||
|                   <button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Delete company'> | ||||
|                       <span class='glyphicon glyphicon-trash' style='color: #a11;'/> | ||||
|                   </button> | ||||
|               </div> | ||||
|           </div> | ||||
|       </div> | ||||
|     </div> | ||||
| @@ -77,6 +90,22 @@ InvenTree | Company - {{ company.name }} | ||||
|  | ||||
| {% block js_ready %} | ||||
|  | ||||
|     $('#company-edit').click(function() { | ||||
|         launchModalForm( | ||||
|                         "{% url 'company-edit' company.id %}", | ||||
|                         { | ||||
|                             reload: true | ||||
|                         }); | ||||
|     }); | ||||
|  | ||||
|     $('#company-delete').click(function() { | ||||
|         launchModalForm( | ||||
|                         "{% url 'company-delete' company.id %}", | ||||
|                         { | ||||
|                             redirect: "{% url 'company-index' %}" | ||||
|                         }); | ||||
|     }); | ||||
|  | ||||
|     enableDragAndDrop( | ||||
|         "#company-thumb", | ||||
|         "{% url 'company-image' company.id %}", | ||||
|   | ||||
| @@ -4,24 +4,7 @@ | ||||
|  | ||||
| {% include 'company/tabs.html' with tab='details' %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Company Details</h4> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|         <h3> | ||||
|             <div class="dropdown" style="float: right;"> | ||||
|                 <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options | ||||
|                 <span class="caret"></span></button> | ||||
|                 <ul class="dropdown-menu"> | ||||
|                   <li><a href="#" id='edit-company' title='Edit company'>Edit</a></li> | ||||
|                   <li><a href="#" id='delete-company' title='Delete company'>Delete</a></li> | ||||
|                 </ul> | ||||
|             </div> | ||||
|         </h3> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <h4>Company Details</h4> | ||||
| <hr> | ||||
|  | ||||
| <table class='table table-striped'> | ||||
| @@ -45,19 +28,5 @@ | ||||
| {% endblock %} | ||||
| {% block js_ready %} | ||||
| {{ block.super }} | ||||
|     $('#edit-company').click(function() { | ||||
|         launchModalForm( | ||||
|                         "{% url 'company-edit' company.id %}", | ||||
|                         { | ||||
|                             reload: true | ||||
|                         }); | ||||
|     }); | ||||
|  | ||||
|     $('#delete-company').click(function() { | ||||
|         launchModalForm( | ||||
|                          "{% url 'company-delete' company.id %}", | ||||
|                          { | ||||
|                              redirect: "{% url 'company-index' %}" | ||||
|                          }); | ||||
|     }); | ||||
|     | ||||
| {% endblock %} | ||||
| @@ -6,6 +6,8 @@ | ||||
|  | ||||
| <h4>Supplier Parts</h4> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| <div id='button-toolbar'> | ||||
|     <button class="btn btn-success" id='part-create'>New Supplier Part</button> | ||||
|     <div class="dropdown" style="float: right;"> | ||||
| @@ -17,8 +19,6 @@ | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| <table class='table table-striped table-condensed' id='part-table' data-toolbar='#button-toolbar'> | ||||
| </table> | ||||
|  | ||||
|   | ||||
| @@ -5,14 +5,15 @@ | ||||
| {% include 'company/tabs.html' with tab='po' %} | ||||
|  | ||||
| <h4>Open Purchase Orders</h4> | ||||
| <hr> | ||||
|  | ||||
| <div class='container' style='float: right;'> | ||||
| <div id='button-bar'> | ||||
|     <div class='btn-group'> | ||||
|         <button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button> | ||||
|         <button class='btn btn-primary' type='button' id='company-order-2' title='Create new purchase order'>New Purchase Order</button> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| {% include "order/po_table.html" with orders=company.outstanding_purchase_orders.all %} | ||||
| {% include "order/po_table.html" with orders=company.outstanding_purchase_orders.all toolbar='#button-bar' %} | ||||
|  | ||||
| {% if company.closed_purchase_orders.count > 0 %} | ||||
| {% include "order/po_table_collapse.html" with title="Closed Orders" orders=company.closed_purchase_orders.all %} | ||||
| @@ -23,15 +24,27 @@ | ||||
| {% block js_ready %} | ||||
| {{ block.super }} | ||||
|  | ||||
| $("#po-create").click(function() { | ||||
|     launchModalForm("{% url 'purchase-order-create' %}", | ||||
|     function newOrder() { | ||||
|         launchModalForm("{% url 'purchase-order-create' %}", | ||||
|         { | ||||
|             data: { | ||||
|                 supplier: {{ company.id }}, | ||||
|             }, | ||||
|             follow: true, | ||||
|         } | ||||
|     ); | ||||
| }); | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     $("#company-order").click(function() { | ||||
|         newOrder(); | ||||
|     }); | ||||
|  | ||||
|     $("#company-order-2").click(function() { | ||||
|         newOrder(); | ||||
|     }); | ||||
|  | ||||
|     $("#po-table").bootstrapTable({ | ||||
|         search: true, | ||||
|         sortable: true, | ||||
|     }); | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -7,6 +7,8 @@ | ||||
|  | ||||
| <h4>Supplier Stock</h4> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| {% include "stock_table.html" %} | ||||
|  | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -8,20 +8,15 @@ InvenTree | Supplier List | ||||
|  | ||||
| {% block content %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h3>Supplier List</h3> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|         <div class='container' id='active-build-toolbar' style='float: right;'> | ||||
|             <div class='btn-group' style='float: right;'> | ||||
|                 <button type='button' class="btn btn-success" id='new-company' title='Add new supplier'>New Supplier</button> | ||||
|             </div> | ||||
|         </div> | ||||
| <h3>Supplier List</h3> | ||||
| <hr> | ||||
|  | ||||
| <div id='button-toolbar'> | ||||
|     <div class='btn-group'> | ||||
|         <button type='button' class="btn btn-success" id='new-company' title='Add new supplier'>New Supplier</button> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| <table class='table table-striped' id='company-table' data-toolbar='#button-toolbar'> | ||||
| </table> | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| {% block form %} | ||||
|  | ||||
| <h4> | ||||
|     Step 1 of 2 - Select Parts | ||||
|     Step 1 of 2 - Select Part Suppliers | ||||
| </h4> | ||||
|  | ||||
| {% if parts|length > 0 %} | ||||
|   | ||||
| @@ -1,11 +1,14 @@ | ||||
| <table class='table table-striped table-condensed' id='po-table'> | ||||
| <table class='table table-striped table-condensed' id='po-table' {% if toolbar %}data-toolbar='{{ toolbar }}'{% endif %}> | ||||
|     <thead> | ||||
|     <tr> | ||||
|         <th data-field='company'>Company</th> | ||||
|         <th data-field='reference'>Order Reference</th> | ||||
|         <th data-field='description'>Description</th> | ||||
|         <th data-field='company' data-searchable='true'>Company</th> | ||||
|         <th data-field='reference' data-searchable='true'>Order Reference</th> | ||||
|         <th data-field='description' data-searchable='true'>Description</th> | ||||
|         <th data-field='status'>Status</th> | ||||
|         <th data-field='items'>Items</th> | ||||
|     </tr> | ||||
|     </thead> | ||||
|     <tbody> | ||||
|     {% for order in orders %} | ||||
|     <tr> | ||||
|         <td>{% include "hover_image.html" with image=order.supplier.image hover=True %}<a href="{{ order.supplier.get_absolute_url }}purchase-orders/">{{ order.supplier.name }}</a></td> | ||||
| @@ -15,4 +18,5 @@ | ||||
|         <td>{{ order.lines.count }}</td> | ||||
|     </tr> | ||||
|     {% endfor %} | ||||
|     </tbody> | ||||
| </table> | ||||
| @@ -62,6 +62,9 @@ InvenTree | {{ order }} | ||||
| <hr> | ||||
|  | ||||
| <div id='order-toolbar-buttons' class='btn-group' style='float: right;'> | ||||
|     {% if order.status == OrderStatus.PENDING %} | ||||
|     <button type='button' class='btn btn-default' id='new-po-line'>Add Line Item</button> | ||||
|     {% endif %} | ||||
|     <button type='button' class='btn btn-primary' id='edit-order'>Edit Order</button> | ||||
|     {% if order.status == OrderStatus.PENDING and order.lines.count > 0 %} | ||||
|     <button type='button' class='btn btn-primary' id='place-order'>Place Order</button> | ||||
| @@ -73,10 +76,6 @@ InvenTree | {{ order }} | ||||
|  | ||||
| <h4>Order Items</h4> | ||||
|  | ||||
| {% if order.status == OrderStatus.PENDING %} | ||||
| <button type='button' class='btn btn-default' id='new-po-line'>Add Line Item</button> | ||||
| {% endif %} | ||||
|  | ||||
| <table class='table table-striped table-condensed' id='po-lines-table' data-toolbar='#order-toolbar-buttons'> | ||||
|     <thead> | ||||
|     <tr> | ||||
| @@ -122,10 +121,10 @@ InvenTree | {{ order }} | ||||
|         {% if order.status == OrderStatus.PENDING %} | ||||
|         <td> | ||||
|             <div class='btn-group'> | ||||
|                 <button class='btn btn-default btn-edit' id='edit-line-item-{{ line.id }} title='Edit line item' onclick='editPurchaseOrderLineItem()'> | ||||
|                 <button class='btn btn-default btn-edit' line='{{ line.id }}' id='edit-line-item-{{ line.id }} title='Edit line item' onclick='editPurchaseOrderLineItem()'> | ||||
|                     <span url="{% url 'po-line-item-edit' line.id %}" line='{{ line.id }}' class='glyphicon glyphicon-small glyphicon-edit'></span> | ||||
|                 </button> | ||||
|                 <button class='btn btn-default btn-remove' id='remove-line-item-{{ line.id }' title='Remove line item' type='button' onclick='removePurchaseOrderLineItem()'> | ||||
|                 <button class='btn btn-default btn-remove' line='{{ line.id }}' id='remove-line-item-{{ line.id }' title='Remove line item' type='button' onclick='removePurchaseOrderLineItem()'> | ||||
|                     <span url="{% url 'po-line-item-delete' line.id %}" line='{{ line.id }}' class='glyphicon glyphicon-small glyphicon-remove'></span> | ||||
|                 </button> | ||||
|             </div> | ||||
|   | ||||
| @@ -8,18 +8,16 @@ InvenTree | Purchase Orders | ||||
|  | ||||
| {% block content %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h3>Purchase Orders</h3> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|         <div class='btn-group' style='float: right;'> | ||||
|             <button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button> | ||||
|         </div> | ||||
| <h3>Purchase Orders</h3> | ||||
| <hr> | ||||
|  | ||||
| <div id='table-buttons'> | ||||
|     <div class='btn-group' style='float: right;'> | ||||
|         <button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| {% include "order/po_table.html" %} | ||||
| {% include "order/po_table.html" with toolbar='#table-buttons' %} | ||||
|  | ||||
| {% endblock %} | ||||
|  | ||||
| @@ -34,4 +32,8 @@ $("#po-create").click(function() { | ||||
|     ); | ||||
| }); | ||||
|  | ||||
| $("#po-table").bootstrapTable({ | ||||
|     search: true, | ||||
| }); | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -5,37 +5,39 @@ | ||||
|  | ||||
| {% include 'part/tabs.html' with tab='attachments' %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Part Attachments</h4> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|         <div class="btn-group" style="float: right;"> | ||||
|                 <button type='button' class='btn btn-success' id='new-attachment'>Add Attachment</button> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| <h4>Part Attachments</h4> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| <table class='table table-striped table-condensed' data-toolbar='#toolbar' id='attachment-table'> | ||||
| <tr> | ||||
|     <th>File</th> | ||||
|     <th>Comment</th> | ||||
|     <th></th> | ||||
| </tr> | ||||
| {% for attachment in part.attachments.all %} | ||||
| <tr> | ||||
|     <td><a href='/media/{{ attachment.attachment }}'>{{ attachment.basename }}</a></td> | ||||
|     <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> | ||||
|         </div> | ||||
|     </td> | ||||
| </tr> | ||||
| {% endfor %} | ||||
| <div id='attachment-buttons'> | ||||
|     <div class="btn-group"> | ||||
|         <button type='button' class='btn btn-success' id='new-attachment'>Add Attachment</button> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <table class='table table-striped table-condensed' data-toolbar='#attachment-buttons' id='attachment-table'> | ||||
|     <thead> | ||||
|         <tr> | ||||
|             <th data-field='file' data-searchable='true'>File</th> | ||||
|             <th data-field='comment' data-searchable='true'>Comment</th> | ||||
|             <th></th> | ||||
|         </tr> | ||||
|     </thead> | ||||
|     <tbody> | ||||
|         {% for attachment in part.attachments.all %} | ||||
|         <tr> | ||||
|             <td><a href='/media/{{ attachment.attachment }}'>{{ attachment.basename }}</a></td> | ||||
|             <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> | ||||
|                 </div> | ||||
|             </td> | ||||
|         </tr> | ||||
|         {% endfor %} | ||||
|     </tbody> | ||||
| {% if part.variant_of and part.variant_of.attachments.count > 0 %} | ||||
| <tr> | ||||
|     <td colspan='3'> | ||||
| @@ -83,4 +85,9 @@ | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|     $("#attachment-table").bootstrapTable({ | ||||
|         search: true, | ||||
|         sortable: true, | ||||
|     }); | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -4,9 +4,12 @@ | ||||
|  | ||||
| {% include 'part/tabs.html' with tab='detail' %} | ||||
|  | ||||
| <h4>Part Details</h4> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Part Details</h4> | ||||
|     <table class='table table-striped'> | ||||
|         <tr> | ||||
|             <td><b>Part name</b></td> | ||||
| @@ -75,7 +78,6 @@ | ||||
|     </table> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Part Type</h4> | ||||
|     <table class='table table-striped'> | ||||
|         <tr> | ||||
|             <td><b>Virtual</b></td> | ||||
|   | ||||
| @@ -5,19 +5,38 @@ | ||||
|  | ||||
| {% include 'part/tabs.html' with tab='orders' %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Open Part Orders</h4> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
| <h4>Part Orders</h4> | ||||
| <hr> | ||||
|  | ||||
| <div id='button-bar'> | ||||
|     <div class='btn-group'> | ||||
|         <button class='btn btn-primary' type='button' id='part-order-2' title='Order part'>Order Part</button> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| {% include "order/po_table.html" with orders=part.open_purchase_orders %} | ||||
| {% include "order/po_table.html" with orders=part.open_purchase_orders toolbar='#button-bar' %} | ||||
|  | ||||
| {% if part.closed_purchase_orders|length > 0 %} | ||||
| <h4>Closed Orders</h4> | ||||
| {% include "order/po_table.html" with orders=part.closed_purchase_orders %} | ||||
| {% endif %} | ||||
|  | ||||
| {% endblock %} | ||||
|  | ||||
| {% block js_ready %} | ||||
| {{ block.super }} | ||||
|  | ||||
| $("#po-table").bootstrapTable({ | ||||
|     search: true, | ||||
|     sortable: true, | ||||
| }); | ||||
|  | ||||
| $("#part-order-2").click(function() { | ||||
|     launchModalForm("/order/purchase-order/order-parts/", { | ||||
|         data: { | ||||
|             part: {{ part.id }}, | ||||
|         }, | ||||
|     }); | ||||
| }); | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -2,7 +2,9 @@ | ||||
|  | ||||
| {% block pre_form_content %} | ||||
|  | ||||
| Are you sure you want to delete part '{{ part.full_name }}'? | ||||
| <div class='alert alert-block alert-danger'> | ||||
|     Are you sure you want to delete part '<b>{{ part.full_name }}</b>'? | ||||
| </div> | ||||
|  | ||||
| {% if part.used_in_count %} | ||||
| <hr> | ||||
|   | ||||
| @@ -4,13 +4,7 @@ | ||||
|  | ||||
| {% include 'part/tabs.html' with tab='stock' %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Part Stock</h4> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|     </div> | ||||
| </div> | ||||
| <h4>Part Stock</h4> | ||||
| <hr> | ||||
|  | ||||
| {% if part.is_template %} | ||||
|   | ||||
| @@ -4,14 +4,7 @@ | ||||
|  | ||||
| {% include 'part/tabs.html' with tab='suppliers' %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Part Suppliers</h4> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <h4>Part Suppliers</h4> | ||||
| <hr> | ||||
|  | ||||
| <div id='button-toolbar'> | ||||
|   | ||||
| @@ -48,6 +48,4 @@ | ||||
|     <li{% ifequal tab 'attachments' %} class="active"{% endifequal %}> | ||||
|         <a href="{% url 'part-attachments' part.id %}">Attachments {% if part.attachment_count > 0 %}<span class="badge">{{ part.attachment_count }}</span>{% endif %}</a> | ||||
|     </li> | ||||
| </ul> | ||||
|  | ||||
| <br> | ||||
| </ul> | ||||
| @@ -4,15 +4,7 @@ | ||||
|  | ||||
| {% include 'part/tabs.html' with tab='used' %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
|         <h4>Used to Build</h4> | ||||
|     </div> | ||||
|     <div class='col-sm-6'> | ||||
|         <div class="btn-group" style="float: right;"> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| <h4>Assemblies</h4> | ||||
|  | ||||
| <hr> | ||||
|  | ||||
|   | ||||
| @@ -158,6 +158,10 @@ | ||||
| .navigation { | ||||
| } | ||||
|  | ||||
| .nav-tabs { | ||||
|     margin-bottom: 20px; | ||||
| } | ||||
|  | ||||
| .breadcrump { | ||||
|     margin-bottom: 5px; | ||||
| } | ||||
|   | ||||
| @@ -9,32 +9,29 @@ | ||||
|     <p> | ||||
|         <div class='btn-group'> | ||||
|             {% include "qr_button.html" %} | ||||
|             {% if item.in_stock %} | ||||
|             <button type='button' class='btn btn-default btn-glyph' id='stock-add' title='Add to stock'> | ||||
|                 <span class='glyphicon glyphicon-plus-sign' style='color: #1a1;'/> | ||||
|             </button> | ||||
|             <button type='button' class='btn btn-default btn-glyph' id='stock-remove' title='Take from stock'> | ||||
|                 <span class='glyphicon glyphicon-minus-sign' style='color: #a11;'/> | ||||
|             </button> | ||||
|             <button type='button' class='btn btn-default btn-glyph' id='stock-move' title='Transfer stock'> | ||||
|                 <span class='glyphicon glyphicon-transfer' style='color: #11a;'/> | ||||
|             </button> | ||||
|             <button type='button' class='btn btn-default btn-glyph' id='stock-duplicate' title='Duplicate stock item'> | ||||
|                 <span class='glyphicon glyphicon-duplicate'/> | ||||
|             </button> | ||||
|             {% endif %} | ||||
|             <button type='button' class='btn btn-default btn-glyph' id='stock-edit' title='Edit stock item'> | ||||
|                 <span class='glyphicon glyphicon-cog'/> | ||||
|             </button> | ||||
|             <button type='button' class='btn btn-default btn-glyph' id='stock-delete' title='Edit stock item'> | ||||
|                 <span class='glyphicon glyphicon-trash' style='color: #a11;'/> | ||||
|             </button> | ||||
|         </div> | ||||
|     </p> | ||||
| </div> | ||||
| <div class='col-sm-6'> | ||||
|     <h3> | ||||
|     <div style='float: right;'> | ||||
|     <div class="dropdown" style="float: right;"> | ||||
|         <button class='btn btn-primary' type='button' id='duplicate-item'>Copy Stock Item</button> | ||||
|         <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options | ||||
|         <span class="caret"></span></button> | ||||
|         <ul class="dropdown-menu"> | ||||
|           {% if item.in_stock %} | ||||
|           <li><a href="#" id='stock-edit' title='Edit stock item'>Edit stock item</a></li> | ||||
|           <hr> | ||||
|           <li><a href='#' id='stock-add' title='Add stock'>Add to stock</a></li> | ||||
|           <li><a href='#' id='stock-remove' title='Take stock'>Take from stock</a></li> | ||||
|           <li><a href='#' id='stock-stocktake' title='Count stock'>Stocktake</a></li> | ||||
|           <li><a href="#" id='stock-move' title='Move stock'>Move stock item</a></li> | ||||
|           {% endif %} | ||||
|           <hr> | ||||
|           <li><a href="#" id='stock-delete' title='Delete stock item'>Delete stock item</a></li> | ||||
|     </div> | ||||
|     </div> | ||||
|     </h3> | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div class='row'> | ||||
|     <div class='col-sm-6'> | ||||
| @@ -90,6 +87,10 @@ | ||||
|         </tr> | ||||
|         {% endif %} | ||||
|         {% if item.supplier_part %} | ||||
|         <tr> | ||||
|             <td>Supplier</td> | ||||
|             <td><a href="{% url 'company-detail' item.supplier_part.supplier.id %}">{{ item.supplier_part.supplier.name }}</a></td> | ||||
|         </tr> | ||||
|         <tr> | ||||
|             <td>Supplier Part</td> | ||||
|             <td><a href="{% url 'supplier-part-detail' item.supplier_part.id %}">{{ item.supplier_part.SKU }}</a></td> | ||||
| @@ -134,7 +135,7 @@ | ||||
| {% block js_ready %} | ||||
| {{ block.super }} | ||||
|  | ||||
|     $("#duplicate-item").click(function() { | ||||
|     $("#stock-duplicate").click(function() { | ||||
|         launchModalForm( | ||||
|             "{% url 'stock-item-create' %}", | ||||
|             { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user