{% extends "admin/change_form.html" %}

{% block content_title %}
  {% if change and 'advanced' in request.GET %}
    <h1>{{ title }} &mdash; zaawansowane</h1>
  {% else %}
    {{ block.super }}
  {% endif %}
{% endblock %}


{# add an "Advanced" button to tools #}

{% block extrastyle %}
  {% if change and not is_popup %}
    {{ block.super }}
    <style>
      .object-tools {margin-bottom:0; margin-top:0;}
      .advancedlink {text-transform: capitalize;}
    </style>
  {% else %}
    {{ block.super }}
  {% endif %}
{% endblock %}

{% block object-tools %}
  {% if change and not is_popup %}
    <div style='margin-bottom: -2em; margin-top: -2.4em; float:right; '>
      {{ block.super }}
      <ul class="object-tools">
        <li>
          {% if 'advanced' in request.GET %}
            <a href="." class="advancedlink">uproszczony</a>
          {% else %}
            <a href="?advanced" class="advancedlink">zaawansowany</a>
          {% endif %}
        </li>
      </ul>
    </div>
  {% else %}
    {{ block.super }}
  {% endif %}
{% endblock %}
