Skip to content

Commit

Permalink
Merge pull request #464 from caciviclab/two-year
Browse files Browse the repository at this point in the history
Adhoc Fix #461 - we need something more general.
  • Loading branch information
mikeubell authored Oct 22, 2023
2 parents 738b670 + cab77c6 commit 9df1cbc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _includes/ballot-nav.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{% assign locality = include.locality %}
{% assign tabIndxVar = 4 %}
{% assign election_year = ballot.election | slice: 0, 4 %}
{% comment %}
Temporarly display the 2023 special and 2024 general election.
We should have a way of specifying exactly which elections to display.
{% endcomment %}
{% assign next_year = election_year | plus:1 %}
{% assign path_end = page.url | split: "/" | last %}
{% assign ballots = site.elections | where: 'locality', locality.locality_id | where_exp: 'ballot', 'ballot.title contains election_year' %}
{% assign next = site.elections | where: 'locality', locality.locality_id | where_exp: 'ballot', 'ballot.title contains next_year' %}
{% assign ballots = next | concat: ballots %}

<nav class="ballot-nav">
<h3 class="ballot-nav__locality-heading">{{ locality.name | escape }}</h3>
Expand Down

0 comments on commit 9df1cbc

Please sign in to comment.