bgneal@1: {% extends 'band/base.html' %}
bgneal@1: {% block title %}The Madeira | Shows{% endblock %}
bgneal@1: {% block custom_css %}
bgneal@1: <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/thickbox.css" />
bgneal@1: {% endblock %}
bgneal@1: {% block custom_js %}
bgneal@1: <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></script>
bgneal@1: <script type="text/javascript" src="{{ MEDIA_URL }}js/thickbox.js"></script>
bgneal@1: {% endblock %}
bgneal@1: {% block content %}
bgneal@1: <h1>Show Dates</h1>
bgneal@1: 
bgneal@1: <h2>Upcoming Shows</h2>
bgneal@1: {% if upcoming %}
bgneal@1:    {% for show in upcoming %}
bgneal@1:       <p style="clear:both">
bgneal@1:       {% if show.flyer %}
bgneal@1:          <a href="{{ show.flyer.image.url }}" class="thickbox" rel="madeira-gallery">
bgneal@12:             <!-- <img style="float:left; margin-right:5px; margin-bottom:1em" src="{{ show.flyer.get_thumbnail_url }}" -->
bgneal@12:             <img class="left" src="{{ show.flyer.get_thumbnail_url }}" 
bgneal@1:                alt="{{ show.flyer.caption }}" title="{{ show.flyer.caption }}" /></a>
bgneal@1:       {% endif %}
bgneal@1:       <strong>{{ show.date|date:"F d, Y" }}</strong>
bgneal@1:       {% if show.time %}{{ show.time|time:"h:i A" }}{% endif %}<br />
bgneal@1: 
bgneal@1:       {% if show.title and show.url %}
bgneal@1:          <a href="{{ show.url }}" target="_blank">{{ show.title }}</a><br />
bgneal@1:       {% else %}
bgneal@1:          {% if show.title %}
bgneal@1:             {{ show.title }}<br />
bgneal@1:          {% endif %}
bgneal@1:       {% endif %}
bgneal@1: 
bgneal@1:       {% if show.venue %}
bgneal@1:          {% if show.venue.url %}
bgneal@1:             <a href="{{ show.venue.url }}" target="_blank">{{ show.venue.name }}</a>,
bgneal@1:          {% else %}
bgneal@1:             {{ show.venue }},
bgneal@1:          {% endif %}
bgneal@1:          {% if show.venue.address %}
bgneal@1:             {{ show.venue.address }}, 
bgneal@1:          {% endif %}
bgneal@1:          {% if show.venue.city.state %}
bgneal@1:             {{ show.venue.city.name }}, {{ show.venue.city.state.name }}
bgneal@1:          {% else %}
bgneal@1:             {{ show.venue.city.name }}
bgneal@1:          {% endif %}
bgneal@5:          {% ifnotequal show.venue.city.country.name "USA" %}
bgneal@5:             {{ show.venue.city.country.name }}
bgneal@5:          {% endifnotequal %}
bgneal@1:          <br />
bgneal@1:          {% if show.venue.phone %}
bgneal@1:             {{ show.venue.phone }}
bgneal@1:             <br />
bgneal@1:          {% endif %}
bgneal@1:       {% endif %}
bgneal@1: 
bgneal@1:       {% if show.bands.all %}
bgneal@1:          With:
bgneal@1:          {% for band in show.bands.all %}
bgneal@1:             {% if band.url %}
bgneal@1:                <a href="{{ band.url }}" target="_blank">{{ band.name }}</a>
bgneal@1:             {% else %}
bgneal@1:                {{ band.name }}
bgneal@1:             {% endif %}
bgneal@1:             {% if not forloop.last %}
bgneal@1:                &bull;
bgneal@1:             {% endif %}
bgneal@1:          {% endfor %}
bgneal@1:          <br />
bgneal@1:       {% endif %}
bgneal@1: 
bgneal@1:       {% if show.notes %}
bgneal@1:          {{ show.notes|safe }}
bgneal@1:       {% endif %}
bgneal@1:       </p>
bgneal@1:    {% endfor %}
bgneal@1: {% else %}
bgneal@1: None at this time.
bgneal@1: {% endif %}
bgneal@1: <br clear="all" />
bgneal@1: 
bgneal@1: {% if flyerGigs %}
bgneal@1: <div class="thumb-box">
bgneal@1:    <h2>Flyers</h2>
bgneal@12:    <center>
bgneal@1:    {% for gig in flyerGigs %}
bgneal@1:       <table class="image-table">
bgneal@1:          <caption>{{ gig.venue.name}}, {{ gig.date|date:"F 'y" }}</caption>
bgneal@1:          <tr><td>
bgneal@1:          <a href="{{ gig.flyer.image.url }}" class="thickbox" rel="madeira-gallery">
bgneal@1:             <img src="{{ gig.flyer.get_thumbnail_url }}" alt="{{ gig.date|date:"F d, Y" }}" title="{{ gig.date|date:"F d, Y" }}" /></a>
bgneal@1:          </td></tr>
bgneal@1:       </table>
bgneal@1:    {% endfor %}
bgneal@12:    </center>
bgneal@1:    <div clear="all"></div>
bgneal@1:    <center><p>To see all our flyers in full size, check out our <a href="{% url band.views.flyers %}">show flyer gallery</a>.</p></center>
bgneal@1: </div>
bgneal@1: {% endif %}
bgneal@1: 
bgneal@1: {% if previous %}
bgneal@1:    <h2>Previous Shows</h2>
bgneal@1:    <center>
bgneal@1:    <table border="0" cellpadding="3" cellspacing="3" width="95%">
bgneal@1:    <tr><th width="20%" align="center">Date</th><th width="40%" align="center">Venue</th><th width="40%" align="center">Bands</th></tr>
bgneal@1:    {% for show in previous %}
bgneal@1:       <tr>
bgneal@1:          <td width="20%">{{ show.date|date:"M d, Y" }}</td>
bgneal@1:          <td width="40%">
bgneal@1:             {% if show.title and show.url %}
bgneal@1:                <a href="{{ show.url }}" target="_blank">{{ show.title }}</a>,
bgneal@1:             {% else %}
bgneal@1:                {% if show.title %}
bgneal@1:                   {{ show.title }},
bgneal@1:                {% endif %}
bgneal@1:             {% endif %}
bgneal@1:             {% if show.venue.url %}
bgneal@1:                <a href="{{ show.venue.url }}" target="_blank">{{ show.venue.name }}</a>,
bgneal@1:             {% else %}
bgneal@1:                {{ show.venue.name }},
bgneal@1:             {% endif %}
bgneal@1:             {{ show.venue.city.name }}, {{ show.venue.city.state.abbrev }}
bgneal@5:             {% ifnotequal show.venue.city.country.name "USA" %}
bgneal@5:                {{ show.venue.city.country.name }}
bgneal@5:             {% endifnotequal %}
bgneal@1:          </td>
bgneal@1:          <td width="40%">
bgneal@1:             {% for band in show.bands.all %}
bgneal@1:                {% if band.url %}
bgneal@1:                   <a href="{{ band.url }}" target="_blank">{{ band.name }}</a>
bgneal@1:                {% else %}
bgneal@1:                   {{ band.name }}
bgneal@1:                {% endif %}
bgneal@1:                {% if not forloop.last %}
bgneal@1:                   &bull;
bgneal@1:                {% endif %}
bgneal@1:             {% endfor %}
bgneal@1:          </td>
bgneal@1:       </tr>
bgneal@1:    {% endfor %}
bgneal@1:    </table>
bgneal@1:    </center>
bgneal@1: {% endif %}
bgneal@1: 
bgneal@1: {% if stats %}
bgneal@1: <h2>Past Show Statistics</h2>
bgneal@1: <table border="0" cellpadding="3" cellspacing="3">
bgneal@1:    <tr><th align="left">Number of shows:</th><td>{{ stats.count }}</td></tr>
bgneal@1:    <tr><th align="left">Number of unique venues:</th><td>{{ stats.venues }}</td></tr>
bgneal@1:    <tr><th align="left">Number of unique cities:</th><td>{{ stats.cities }}</td></tr>
bgneal@1:    <tr><th align="left">Number of unique states:</th><td>{{ stats.states }}</td></tr>
bgneal@5:    <tr><th align="left">Number of unique countries:</th><td>{{ stats.countries }}</td></tr>
bgneal@1:    <tr><th align="left">Number of unique bands:</th><td>{{ stats.bands }}</td></tr>
bgneal@1: </table>
bgneal@1: {% endif %}
bgneal@1: 
bgneal@1: {% endblock %}