{% extends "base.html" %}

{% load i18n content_tags action_tags block_tags media_tags map_tags %}

{% block metatags %}
  {{ block.super }}
  {% if section %}
    <meta name="section" content="{{ section }}" />
  {% endif %}
{% endblock %}

{% block extrahead %}
  {% if content %}{% google_map_media content=content %}{% endif %}
{% endblock %}

{% block cssstyles %}
    {{ block.super }}
    <style type="text/css">
        {% include "section/inc.customstyle.html" %}
    </style>
{% endblock %}

{% block extrabreadcrumbs %}
  {% block beforecontentbreadcrumbs %}
  {% endblock %}

  {% block contentbreadcrumbs %}
    {% if section %}
      <span class="breadcrumbSeparator">→</span>
      <a href="{{ section.get_absolute_url }}" title="{{ section }}">{% cutrender %}{{ section }}{% endcutrender %}</a>
    {% endif %}
    <span class="breadcrumbSeparator">→</span>
    <a href="." title="{{ content }}">{% cutrender %}{{ content }}{% endcutrender %}</a>
  {% endblock %}
  {% block aftercontentbreadcrumbs %}
  {% endblock %}
{% endblock %}

{% block leftsidebar %}
  {{ block.super }}
{% endblock %}

{% block rightsidebar %}
  {{ block.super }}
{% endblock %}

{% block extrarightsidebarblocks %}
  {% render_blocks "rightsidebar" for content %}
  {% if section %}
    {% render_blocks "rightsidebar" for section %}
  {% endif %}
  {% block extracontentrightsidebar %}
  {% endblock %}
{% endblock %}

{% block content %}

  {% block contenttitle %}
    <div id="content-title" class="{{ content.class_name }}">
      <h1 title="{{ content.name }}">{% cutrender %}{{ content }}{% endcutrender %}</h1>
    </div>
  {% endblock %}

  {% block contentactions %}
    <ul id="content-actions">
    {% get_actions "content" for content as content_actions %}
    {% for action in content_actions %}
      {% action_url action content as action_link %}
      {% if action_link %}
      <li id="action-{{ action.name }}">
        <a href="{{ action_link }}"><span>{% trans action.verbose_name %}</span></a>
      </li>
      {% endif %}
    {% endfor %}
    {% content_admin_action content %}
    </ul>
    <div class="visualClear"></div>
  {% endblock %}

  {% block contentzone %}
  <div id="content-zone">
    {% block beforecontentblocks %}
      {% render_blocks "beforecontent" for content %}
      {% if section %}
          {% render_blocks "beforecontent" for section %}
      {% endif %}
      {% block extrabeforecontentblocks %}
      {% endblock %}
    {% endblock %}

    {% block beforecontentbody %}

      {% block contentmedia %}
        {% media_slide content %}
      {% endblock %}

      {% block contentdescription %}
        {% if content.description %}
          <div class="contentDescription">{{ content.description|safe }}</div>
        {% endif %}
      {% endblock %}

      {% block contentfiles %}
        {% media_files content %}
      {% endblock %}

    {% endblock beforecontentbody %}

    {% block contentbody %}
      {# to fill in for inherited templates #}
    {% endblock %}

    {% block aftercontentbody %}
    {% endblock %}

    {% block contentmap %}
       {% if content %}{% google_map content=content %}{% endif %}
    {% endblock %}

    {% block aftercontentmap %}
    {% endblock %}

    {% block aftercontentblocks %}
      {% render_blocks "aftercontent" for content %}
      {% if section %}
          {% render_blocks "aftercontent" for section %}
      {% endif %}
      {% block extraaftercontentblocks %}
      {% endblock %}
    {% endblock %}
  </div>
  {% endblock %}
{% endblock %}
