Create a new part parameter template

This commit is contained in:
Oliver Walters 2019-09-07 19:53:47 +10:00
parent 94ab7c5b0e
commit 67ea0fa887
2 changed files with 14 additions and 2 deletions

View File

@ -412,7 +412,7 @@ part_star_api_urls = [
]
part_param_api_urls = [
url(r'^template/?$', PartParameterTemplateList.as_view(), name='api-part-param-template-list'),
url(r'^template/$', PartParameterTemplateList.as_view(), name='api-part-param-template-list'),
url(r'^.*$', PartParameterList.as_view(), name='api-part-param-list'),
]

View File

@ -7,7 +7,11 @@
{% block settings %}
<h4>Part Parameter Templates</h4>
<table class='table table-striped table-condensed' id='param-table'>
<div id='param-buttons'>
<button class='btn btn-success' id='new-param'>New Parameter</button>
</div>
<table class='table table-striped table-condensed' id='param-table' data-toolbar='#param-buttons'>
</table>
{% endblock %}
@ -43,4 +47,12 @@
]
});
$("#new-param").click(function() {
launchModalForm("{% url 'part-param-template-create' %}", {
success: function() {
$("#param-table").bootstrapTable('refresh');
},
});
});
{% endblock %}