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

{% block subtitle %}{{ _('Add view') }} {{ g.template_title_delimiter }} {{ h.resource_display_name(resource) }}{% endblock %}
{% block form_title %}{{ _('Add view') }}{% endblock %}

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

{% block content_primary_nav %}
  <li class="active"><a href="#"><i class="fa fa-pencil"></i> {{ _('Add view') }}</a></li>
{% endblock %}

{% block form %}
  <form method="post" data-module="basic-form resource-form">
    {{ h.csrf_input() }}
    {% include 'package/snippets/view_form.html' %}
    <div class="form-actions">
        <button class="btn btn-secondary {% if not h.resource_view_display_preview(data) %}hide{%endif%}" name="preview" value="True" type="submit">{{ _('Preview') }}</button>
        <button class="btn btn-primary" name="save" value="Save" type="submit">{% block save_button_text %}{{ _('Add') }}{% endblock %}</button>
    </div>
  </form>
{% endblock %}
