<%@ taglib prefix="r" uri="/WEB-INF/tags/results/" %>

<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>

<%@ taglib prefix="c" uri="/WEB-INF/common" %>

<%@ attribute name="schedule" deferredValue="true" required="true" %>

<f:loadBundle var="bundle" basename="tvark.Resources"/>

<c:copy source="#{schedule}" target="#{requestScope.schedule}" />

<t:dataTable value="#{scheduleBean.lessonNumbers[schedule]}" var="index" styleClass="resultsTable">

    <t:column>
        <f:facet name="header">
            <h:outputText value="&nbsp;" escape="false" />
        </f:facet>
        <h:outputText value="#{index + 1}" />
    </t:column>

    <r:schedule-column day="#{0}" schedule="#{schedule}" />
    <r:schedule-column day="#{1}" schedule="#{schedule}" />
    <r:schedule-column day="#{2}" schedule="#{schedule}" />
    <r:schedule-column day="#{3}" schedule="#{schedule}" />
    <r:schedule-column day="#{4}" schedule="#{schedule}" />
</t:dataTable>
