mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Refactor company base page
This commit is contained in:
		| @@ -1,19 +1,17 @@ | ||||
| {% extends "two_column.html" %} | ||||
| {% extends "page_base.html" %} | ||||
|  | ||||
| {% load static %} | ||||
| {% load i18n %} | ||||
| {% load inventree_extras %} | ||||
|  | ||||
|  | ||||
| {% block page_title %} | ||||
| {% inventree_title %} | {% trans "Company" %} - {{ company.name }} | ||||
| {% endblock %} | ||||
|  | ||||
|  | ||||
| {% block thumbnail %} | ||||
| {% settings_value "INVENTREE_DOWNLOAD_FROM_URL" as allow_download %} | ||||
|  | ||||
| <div class='dropzone part-thumb-container' id='company-thumb'> | ||||
| {% block details_left %} | ||||
| <div class='row g-0'> | ||||
|     <div class='col-md-4'> | ||||
|         <div class='dropzone part-thumb-container' id='company-thumb'> | ||||
|             <img class="part-thumb" id='company-image' | ||||
|             {% if company.image %} | ||||
|             src="{{ company.image.url }}" | ||||
| @@ -22,47 +20,47 @@ | ||||
|             {% endif %}/> | ||||
|             <div class='btn-row part-thumb-overlay'> | ||||
|                 <div class='btn-group'> | ||||
|             <button type='button' class='btn btn-default btn-glyph' title='{% trans "Upload new image" %}' id='company-image-upload'><span class='fas fa-file-upload'></span></button> | ||||
|                     <button type='button' class='btn btn-outline-secondary btn-glyph' title='{% trans "Upload new image" %}' id='company-image-upload'><span class='fas fa-file-upload'></span></button> | ||||
|                     {% settings_value "INVENTREE_DOWNLOAD_FROM_URL" as allow_download %} | ||||
|                     {% if allow_download %} | ||||
|             <button type='button' class='btn btn-default btn-glyph' title="{% trans 'Download image from URL' %}" id='company-image-url'><span class='fas fa-cloud-download-alt'></span></button> | ||||
|                     <button type='button' class='btn btn-outline-secondary btn-glyph' title="{% trans 'Download image from URL' %}" id='company-image-url'><span class='fas fa-cloud-download-alt'></span></button> | ||||
|                     {% endif %} | ||||
|                 </div> | ||||
|             </div> | ||||
| </div> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block page_data %} | ||||
| <h3>{% trans "Company" %}</h3> | ||||
| <hr> | ||||
| <h4> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class='col-md-8'> | ||||
|         <h4> | ||||
|             {{ company.name }} | ||||
|             {% if user.is_staff and perms.company.change_company %} | ||||
|             <a  href="{% url 'admin:company_company_change' company.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a> | ||||
|             {% endif %} | ||||
| </h4> | ||||
| <p>{{ company.description }}</p> | ||||
| <div class='btn-group action-buttons'> | ||||
|         </h4> | ||||
|         <p>{{ company.description }}</p> | ||||
|         <div class='btn-group' role='group'> | ||||
|             {% if company.is_supplier and roles.purchase_order.add %} | ||||
|     <button type='button' class='btn btn-default' id='company-order-2' title='{% trans "Create Purchase Order" %}'> | ||||
|             <button type='button' class='btn btn-outline-secondary' id='company-order-2' title='{% trans "Create Purchase Order" %}'> | ||||
|                 <span class='fas fa-shopping-cart'/> | ||||
|             </button> | ||||
|             {% endif %} | ||||
|             {% if perms.company.change_company %} | ||||
|     <button type='button' class='btn btn-default' id='company-edit' title='{% trans "Edit company information" %}'> | ||||
|             <button type='button' class='btn btn-outline-secondary' id='company-edit' title='{% trans "Edit company information" %}'> | ||||
|                 <span class='fas fa-edit icon-green'/> | ||||
|             </button> | ||||
|             {% endif %} | ||||
|             {% if perms.company.delete_company %} | ||||
|     <button type='button' class='btn btn-default' id='company-delete' title='{% trans "Delete Company" %}'> | ||||
|             <button type='button' class='btn btn-outline-secondary' id='company-delete' title='{% trans "Delete Company" %}'> | ||||
|                 <span class='fas fa-trash-alt icon-red'/> | ||||
|             </button> | ||||
|             {% endif %} | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block page_details %} | ||||
| <h4>{% trans "Company Details" %}</h4> | ||||
| <table class="table"> | ||||
| {% block details_right %} | ||||
|  | ||||
| <table class="table table-striped table-condensed"> | ||||
|     <col width='25'> | ||||
| {% if company.website %} | ||||
| <tr> | ||||
|   | ||||
| @@ -29,10 +29,14 @@ | ||||
|                         </button> | ||||
|                         <ul class="dropdown-menu"> | ||||
|                             {% if roles.purchase_order.add %} | ||||
|                             <li><a href='#' id='multi-supplier-part-order' title='{% trans "Order parts" %}'>{% trans "Order Parts" %}</a></li> | ||||
|                             <li><a class='dropdown-item' href='#' id='multi-supplier-part-order' title='{% trans "Order parts" %}'> | ||||
|                                 <span class='fas fa-shopping-cart'></span> {% trans "Order Parts" %} | ||||
|                             </a></li> | ||||
|                             {% endif %} | ||||
|                             {% if roles.purchase_order.delete %} | ||||
|                             <li><a href='#' id='multi-supplier-part-delete' title='{% trans "Delete parts" %}'>{% trans "Delete Parts" %}</a></li> | ||||
|                             <li><a class='dropdown-item' href='#' id='multi-supplier-part-delete' title='{% trans "Delete parts" %}'> | ||||
|                                 <span class='fas fa-trash-alt icon-red'></span> {% trans "Delete Parts" %} | ||||
|                             </a></li> | ||||
|                             {% endif %} | ||||
|                         </ul> | ||||
|                     </div> | ||||
| @@ -69,10 +73,14 @@ | ||||
|                         </button> | ||||
|                         <ul class="dropdown-menu"> | ||||
|                             {% if roles.purchase_order.add %} | ||||
|                             <li><a href='#' id='multi-manufacturer-part-order' title='{% trans "Order parts" %}'>{% trans "Order Parts" %}</a></li> | ||||
|                             <li><a class='dropdown-item' href='#' id='multi-manufacturer-part-order' title='{% trans "Order parts" %}'> | ||||
|                                 <span class='fas fa-shopping-cart'></span> {% trans "Order Parts" %} | ||||
|                             </a></li> | ||||
|                             {% endif %} | ||||
|                             {% if roles.purchase_order.delete %} | ||||
|                             <li><a href='#' id='multi-manufacturer-part-delete' title='{% trans "Delete parts" %}'>{% trans "Delete Parts" %}</a></li> | ||||
|                             <li><a class='dropdown-item' href='#' id='multi-manufacturer-part-delete' title='{% trans "Delete parts" %}'> | ||||
|                                 <span class='fas fa-trash-alt icon-red'></span> {% trans "Delete Parts" %} | ||||
|                             </a></li> | ||||
|                             {% endif %} | ||||
|                         </ul> | ||||
|                     </div>  | ||||
| @@ -166,7 +174,7 @@ | ||||
|             </div> | ||||
|             <div class='col-sm-6'> | ||||
|                 <div class='btn-group float-right'> | ||||
|                     <button type='button' id='edit-notes' title='{% trans "Edit Notes" %}' class='btn btn-small btn-default'> | ||||
|                     <button type='button' id='edit-notes' title='{% trans "Edit Notes" %}' class='btn btn-small btn-outline-secondary'> | ||||
|                         <span class='fas fa-edit'>       | ||||
|                         </span> | ||||
|                     </button> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user