<!-- Events inside the schedule chart -->
<div id="calendarSchedule">
    <table width="{{widthTable}}%" id="scheduleBackground">
    {% for row in schedule %}
    <tr>
        <td class="hours" width="{{widthHourColumn}}%">
            {{row.hour}}
            <button dojoType="dijit.form.Button" showLabel="false" iconClass="add" class="addButton"
            onClick="dojo.publish('Calendar.openForm', [null, null, '{{date}}', '{{row.hour}}']);">
            </button> &nbsp;
        </td>
        {% ifequal row.even true %}
        <td class="emptyCellEven">
        </td>
        {% else %}
        <td class="emptyCellOdd">
        </td>
        {% endifequal %}
    </tr>
    {% endfor %}
    </table>
</div>
<div id="eventsArea" style="float: left; position: absolute;">
    {% for event in events %}
    <div id="{{eventsAttr.divIdPre}}{{event.order}}" class="eventsDivMain"
    style="position: absolute; overflow: hidden;
        {% ifequal event.shown true %}
        visibility: visible;
        {% else %}
        visibility: hidden;
        {% endifequal %}
        ">
        <div id="plainDiv{{event.order}}" class="eventsDivSecond"
        style="border-width: {{eventsAttr.borderWidth}}px; cursor: pointer;"></div>
        <div dojoType="phpr.Calendar.ResizeHandle" resizeAxis="y" activeResize="true" targetId="plainDiv{{event.order}}"
        id="eventResize{{event.order}}"
        style="bottom: 0; width: 100%; position: absolute;"></div>
    </div>
    {% endfor %}
</div>

<!-- Events outside the schedule chart -->
{% if furtherEvents.show %}
<br />
    {{furtherEventsMessage}}:<br />
    {% for event in furtherEvents.events %}
{{event.time|safe}}:&nbsp;
<a href="javascript: dojo.publish('Calendar.setUrlHash', ['Calendar', {{event.id}}]);">{{event.title|safe}}</a>
<br />
    {% endfor %}
{% endif %}
