<%inherit file="/layouts/main.mako"/>
<%!
    from datetime import datetime, date, timedelta
    import re

    import sickrage
    from core.common import SKIPPED, WANTED, UNAIRED, ARCHIVED, IGNORED, SNATCHED, SNATCHED_PROPER, SNATCHED_BEST, FAILED
    from core.common import Quality, qualityPresets, qualityPresetStrings
    from core.helpers import anon_url, srdatetime
%>
<%block name="scripts">
<script type="text/javascript" src="${srRoot}/js/new/addTrendingShow.js?${srPID}"></script>
<script type="text/javascript" src="${srRoot}/js/rootDirs.js?${srPID}"></script>
<script type="text/javascript" src="${srRoot}/js/plotTooltip.js?${srPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/home_trendingShows.js"></script>
</%block>
<%block name="content">
% if not header is UNDEFINED:
    <h1 class="header">${header}</h1>
% else:
    <h1 class="title">${title}</h1>
% endif

<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Manage Directories</a></li>
        <li><a href="#tabs-2">Customize Options</a></li>
    </ul>
    <div id="tabs-1" class="existingtabs">
        <%include file="/inc_rootDirs.mako"/>
    </div>
    <div id="tabs-2" class="existingtabs">
        <%include file="/inc_addShowOptions.mako"/>
    </div>
    <br>

    <span>Sort By:</span>
    <select id="showsort" class="form-control form-control-inline input-sm">
        <option value="name">Name</option>
        <option value="original" selected="selected">Original</option>
        <option value="votes">Votes</option>
        <option value="rating">% Rating</option>
        <option value="rating_votes">% Rating > Votes</option>
    </select>

    <span style="margin-left:12px">Sort Order:</span>
    <select id="showsortdirection" class="form-control form-control-inline input-sm">
        <option value="asc" selected="selected">Asc</option>
        <option value="desc">Desc</option>
    </select>
</div>

<br>
<div id="trendingShows"></div>
<br>
</%block>
