{# rows=N caps the table at N rows behind a "Show all"; filter="placeholder" adds a filter box (app.js). #} {% macro table(rows, cols, links={}, cap=0, filter="") -%} {% if rows %}
| {{ LABELS.get(c) or (c|replace("_", " ")|capitalize) }} | {% endfor %}
|---|
| 24 %} class="wrap"{% endif %}>{% if c in links and r.get(links[c][1]) is not none %}{{ v|fmt(c) }}{% else %}{{ v|fmt(c) }}{% endif %} | {% endfor %}
{{ msg }}
{% endmacro %} {% macro csrf() %}{% endmacro %} {# A one-line result of the last action (msg=... in the query string): green, or red for "Error: ...". #} {% macro flash(msg) %}{% if msg %}{{ msg }}
{% endif %}{% endmacro %} {# The page's title row: h1, an optional one-line subtitle, and (via call) actions on the right. #} {% macro page_head(title, sub="") %}{{ sub }}
{% endif %}.toml [sources]), the price venues shown, and the model run behind the fair values
(racinglines/attribution.py note). sport: a sport or competition code, or a list; venues: codes, names or Venue objects. #}
{% macro source_note(sport=none, venues=none, run=none, as_of=none, model=false, sportsbook=false) -%}
{%- if sources_note is defined %}{% set n = sources_note(sport, venues, run, as_of, model, sportsbook) -%}
{%- if n.parts %}Sources: {% for p in n.parts %}{{ p.label }}: {% for i in p.entries %}{% if i.url %}{{ i.name }}{% else %}{{ i.name }}{% endif %}{{ ", " if not loop.last }}{% endfor %}{{ " · " if not loop.last }}{% endfor %}
{% endif %}{% endif %}
{%- endmacro %}