{% extends "package/edit_base.html" %}

{% block primary_content %}
  <section class="module">
    {% block page_header %}{% endblock %}
    <div class="module-content">
      {% block primary_content_inner %}
        {% block form %}
          {#- passing c to a snippet is bad but is required here
              for backwards compatibility with old templates and
              plugins using setup_template_variables() -#}
          {{- h.snippet(form_snippet, pkg_dict=pkg_dict, **form_vars) -}}
        {% endblock %}
      {% endblock %}
    </div>
  </section>
{% endblock %}

{% block secondary_content %}
  {% block info_module %}
    <section class="module module-narrow module-shallow">
      <h2 class="module-heading"><i class="fa fa-info-circle"></i> {{ _('What are ' + dataset_type + 's?') }}</h2>
      <div class="module-content">
        <p>
          {%- if dataset_type == "service" -%}
              {% trans %}
                Services are deployed and executed in the premises of the
            provider. The consuming party access them remotely, and must
            therefore transfer data.

                When providing a service, be aware that any consumer will
            transfer their data onto your premisses, and that you will bare
            the infrastructure cost of processing their data.
              {% endtrans %}
          
          {%- elif dataset_type == "dataset" -%}
              {% trans %}
              this is a test
              A CKAN Dataset is a collection of data resources (such as files),
              together with a description and other information, at a fixed URL.
              Datasets are what users see when searching for data.
              {% endtrans %}
          {%- elif dataset_type == "application" -%}
            {% trans %}
              Applications are deployed and executed in the premises of the
            consumer. The consumer party access them localy, and therefore
            doesn't need to transfer any data outside of their premises.

            When providing an application, be aware that the code of said
            application will be transferred to the consumer.
            {% endtrans %}
          {%- endif -%}
        </p>
      </div>
    </section>
  {% endblock %}

  {% block resources_module %}
    {# TODO: Pass in a list of previously created resources and the current package dict #}
    {% snippet "package/snippets/resources.html", pkg={}, action='new_resource', is_activity_archive=False %}
  {% endblock %}
{% endblock %}
