mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Rearranging buttons
This commit is contained in:
		| @@ -275,7 +275,13 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-attachments'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Attachments" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Attachments" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% include "attachment_button.html" %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         {% include "attachment_table.html" %} | ||||
|   | ||||
| @@ -58,7 +58,13 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-order-attachments'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Purchase Order Attachments" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Attachments" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% include "attachment_button.html" %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         {% include "attachment_table.html" %} | ||||
|   | ||||
| @@ -49,7 +49,13 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-order-attachments'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Attachments" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Attachments" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% include "attachment_button.html" %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         {% include "attachment_table.html" %} | ||||
|   | ||||
| @@ -129,14 +129,19 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-purchase-orders'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Purchase Orders" %}</h4> | ||||
|         <div class='d-flex flex-row'>     | ||||
|             <h4>{% trans "Purchase Orders" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 <button class='btn btn-primary' type='button' id='part-order2' title='{% trans "Order part" %}'> | ||||
|                     <span class='fas fa-shopping-cart'></span> {% trans "Order Part" %} | ||||
|                 </button> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div id='po-button-bar'> | ||||
|             <div class='button-toolbar container-fluid' style='float: right;'> | ||||
|                 <button class='btn btn-primary' type='button' id='part-order2' title='{% trans "Order part" %}'> | ||||
|                     <span class='fas fa-shopping-cart'></span> {% trans "Order Part" %} | ||||
|                 </button> | ||||
|                 <div class='filter-list' id='filter-list-purchaseorder'> | ||||
|                     <!-- An empty div in which the filter list will be constructed --> | ||||
|                 </div> | ||||
| @@ -234,11 +239,10 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-part-parameters'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Parameters" %}</h4> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div id='param-button-toolbar'> | ||||
|             <div class='button-toolbar container-fluid' style='float: right;'> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Parameters" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% if roles.part.add %} | ||||
|                 <button title='{% trans "Add new parameter" %}' class='btn btn-success' id='param-create'> | ||||
|                     <span class='fas fa-plus-circle'></span> {% trans "New Parameter" %} | ||||
| @@ -246,13 +250,25 @@ | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div id='param-button-toolbar'> | ||||
|             <div class='button-toolbar container-fluid' style='float: right;'> | ||||
|             </div> | ||||
|         </div> | ||||
|         <table id='parameter-table' class='table table-condensed table-striped' data-toolbar="#param-button-toolbar"></table> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-part-attachments'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Attachments" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Attachments" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% include "attachment_button.html" %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         {% include "attachment_table.html" %} | ||||
| @@ -261,17 +277,24 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-related-parts'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Related Parts" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Related Parts" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% if roles.part.change %} | ||||
|                 <button class='btn btn-success' type='button' id='add-related-part' title='{% trans "Add Related" %}'> | ||||
|                     <span class='fas fa-plus-circle'></span> {% trans "Add Related" %} | ||||
|                 </button> | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div id='related-button-bar'> | ||||
|             <div class='button-toolbar container-fluid' style='float: left;'> | ||||
|                 {% if roles.part.change %} | ||||
|                 <button class='btn btn-success' type='button' id='add-related-part' title='{% trans "Add Related" %}'>{% trans "Add Related" %}</button> | ||||
|                 <div class='filter-list' id='filter-list-related'> | ||||
|                     <!-- An empty div in which the filter list will be constructed --> | ||||
|                 </div> | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|         </div> | ||||
|          | ||||
| @@ -362,14 +385,19 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-suppliers'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Part Suppliers" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Part Suppliers" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 <button class="btn btn-success" id='supplier-create'> | ||||
|                     <span class='fas fa-plus-circle'></span> {% trans "New Supplier Part" %} | ||||
|                 </button> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div id='supplier-button-toolbar'> | ||||
|             <div class='btn-group'> | ||||
|                 <button class="btn btn-success" id='supplier-create'> | ||||
|                     <span class='fas fa-plus-circle'></span> {% trans "New Supplier Part" %} | ||||
|                 </button> | ||||
|                 <div id='opt-dropdown' class="btn-group"> | ||||
|                     <button id='supplier-part-options' class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown">{% trans "Options" %} <span class="caret"></span></button> | ||||
|                     <ul class="dropdown-menu"> | ||||
| @@ -384,15 +412,20 @@ | ||||
|     </div> | ||||
|  | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Part Manufacturers" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Part Manufacturers" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 <button class="btn btn-success" id='manufacturer-create'> | ||||
|                     <span class='fas fa-plus-circle'></span> {% trans "New Manufacturer Part" %} | ||||
|                 </button> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div class='panel-content'> | ||||
|             <div id='manufacturer-button-toolbar'> | ||||
|                 <div class='btn-group'> | ||||
|                     <button class="btn btn-success" id='manufacturer-create'> | ||||
|                         <span class='fas fa-plus-circle'></span> {% trans "New Manufacturer Part" %} | ||||
|                     </button> | ||||
|                     <div id='opt-dropdown' class="btn-group"> | ||||
|                         <button id='manufacturer-part-options' class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown">{% trans "Options" %} <span class="caret"></span></button> | ||||
|                         <ul class="dropdown-menu"> | ||||
|   | ||||
| @@ -14,25 +14,30 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-history'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Stock Tracking Information" %}</h4> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         {% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %} | ||||
|         {% if owner_control.value == "True" %} | ||||
|             {% authorized_owners item.owner as owners %} | ||||
|         {% endif %} | ||||
|         <!-- Check permissions and owner --> | ||||
|         {% if owner_control.value == "False" or owner_control.value == "True" and user in owners %} | ||||
|         {% if roles.stock.change and not item.is_building %} | ||||
|         <div id='table-toolbar'>   | ||||
|             <div class='btn-group'> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Stock Tracking Information" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %} | ||||
|                 {% if owner_control.value == "True" %} | ||||
|                     {% authorized_owners item.owner as owners %} | ||||
|                 {% endif %} | ||||
|                 <!-- Check permissions and owner --> | ||||
|                 {% if owner_control.value == "False" or owner_control.value == "True" and user in owners %} | ||||
|                 {% if roles.stock.change and not item.is_building %} | ||||
|                 <button class='btn btn-success' type='button' title='New tracking entry' id='new-entry'> | ||||
|                     <span class='fas fa-plus-circle'></span> {% trans "New Entry" %} | ||||
|                 </button> | ||||
|                 {% endif %} | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         <div id='table-toolbar'>   | ||||
|             <div class='btn-group'> | ||||
|             </div> | ||||
|         </div> | ||||
|         {% endif %} | ||||
|         {% endif %} | ||||
|         <table class='table table-condensed table-striped' id='track-table' data-toolbar='#table-toolbar'> | ||||
|         </table> | ||||
|     </div> | ||||
| @@ -85,7 +90,13 @@ | ||||
|  | ||||
| <div class='panel panel-hidden' id='panel-attachments'> | ||||
|     <div class='panel-heading'> | ||||
|         <h4>{% trans "Attachments" %}</h4> | ||||
|         <div class='d-flex flex-row'> | ||||
|             <h4>{% trans "Attachments" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% include "attachment_button.html" %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='panel-content'> | ||||
|         {% include "attachment_table.html" %} | ||||
|   | ||||
							
								
								
									
										5
									
								
								InvenTree/templates/attachment_button.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								InvenTree/templates/attachment_button.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| {% load i18n %} | ||||
|  | ||||
| <button type='button' class='btn btn-success' id='new-attachment'> | ||||
|     <span class='fas fa-plus-circle'></span> {% trans "Add Attachment" %} | ||||
| </button> | ||||
| @@ -2,9 +2,9 @@ | ||||
|  | ||||
| <div id='attachment-buttons'> | ||||
|     <div class='btn-group'> | ||||
|         <button type='button' class='btn btn-success' id='new-attachment'> | ||||
|             <span class='fas fa-plus-circle'></span> {% trans "Add Attachment" %} | ||||
|         </button> | ||||
|         <div class='filter-list' id='filter-list-related'> | ||||
|                     <!-- An empty div in which the filter list will be constructed --> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user