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

{% set pkg_dict = c.pkg_dict %}
{% set res = c.resource %}

{% block subtitle %}{{ h.dataset_display_name(pkg_dict) }} - {{ h.resource_display_name(res) }}{% endblock %}

{% block breadcrumb_content_selected %}{% endblock %}

{% block breadcrumb_content %}
  {{ super() }}
  <li class="active"><a href="">{{ _('Edit') }}</a></li>
{% endblock %}

{% block content_action %}
  {% link_for _('View resource'), controller='package', action='resource_read', id=pkg_dict.name, resource_id=res.id, class_='btn', icon='eye-open' %}
{% endblock %}

{# logged_in is defined in new_resource.html #}
{% block form %}{{ h.snippet('package/snippets/resource_edit_form.html', data=data, errors=errors, error_summary=error_summary, pkg_name=pkg_dict.name, form_action=c.form_action, allow_upload=g.ofs_impl and logged_in) }}{% endblock %}

{% block secondary_content %}
  {% snippet 'package/snippets/info.html', pkg=pkg_dict, active=data.id, action='resource_edit' %}
{% endblock %}
