{% extends "base_generic.html" %}

{% block title %}{{ title }}{% endblock %}

{% block heading %}{{ title }}{% endblock %}

{% block content %}

<div class="row">
  <div class="large-12 columns">
    <form method="POST" action="#">
      {% csrf_token %}
      <!-- Hidden button is default when ENTER key is pressed -->
      <!-- see http://stackoverflow.com/questions/1963245/    -->
      <input type="submit" name="close" value="Close" style="display:none;" />

      <div class="row">
        {% for field in fields %}
        {% include field.field_render_label_view %}
        {% endfor %}
      </div>

      <div class="row">
        <div class="medium-2 columns show-for-medium-up">
          <div class="row">
            <div class="small-12 columns">
              &nbsp;
            </div>
          </div>
        </div>
        <div class="small-4 columns">
          <div class="row">
            <div class="form-buttons small-12 columns">
              <input type="submit" name="edit"             value="Edit" />
              <input type="submit" name="copy"             value="Copy" />
              <input type="submit" name="close"            value="Close" />
            </div>
          </div>
        </div>
        <div class="small-6 columns">
          <div class="row">
            <div class="form-buttons small-12 columns text-right">
              &nbsp;
              {% if auth_config and edit_view_button and edit_view_button != "no" %}
              <input type="submit" name="open_view"        value="View description" />
              {% endif %}
            </div>
          </div>
        </div>
      </div>

      <hr />

      <div class="row">
        {% with field=view_choices %}
        {% include field.field_render_label_edit %}
        {% endwith %} 
      </div>

      <input type="hidden" name="orig_id"          value="{{orig_id}}" />
      <input type="hidden" name="orig_type"        value="{{orig_type}}" />
      <input type="hidden" name="action"           value="{{action}}" />
      <input type="hidden" name="view_id"          value="{{view_id}}" />
      <input type="hidden" name="continuation_url" value="{{continuation_url}}" />
    </form>
  </div>
</div>

{% endblock %}
