{% extends "base.html" %} {% load static %} {% block content %} {% include "stock/loc_link.html" with location=location %}

{{ location.name }}

{{ location.description }}

{% if location.has_children %}

Sub Locations

{% include "stock/location_list.html" with locations=location.children %} {% endif %}

Stock Items

{% include "stock/stock_table.html" with items=location.items %}
{% include 'modals.html' %} {% endblock %} {% block js_load %} {% endblock %} {% block js_ready %} $('#stock-table').footable(); $('#location-create').click(function () { launchModalForm("#modal-form", "{% url 'stock-location-create' %}", { data: { location: {{ location.id }} }, follow: true }); }); $('#location-edit').click(function() { launchModalForm("#modal-form", "{% url 'stock-location-edit' location.id %}", { reload: true }); }); $('#location-delete').click(function() { launchDeleteForm("#modal-delete", "{% url 'stock-location-delete' location.id %}", { redirect: "{% url 'stock-index' %}" }); }) $('#new-item').click(function () { launchModalForm("#modal-form", "{% url 'stock-item-create' %}", { reload: true, data: { location: {{ location.id }} } }); }); {% endblock %}