<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:t="http://www.participatorypolitics.org/"
      xmlns:i18n="http://www.participatoryculture.org/i18n"
      eventCookie="@@@eventCookie@@@" dtvPlatform="@@@dtvPlatform@@@">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<!-- DOWNLOADS ******************************************************** -->
<div t:updateForView="allDownloadingItems">
<div t:hideIf="allDownloadingItems.len() == 0">
<a class="main-channelbar-download" href="#" onclick="return eventURL('action:toggleDownloadsView');">
  <span class="triangle" t:hideIf="showDownloads"/>
  <span class="triangle-down" t:hideIf="not showDownloads"/>
  <span t:hideIf="allDownloadingItems.len()==1"  i18n:translate="">
      <span t:replace="allDownloadingItems.len()" i18n:name="count"/> Downloading</span>
   <span t:hideIf="allDownloadingItems.len()!=1" i18n:translate="">1 Downloading</span>
</a>
</div>
</div>

<div t:repeatForView="downloadingItems">
    <span t:replaceMarkup="this.getItemXML(viewName, view, hideChannelTitle=not isFolder)" />
</div>

<!-- / DOWNLOADS -->

<!-- NEW ITEMS -->
<a class="main-channelbar" href="#" onclick="return eventURL('action:toggleNewItemsView');" t:updateForView="matchingItems">
  <span class="triangle" t:hideIf="showNewItems"/>
  <span class="triangle-down" t:hideIf="not showNewItems"/>

  <div t:showIf="searchTerm is None">
    <div t:hideIf="isFolder" i18n:translate="">
          <span i18n:name="len" t:replace="allItems.len()" /> 
          Videos Available
    </div>
    <div t:showIf="isFolder" i18n:translate="">
          <span i18n:name="len" t:replace="allItems.len()" /> 
          Videos Available
    </div>
  </div>
  <div t:showIf="searchTerm is not None">
    <div t:showIf="allItems.len() == matchingItems.len()" i18n:translate="">
            All <span i18n:name="len" t:replace="matchingItems.len()" /> 
            Videos Match This Search
    </div>
    <div t:hideIf="allItems.len() == matchingItems.len()" i18n:translate="">
            <span i18n:name="len" t:replace="matchingItems.len()" /> 
            Videos Match This Search
    </div>
  </div>
</a>

<div t:repeatForView="newItems">
   <span t:replaceMarkup="this.getItemXML(viewName, view, hideChannelTitle=not isFolder)" />
</div>


<!-- The infamous "N more videos" oval -->
<div t:updateForView="matchingItems">  
  <div t:hideIf="allItemsMode  or not showNewItems or newItems.len() == matchingItems.len()">
      <a href="#" onclick="return eventURL('action:toggleAllItemsMode');" class="main-notification">
          <span t:hideIf="isFolder" i18n:translate=""><span i18n:name="count" t:replace="matchingItems.len() - newItems.len()" /> more videos on this channel &gt;&gt;</span>
          <span t:showIf="isFolder" i18n:translate=""><span i18n:name="count" t:replace="matchingItems.len()"/> videos in this channel folder &gt;&gt;</span>
        </a>
        <a href="#" onclick="return eventURL('action:toggleAllItemsMode');" class="main-notification-right">&nbsp;</a>
     <br clear="left" />
  </div>
</div>

<!-- / NEW ITEMS -->

<!-- WATCHABLE ******************************************************** -->
<div t:updateForView="allWatchableItems">
<a class="main-channelbar" href="#" onclick="return eventURL('action:toggleWatchableView')" t:hideIf="len(allWatchableItems) == 0" >
  <span class="triangle" t:hideIf="showWatchableItems"/>
  <span class="triangle-down" t:hideIf="not showWatchableItems"/>
  <span  i18n:translate="">Downloaded</span>
</a>
</div>

<div t:repeatForView="watchableItems">
    <span t:replaceMarkup="this.getItemXML(viewName, view, hideChannelTitle=not isFolder)" />
</div>

<!-- / WATCHABLE -->
</body>
</html>
