{| extend("../base.html") |}

{| block content |}
{| include("detail_box.html") |}
<div>
    {[ for _, chan in ipairs(ctx.channels) do ]}
    {[ if ctx.vod.sources[chan.code] then ]}
    <div class="vod-channel">{{ chan.title }}</div>
    <div class="vod-episodes">
        {[ for ep, url in ipairs(ctx.vod.sources[chan.code].urls) do ]}
        <div class="vod-episode">
            <a href="/vod/play/?id={= ctx.vod.id =}&ch={= chan.code =}&ep={= ep =}"
                title="{{ ctx.vod.title }} {{ url.title }}">{{ url.title }}</a>
        </div>
        {[ end ]}
    </div>
    {[ end ]}
    {[ end ]}
</div>
{| end block content |}
