mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Move "Company" view to new two-column template
This commit is contained in:
parent
79ea744280
commit
808a636484
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "two_column.html" %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
@ -7,100 +7,79 @@
|
|||||||
InvenTree | {% trans "Company" %} - {{ company.name }}
|
InvenTree | {% trans "Company" %} - {{ company.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block thumbnail %}
|
||||||
|
<div class='dropzone' id='company-thumb'>
|
||||||
<div class="row">
|
<img class="part-thumb"
|
||||||
<div class="col-sm-6">
|
{% if company.image %}
|
||||||
<div class="media">
|
src="{{ company.image.url }}"
|
||||||
<div class='media-left'>
|
{% else %}
|
||||||
<div class='dropzone' id='company-thumb'>
|
src="{% static 'img/blank_image.png' %}"
|
||||||
<img class="part-thumb"
|
{% endif %}/>
|
||||||
{% if company.image %}
|
|
||||||
src="{{ company.image.url }}"
|
|
||||||
{% else %}
|
|
||||||
src="{% static 'img/blank_image.png' %}"
|
|
||||||
{% endif %}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='media-body'>
|
|
||||||
<h3>{{ company.name }}</h3>
|
|
||||||
<p>{{ company.description }}</p>
|
|
||||||
<div class='btn-group'>
|
|
||||||
{% if company.is_supplier %}
|
|
||||||
<button type='button' class='btn btn-default btn-glyph' id='company-order-2' 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-edit'/>
|
|
||||||
</button>
|
|
||||||
<button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Delete company'>
|
|
||||||
<span class='glyphicon glyphicon-trash'/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<table class="table">
|
|
||||||
<col width='25'>
|
|
||||||
{% if company.website %}
|
|
||||||
<tr>
|
|
||||||
<td><span class='fas fa-globe'></span></td>
|
|
||||||
<td>{% trans "Website" %}</td>
|
|
||||||
<td><a href="{{ company.website }}">{{ company.website }}</a></td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% if company.address %}
|
|
||||||
<tr>
|
|
||||||
<td><span class='fas fa-map-marked-alt'></span></td>
|
|
||||||
<td>{% trans "Address" %}</td>
|
|
||||||
<td>{{ company.address }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% if company.phone %}
|
|
||||||
<tr>
|
|
||||||
<td><span class='fas fa-phone'></span></td>
|
|
||||||
<td>{% trans "Phone" %}</td>
|
|
||||||
<td>{{ company.phone }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% if company.email %}
|
|
||||||
<tr>
|
|
||||||
<td><span class='fas fa-at'></span></td>
|
|
||||||
<td>{% trans "Email" %}</td>
|
|
||||||
<td>{{ company.email }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% if company.contact %}
|
|
||||||
<tr>
|
|
||||||
<td><span class='fas fa-user'></span></td>
|
|
||||||
<td>{% trans "Contact" %}</td>
|
|
||||||
<td>{{ company.contact }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class='container-fluid'>
|
|
||||||
|
|
||||||
{% block details %}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_data %}
|
||||||
|
<h3>{{ company.name }}</h3>
|
||||||
|
<p>{{ company.description }}</p>
|
||||||
|
<div class='btn-group'>
|
||||||
|
{% if company.is_supplier %}
|
||||||
|
<button type='button' class='btn btn-default btn-glyph' id='company-order-2' 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-edit'/>
|
||||||
|
</button>
|
||||||
|
<button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Delete company'>
|
||||||
|
<span class='glyphicon glyphicon-trash'/>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_load %}
|
{% block page_details %}
|
||||||
{{ block.super }}
|
<h4>{% trans "Company Details" %}</h4>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
<table class="table">
|
||||||
|
<col width='25'>
|
||||||
|
{% if company.website %}
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-globe'></span></td>
|
||||||
|
<td>{% trans "Website" %}</td>
|
||||||
|
<td><a href="{{ company.website }}">{{ company.website }}</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% if company.address %}
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-map-marked-alt'></span></td>
|
||||||
|
<td>{% trans "Address" %}</td>
|
||||||
|
<td>{{ company.address }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% if company.phone %}
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-phone'></span></td>
|
||||||
|
<td>{% trans "Phone" %}</td>
|
||||||
|
<td>{{ company.phone }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% if company.email %}
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-at'></span></td>
|
||||||
|
<td>{% trans "Email" %}</td>
|
||||||
|
<td>{{ company.email }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% if company.contact %}
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-user'></span></td>
|
||||||
|
<td>{% trans "Contact" %}</td>
|
||||||
|
<td>{{ company.contact }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
|
{{ block.super }}
|
||||||
|
|
||||||
$('#company-edit').click(function() {
|
$('#company-edit').click(function() {
|
||||||
launchModalForm(
|
launchModalForm(
|
||||||
|
@ -107,6 +107,7 @@ InvenTree
|
|||||||
<script type='text/javascript' src="{% static 'script/inventree/filters.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/filters.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/build.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/build.js' %}"></script>
|
||||||
|
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/order.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/order.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/company.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/company.js' %}"></script>
|
||||||
|
42
InvenTree/templates/two_column.html
Normal file
42
InvenTree/templates/two_column.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load static %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div class='row'>
|
||||||
|
<div class='col-sm-6'>
|
||||||
|
<div class='media-left'>
|
||||||
|
{% block thumbnail %}
|
||||||
|
<!-- Image goes here -->
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
<div class='media-body'>
|
||||||
|
{% block page_data %}
|
||||||
|
<!-- Data next to image goes here -->
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class='col-sm-6'>
|
||||||
|
{% block page_details %}
|
||||||
|
<!-- Right column data goes here -->
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class='container-fluid'>
|
||||||
|
{% block details %}
|
||||||
|
<!-- Particular page detail views go here -->
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js_ready %}
|
||||||
|
{{ block.super }}
|
||||||
|
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user