{% extends "mobile/base.html" %}

{% block left_button %}
  <a class="search" href="{{ url_for('sickbeard_search') }}">+</a>
{% endblock %}

{% block header %}<h1>Search TV</h1>{% endblock %}

{% block navbar %}
<div data-role="navbar">
    <ul>
        <li><a href="{{ url_for('sickbeard') }}">Wanted</a></li>
        <li><a href="{{ url_for('sickbeard_all') }}">All</a></li>
        <li><a href="{{ url_for('sickbeard_history') }}">History</a></li>
    </ul>
</div>
{% endblock %}

{% block content %}
<div id="sickbeard">
    <input type="search" id="search" placeholder="Show title" value="{% if not query == None %}{{ query }}{% endif %}"/>
    <br><br>
    {% if results %}
        <ul id="results" data-role="listview">
        {% for item in results %}
            <li data-id="{{item.tvdbid}}">
                <h2>{{item.name}}</h2>
                <small>
                    {{item.first_aired}}
                </small>
            </li>
        {% endfor %}
        </ul>
    {% endif %}
</div>
{% endblock %}