election_day.layouts.vote

Classes

VoteLayout

A common base layout for election and votes which caches some values

Module Contents

class election_day.layouts.vote.VoteLayout(model: onegov.election_day.models.Vote, request: onegov.election_day.request.ElectionDayRequest, tab: str = 'entities')[source]

Bases: onegov.election_day.layouts.detail.DetailLayout

A common base layout for election and votes which caches some values used in the macros.

model: onegov.election_day.models.Vote[source]
tab[source]
tabs_with_embedded_tables = ('entities', 'districts', 'statistics', 'proposal-entities', 'proposal-districts',...[source]
property all_tabs: tuple[str, Ellipsis][source]

Return all tabs. Ordering is important for the main view.

title(tab: str | None = None) str[source]
subtitle(tab: str | None = None) str[source]
tab_visible(tab: str | None) bool[source]
label(value: str) str[source]
property visible: bool[source]
property type: str[source]
property scope: str | None[source]
property ballot: onegov.election_day.models.Ballot[source]
property summarize: bool[source]
property main_view: str[source]
property answer: str | None[source]
property direct: bool[source]
property menu: election_day.layouts.election.NestedMenu[source]
property pdf_path: str | None[source]

Returns the path to the PDF file or None, if it is not available.

property svg_prefix: str[source]
property svg_path: str | None[source]

Returns the path to the SVG file or None, if it is not available.

Returns a link to the SVG download view.

property svg_name: str[source]

Returns a nice to read SVG filename.