{% extends "corporate_memberships/base.html" %}
{% load corporate_memberships_tags %}
{% load i18n %}

{% block title %}Corporate Membership{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/corporate_memberships.css">
{% endblock %}

{% block body %}
<div class="t">
    {% corpmemb_nav request.user %}
    <div class="corp-index">
        <h1>{% trans "Corporate Memberships" %}</h1>
         <h2>{% trans "Applications:" %}</h2>
         {% if corp_app %}
            <ol>
                <li>
                    <a href="{% url corpmembership_app.preview corp_app.slug %}">{{ corp_app.name }}</a> 
                    (<a href="{% url admin:corporate_memberships_corpmembershipapp_change corp_app.id %}">{% trans "Edit" %}</a>)
                   
                    
                    <h2>{% trans "Types:" %}</h2>
                    <table width="90%">
                    <tr>
                        <td class="header" width="50%">{% trans "Corporate Member Type" %}</td>
                        <td class="header" width="50%">{% trans "Individual Member Type" %}</td>
                    </tr>
                    {% for cm_type in corp_app.corp_memb_type.all %}
                        <tr>
                        <td><a href="{% url admin:corporate_memberships_corporatemembershiptype_change cm_type.id %}">{{ cm_type.name }}</a></td>
                        <td><a href="{% url admin:memberships_membershiptype_change cm_type.membership_type.id %}">{{ cm_type.membership_type.name }}</a></td>
                        
                        </tr>
                    {% endfor %}
                    </table>
                    <br />
                
                </li>
                
            </ol>
            
            <h2>{% trans "Other links:" %}</h2>
            <ol>
            <li><a href="{% url corpmembership.search %}">{% trans "Search Corporate Memberships" %}</a></li>
            </ol>
         {% else %}
            {% trans "No active applications available. " %}<a href="{% url admin:corporate_memberships_corpmembershipapp_add %}">{% trans "Add one" %}</a>.
         {% endif %}
    </div>
</div>
{% endblock %}
