1<div class="controls">
2
3    {% if period != 'range' %}
4    <div>
5        {{ 'Insights_ControlComparedToDescription'|translate }}
6
7        {% if period == 'day' %}
8            <div class="row">
9                <div class="col s12 m6 l4 input-field">
10                    <select size="1" name="comparedToXPeriodsAgo">
11                        <option value="1" {% if properties.compared_to_x_periods_ago == 1 %}selected{% endif %}>{{ 'Insights_DayComparedToPreviousDay'|translate }}</option>
12                        <option value="7" {% if properties.compared_to_x_periods_ago == 7 %}selected{% endif %}>{{ 'Insights_DayComparedToPreviousWeek'|translate }}</option>
13                        <option value="365" {% if properties.compared_to_x_periods_ago == 365 %}selected{% endif %}>{{ 'Insights_DayComparedToPreviousYear'|translate }}</option>
14                    </select>
15                </div>
16            </div>
17        {% elseif period == 'month' %}
18            <div class="row">
19                <div class="col s12 m6 l4 input-field">
20                    <select size="1" name="comparedToXPeriodsAgo">
21                        <option value="1" {% if properties.compared_to_x_periods_ago == 1 %}selected{% endif %}>{{ 'Insights_MonthComparedToPreviousMonth'|translate }}</option>
22                        <option value="12" {% if properties.compared_to_x_periods_ago == 12 %}selected{% endif %}>{{ 'Insights_MonthComparedToPreviousYear'|translate }}</option>
23                    </select>
24                </div>
25            </div>
26        {% elseif period == 'week' %}
27            {{ 'Insights_WeekComparedToPreviousWeek'|translate }}
28        {% elseif period == 'year' %}
29            {{ 'Insights_YearComparedToPreviousYear'|translate }}
30        {% endif %}
31    </div>
32    {% endif %}
33
34    <div>
35        {{ 'Insights_Filter'|translate }}
36
37        <div class="row">
38            <div class="col s12 m4 l4 input-field">
39                <select size="1" name="filterBy" title="{{ 'Insights_ControlFilterByDescription'|translate|e('html_attr') }}">
40                    <option {% if not properties.filter_by %}selected{% endif %} value="all">{{ 'General_All'|translate }}</option>
41                    <option {% if properties.filter_by == 'movers' %}selected{% endif %} value="movers">{{ 'Insights_FilterOnlyMovers'|translate }}</option>
42                    <option {% if properties.filter_by == 'new' %}selected{% endif %} value="new">{{ 'Insights_FilterOnlyNew'|translate }}</option>
43                    <option {% if properties.filter_by == 'disappeared' %}selected{% endif %} value="disappeared">{{ 'Insights_FilterOnlyDisappeared'|translate }}</option>
44                </select>
45            </div>
46
47            <div class="col s12 m6 l4 input-field">
48                <select size="1" name="showIncreaseOrDecrease" title="Show increaser and/or decreaser">
49                    <option value="both" {% if properties.limit_increaser and properties.limit_decreaser %}selected{%endif%}>{{ 'Insights_FilterIncreaserAndDecreaser'|translate }}</option>
50                    <option value="increase" {% if properties.limit_increaser and not properties.limit_decreaser %}selected{%endif%}>{{ 'Insights_FilterOnlyIncreaser'|translate }}</option>
51                    <option value="decrease" {% if not properties.limit_increaser and properties.limit_decreaser %}selected{%endif%}>{{ 'Insights_FilterOnlyDecreaser'|translate }}</option>
52                </select>
53            </div><div class="col s12 m1 l4">&nbsp;</div>
54
55        </div>
56    </div>
57</div>