{% extends "admin/change_list.html" %}
{% load adminmedia i18n %}

{% block breadcrumbs %}
{% if not is_popup %}
    <div class="breadcrumbs">
        <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
        <a href="../../../">{{ opts.app_label|capfirst }}</a> &rsaquo;
        <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
        <a href="../">{{ event }}</a> &rsaquo;
        Occurrences
   </div>
{% endif %}
{% endblock %}

{% block content %}

<h3 style="margin-bottom:20px;">{{ event }}: {{ period.start|date:"F Y" }}</h3>

<div class="module" id="changelist">
	<div class="changelist-content">
        <form action="" method="post">
		<div class="result-list-container">
			<!--div class="actions">
			    <label><select name="action">
			<option value="" selected="selected">---------</option>
			<option value="delete_selected">Revert selected occurrences to master event info</option>
			</select></label>
			</div>-->
			<div class="result-list">
			    <table cellspacing="0">
			        <thead>
			            <tr>
			                <th class="sorted ascending">
			                <a href="?ot=desc&amp;o=1">
			                Date
			                </a></th>
			                <th><a href="?ot=desc&amp;o=2">Weekday</a></th>
			                <th><a href="?ot=desc&amp;o=3">Time</a></th>
			                <th><a href="?ot=desc&amp;o=4">Altered?</a></th>
			                <th><a href="?ot=desc&amp;o=5">Original day/time</a></th>
			                <th><a href="?ot=desc&amp;o=6">Varied event info</a></th>
			            </tr>
			        </thead>
			        <tbody>
          			{% for occ in occurrences %}
                  <tr class="{% cycle 'row1' 'row2' %}">
                  {% if occ.id %}
                  <th><a href="{{ occ_change_url }}/{{ occ.id }}">{{ occ.start|date:"jS" }}</a></th><td>{{ occ.start|date:"l" }}</td><td>{{ occ.unvaried_start|date:"P" }}</td><td><img src="{% admin_media_prefix %}img/admin/icon-yes.gif" alt="True" /></td><td>{{ occ.unvaried_range_string }}</td><td>{{ occ.varied_event }}</td>
                  {% else %}  
                  <th><a href="../create_exception/{{ occ.generator.id }}/{{ occ.start.year }}-{{ occ.start.month }}-{{ occ.start.day }}/{{ occ.start.hour }}-{{ occ.start.minute }}-{{ occ.start.second }}/">{{ occ.start|date:"jS" }}</a></th><td>{{ occ.start|date:"l" }}</td><td>{{ occ.start|date:"P" }}</td><td><img src="{% admin_media_prefix %}img/admin/icon-no.gif" alt="False" /></td><td></td><td>{{ occ.varied_event }}</td>
                  {% endif %}
                  </tr>
          			{% endfor %}			        
					</tbody>
				</table>
			</div>
<p class="paginator">{% if hasprev %}<a href="?year={{ period.prev.start.year }}&amp;month={{ period.prev.start.month }}"> {{ period.prev }} {{ period.prev.start.year }}</a>{% endif %} <span class="this-page">{{ period.start|date:"F Y" }}</span> {% if hasnext %}<a href="?year={{ period.next.start.year }}&amp;month={{ period.next.start.month }}">{{ period.next }} {{ period.next.start.year }}</a>{% endif %}</p>
		</div>
		</form>
	</div>
</div>
{% endblock %}
