{% set is_popup = request.GET.get('popup', false) %}
{% if not is_popup %}
    {% extends "demos/base.html" %}
{% else %}
    {% extends "demos/base_popup.html" %}
{% endif %}

{% block pageid %}{% endblock %}
{% block bodyclass %}section-demos{% endblock %}
{% block title %}{{ page_title(_('{subtitle} | Demo Studio') | f(subtitle=submission.title)) }}{% endblock %}

{% block content %}

{% if not is_popup %}
  <section id="nav-toolbar">
    <div class="wrap">

      <nav class="crumbs">
        <ol role="navigation">
            <li><a href="{{ url('home') }}">{{_('MDN')}}</a></li>
            <li><a href="{{ url('demos') }}">{{_('Demo Studio')}}</a></li>
            <li><a href="{{ submission.get_absolute_url() }}">{{submission.title}}</a></li>
        </ol>
      </nav>
      
      <p class="demo-submit"><a href="{{ url('demos_submit') }}" class="button">{{_('Submit a Demo')}}</a></p>
    </div>
  </section>
{% endif %}

<section id="content">
<div class="wrap">

  <section id="content-main" role="main" class="full">
  
    <section id="delete-confirm">
    
        <h2>{{_('Remove this demo?')}}</h2>

        {% trans demo_title=submission.title | e %}
            <p>You are about to remove <strong>{{ demo_title }}</strong> from the Demo Studio.</p>
            <p>The Demo's listing, source code, and statistics will be <strong>deleted</strong>.</p>
            <p>This action <strong>cannot be undone</strong>.
        {% endtrans %}

        <form id="demo-remove" method="post" target="_top" action="{{ url('demos_delete', slug=submission.slug) }}">
            {{ csrf() }}

            {% trans cancelUrl=submission.get_absolute_url() %}
              <button type="submit" class="remove"><span>Remove demo</span></button>
              or <a class="closeModal" href="{{ cancelUrl }}">Cancel</a>
            {% endtrans %}

        </form>

    </section>
  </section>

</div>
</section>

{% endblock %}
