{% extends extends_base %}
{% load staticfiles %}
{% load i18n %}
{% comment %}

django-codenerix

Copyright 2017 Centrologic Computational Logistic Center S.L.

Project URL : http://www.codenerix.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

{% endcomment %}

{% block javascript_constants %}
    <script type="text/javascript">
        var tabs_js = JSON.parse('{{tabs_js|default:"[]"|safe}}');
    </script>
    {{block.super}}
{% endblock %}

{% block angular_app_libraries %}
    <script type="text/javascript" src="{{ static_filters_row }}"></script>
    <script type="text/javascript" src="{{ static_app_row }}"></script>
    <script type="text/javascript" src="{% static "codenerix/js/controllers.js" %}"></script>
    {% if static_controllers_row %}<script type="text/javascript" src="{{ static_controllers_row }}"></script>{% endif %}
    {% block angular_app_service %}
        <script type="text/javascript">
            var ws_entry_point="{{ws_entry_point}}";
            var static_partial_row="{{static_partial_row}}";
            var static_partial_summary="{{static_partial_summary}}";
            angular.module('codenerixServices', ['ngResource'])
            .factory('Register', ['$resource', function($resource){
                return $resource('/{{ws_entry_point}}/:pk/:action', { json:'{}', pk:null, action:null },{
                    query:{ method: "GET", params: { json:'@json' }, isArray: false },
                    get:{ method: "GET", params: { pk:'@pk', action:'@action' }, isArray: false },
                }); 
            }]);
        </script>
    {% endblock %}
{% endblock %}
