mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Add buttons to company page
This commit is contained in:
parent
c0e66dd9a0
commit
7effe3af9d
@ -24,6 +24,14 @@ InvenTree | Company - {{ company.name }}
|
|||||||
<div class='media-body'>
|
<div class='media-body'>
|
||||||
<h4>{{ company.name }}</h4>
|
<h4>{{ company.name }}</h4>
|
||||||
<p>{{ company.description }}</p>
|
<p>{{ company.description }}</p>
|
||||||
|
<div class='btn-group'>
|
||||||
|
<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='Edit company information'>
|
||||||
|
<span class='glyphicon glyphicon-trash'/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -77,6 +85,22 @@ InvenTree | Company - {{ company.name }}
|
|||||||
|
|
||||||
{% block js_ready %}
|
{% 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(
|
enableDragAndDrop(
|
||||||
"#company-thumb",
|
"#company-thumb",
|
||||||
"{% url 'company-image' company.id %}",
|
"{% url 'company-image' company.id %}",
|
||||||
|
@ -4,24 +4,7 @@
|
|||||||
|
|
||||||
{% include 'company/tabs.html' with tab='details' %}
|
{% include 'company/tabs.html' with tab='details' %}
|
||||||
|
|
||||||
<div class='row'>
|
<h4>Company Details</h4>
|
||||||
<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>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<table class='table table-striped'>
|
<table class='table table-striped'>
|
||||||
@ -45,19 +28,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ 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 %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user