{% extends "memberships/base.html" %}
{% load base_tags %}
{% load base_filters %}
{% load i18n %}

{% block title %}{% trans "Export Memberships - Status" %}{% endblock %}

{% block extra_head %}
{{ block.super }}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/memberships.css">
    <style>
        .display-hide{
            display: none;
        }
    </style>
{% endblock %}

{% block body %}

    {% if corp_profile %}
    <h1>{% trans "Roster Export for Corp. Membership: " %}{{ corp_profile.name }} {% trans " - Status" %}</h1>
    {% else %}
    <h1>{% trans "Membership CSV Export - Status" %}</h1>
    {% endif %}
   
    <div id="membership-export">
       
       <div id="display-content"{% if not download_ready %} class="display-hide"{% endif %}>
       <p>The export file is ready, click the download link below to download.</p>
       <div>
           <a href="{% url memberships.default_export_download identifier %}{% if corp_profile %}?cp_id={{ corp_profile.id }}{% endif %}">Download Now</a>  
       </div>
       <div>&nbsp;</div>
       <div>&nbsp;</div>
       {% if corp_profile %}
       <div>
       {% if request.user.profile.is_superuser %}
           <a href="{% url corpmembership.search %}">{% trans "Back to Corp. Memberships" %} &raquo;</a>
       {% else %}
            <a href="{% url corpmembership.mycorps %}">{% trans "Back to Corp. Memberships" %} &raquo;</a>
       {% endif %}
       </div>
        {% endif %}
       </div>
       
    </div>
    
    {% if not download_ready %}
       <p>
          Your request is being processed. Please check later by <strong>refreshing this page</strong>. <br /><br />
          In the meantime, we'll notify you via email once the export is ready. Thank you for your patience!
          
        </p>
   {% endif %}

{% endblock %}


