{% load i18n %}
{% load sysscope_tags %}

<div id="timeframe_browser_nav">

    <form id="timeframe-browser-form" action="" method="post">{% csrf_token %}
    
        <input type="hidden" name="current_start" value="{{ current_start }}" />
        
        <label for="submit_backward" class="">{% trans 'Browse historical data using the selected timeframe' %}:</label>
        <input id="submit_backward" type="submit" name="backward" value="&laquo;" />
        
        <select id="id_selected_timeframe" name="selected_timeframe">
            <option value=''>Select Period</option>
            {% for timeframe in timeframe_list %}
                {% if timeframe == current_timeframe %}
                    <option value="{{ timeframe }}" selected>{{ timeframe|friendlytime }}</option>
                {% else %}
                    <option value="{{ timeframe }}">{{ timeframe|friendlytime }}</option>
                {% endif %}
            {% endfor %}
        </select>
        
        <input id="submit_forward" type="submit" name="forward" value="&raquo;" />
        
    </form>
    
</div>