{% load staticfiles i18n %}

<span class="actions">
{% if edit_event %}
<span class="edit">
{% if occurrence.event.rule %}
    {% if occurrence.id %}
        <a href="#" onclick="openURL('{{ edit_occurrence }}?next={{ here }}', event);">
            <img border="0" src="{% static "schedule/img/pencil.png" %}" alt="{% trans "Edit Event" %}">
        </a>
    {% else %}
        <a href="#" onclick="openEditDialog(this, '{{ edit_occurrence }}?next={{ here }}', '{{ edit_event }}?next={{ here }}', event);">
            <img border="0" src="{% static "schedule/img/pencil.png" %}" alt="{% trans "Edit Event" %}">
        </a>
    {% endif %}
{% else %}
    <a href="#" onclick="openURL('{{ edit_event }}?next={{ here }}', event);">
        <img border="0" src="{% static "schedule/img/pencil.png" %}" alt="{% trans "Edit Event" %}">
    </a>
{% endif %}
{% endif %}
</span>
{% if delete_event %}
<span class="delete">
{% if occurrence.event.rule %}
    {% if occurrence.id %}
        <a href="#" onclick="openURL('{{cancel_occurrence}}?next={{here}}', event);">
            <img border="0" src="{% static "schedule/img/delete.png" %}" alt="{% trans "Delete Event" %}">
        </a>
    {% else %}
        <a href="#" onclick="openCancelDialog(this, '{{ cancel_occurrence }}?next={{here}}', '{{delete_event}}?next={{here}}', event);">
            <img border="0" src="{% static "schedule/img/delete.png" %}" alt="{% trans "Delete Event" %}">
        </a>
    {% endif %}
{% else %}
<a href="#" onclick="openURL('{{delete_event}}?next={{here}}', event);">
    <img border="0" src="{% static "schedule/img/delete.png" %}" alt="{% trans "Delete Event" %}">
</a>
{% endif %}
{% endif %}
</span>
</span>
