Skip to content

Instantly share code, notes, and snippets.

@bendog
Last active July 11, 2017 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bendog/d0dc1de359225a261aa4e34e36cd4b00 to your computer and use it in GitHub Desktop.
Save bendog/d0dc1de359225a261aa4e34e36cd4b00 to your computer and use it in GitHub Desktop.
template for selecting reports
<select id="reportFileName">
    {% for report in reports_list %}
        {% if report.year %}
            {% for year in years %}
                <option value="{{ report.id }}_{{ report.params }}_{{ year }}.html"> {{ report.name }} {{year}}</option>
                {% for month in months %}
                    <option value="{{ report.id }}_{{ report.params }}_{{ year }}_{{ month}}.html"> {{ report.name }} {{year}} {{month}}</option>
                {% end for %}
            {% end for %}
        {% else %}
            <option value="{{ report.id }}_{{ report.params }}.html"> {{ report.name }}</option>
        {% endif %}
    {% end for %}
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment