Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Redesign the party strengths view
Browse files Browse the repository at this point in the history
  • Loading branch information
msom committed Mar 22, 2018
1 parent 9ee6f45 commit 1f9a61e
Show file tree
Hide file tree
Showing 25 changed files with 430 additions and 374 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
---------

- Redesign the party strengths view.
[msom]

3.2.1 (2018-03-20)
~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ and vote results on a different site:
- `{path_to_election}/lists-chart`: The lists bar chart.
- `{path_to_election}/connections-chart`: The connections sankey chart.
- `{path_to_election}/panachage-chart`: The panachage sankey chart.
- `{path_to_election}/parties-chart`: The party results bar chart.
- `{path_to_election}/party-strengths-chart`: The party results bar chart.

Make sure you serve the files with the embedding code with a web server!

Expand Down
8 changes: 4 additions & 4 deletions onegov/election_day/layouts/election.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def all_tabs(self):
'lists',
'candidates',
'connections',
'parties',
'party-strengths',
'statistics',
'panachage',
'data'
Expand All @@ -33,8 +33,8 @@ def title(self, tab=None):
return _("Candidates")
if tab == 'connections':
return _("List connections")
if tab == 'parties':
return _("Parties")
if tab == 'party-strengths':
return _("Party strengths")
if tab == 'statistics':
return _("Election statistics")
if tab == 'panachage':
Expand All @@ -61,7 +61,7 @@ def visible(self, tab=None):
not self.tacit and
self.model.list_connections.first()
)
if tab == 'parties':
if tab == 'party-strengths':
return (
self.proporz and
not self.tacit and
Expand Down
8 changes: 4 additions & 4 deletions onegov/election_day/layouts/election_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def all_tabs(self):
return (
'districts',
'candidates',
'parties',
'party-strengths',
'data'
)

Expand All @@ -27,8 +27,8 @@ def title(self, tab=None):
return self.request.app.principal.label('districts')
if tab == 'candidates':
return _("Elected candidates")
if tab == 'parties':
return _("Parties")
if tab == 'party-strengths':
return _("Party strengths")
if tab == 'data':
return _("Downloads")

Expand All @@ -37,7 +37,7 @@ def title(self, tab=None):
def visible(self, tab=None):
if not self.has_results:
return False
if tab == 'parties':
if tab == 'party-strengths':
return self.model.party_results.first()

return True
Expand Down
72 changes: 41 additions & 31 deletions onegov/election_day/locale/de_CH/LC_MESSAGES/onegov.election_day.po
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ msgstr "Listen"
msgid "Candidates"
msgstr "Kandidierende"

msgid "Parties"
msgstr "Parteien"
msgid "Party strengths"
msgstr "Parteistärken"

msgid "Panachage"
msgstr "Panaschierstatistik"
Expand Down Expand Up @@ -632,11 +632,36 @@ msgstr "Auswahl"
msgid "Columns"
msgstr "Spalten"

msgid "Embed"
msgstr "Einbetten"

msgid "Download"
msgstr "Herunterladen"

#. Default: The diagram shows the votes and mandates of the parties. The rimmed
#. bars (left scale) correspond to the number of seats, the colored bars (right
#. scale) to the voices (percentages).
#.
msgid "figcaption_party_strengths"
msgstr ""
"Das Diagramm zeigt die gewonnen Stimmen und Sitze der Parteien. Die "
"umrandeten Balken (linke Skala) entsprechen den Anzahl Sitzen, die "
"eingefärbten Balken (rechte Skala) den Stimmanteilen in Prozent."

msgid "Year"
msgstr "Jahr"

msgid "Party"
msgstr "Partei"

#. Default: Votes
#.
msgid "single_votes"
msgstr "Stimmen"

msgid "Difference"
msgstr "Differenz"

msgid "View all details online"
msgstr "Alle Details online ansehen"

Expand Down Expand Up @@ -680,18 +705,9 @@ msgstr "Bitte verwenden Sie das folgende Format:"
msgid "No map available for this year."
msgstr "Keine Karte für dieses Jahr verfügbar."

msgid "Embed"
msgstr "Einbetten"

msgid "Download"
msgstr "Herunterladen"

msgid "Candidate"
msgstr "Kandidierende"

msgid "Party"
msgstr "Partei"

msgid "List"
msgstr "Liste"

Expand Down Expand Up @@ -753,19 +769,6 @@ msgstr ""
"Listenstimmen. Die Breite der Balken und der Verbindungen ist proportional "
"zu den Stimmen."

#. Default: The diagram shows the votes and mandates of the parties. The rimmed
#. bars (left scale) correspond to the number of seats, the colored bars (right
#. scale) to the voices (percentages).
#.
msgid "figcaption_parties"
msgstr ""
"Das Diagramm zeigt die gewonnen Stimmen und Sitze der Parteien. Die "
"umrandeten Balken (linke Skala) entsprechen den Anzahl Sitzen, die "
"eingefärbten Balken (rechte Skala) den Stimmanteilen in Prozent."

msgid "Difference"
msgstr "Differenz"

msgid "Accounted Ballots"
msgstr "Gültige Wahlzettel"

Expand Down Expand Up @@ -820,14 +823,14 @@ msgstr "Titel"
msgid "View"
msgstr "Anzeigen"

msgid "New election"
msgstr "Neue Wahl"
msgid "Upload party results"
msgstr "Parteiresultate hochladen"

msgid "Clear results"
msgstr "Resultate löschen"

msgid "Upload party results"
msgstr "Parteiresultate hochladen"
msgid "New election"
msgstr "Neue Wahl"

msgid "Trigger notifications"
msgstr "Benachrichtigungen auslösen"
Expand Down Expand Up @@ -947,6 +950,9 @@ msgstr ""
"Die SMS-Benachrichtigung wurde beendet. Sie erhalten in Zukunft keine SMS "
"mehr."

msgid "Parties"
msgstr "Parteien"

msgid "Blank list"
msgstr "Blankoliste"

Expand Down Expand Up @@ -993,6 +999,10 @@ msgstr "Zuordnung gelöscht."
msgid "Edit compound"
msgstr "Verbindung bearbeiten"

#, python-format
msgid "Do you really want to clear all results (party results) of \"${item}\"?"
msgstr ""

msgid "Delete compound"
msgstr "Verbindung löschen"

Expand All @@ -1002,6 +1012,9 @@ msgstr "Verbindung hinzugefügt."
msgid "Compound modified."
msgstr "Verbindung geändert."

msgid "Results deleted."
msgstr "Ergebnisse gelöscht."

msgid "Compound deleted."
msgstr "Verbindung gelöscht."

Expand Down Expand Up @@ -1029,9 +1042,6 @@ msgstr "Wahl hinzugefügt."
msgid "Election modified."
msgstr "Wahl geändert."

msgid "Results deleted."
msgstr "Ergebnisse gelöscht."

msgid "Election deleted."
msgstr "Wahl gelöscht."

Expand Down
72 changes: 41 additions & 31 deletions onegov/election_day/locale/fr_CH/LC_MESSAGES/onegov.election_day.po
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ msgstr "Listes"
msgid "Candidates"
msgstr "Candidats"

msgid "Parties"
msgstr "Partis"
msgid "Party strengths"
msgstr "Force des partis"

msgid "Panachage"
msgstr "Panachage"
Expand Down Expand Up @@ -636,11 +636,36 @@ msgstr ""
msgid "Columns"
msgstr ""

msgid "Embed"
msgstr "Intégration"

msgid "Download"
msgstr "Télécharger"

#. Default: The diagram shows the votes and mandates of the parties. The rimmed
#. bars (left scale) correspond to the number of seats, the colored bars (right
#. scale) to the voices (percentages).
#.
msgid "figcaption_party_strengths"
msgstr ""
"Le diagramme montre les votes et les mandats des partis. Les barres à rebord "
"(échelle de gauche) correspondent au nombre de sièges, les barres colorées "
"(échelle de droite) aux voix (pourcentages)."

msgid "Year"
msgstr "Année"

msgid "Party"
msgstr "Parti"

#. Default: Votes
#.
msgid "single_votes"
msgstr "Votes"

msgid "Difference"
msgstr "Différence"

msgid "View all details online"
msgstr "Voir tous les détails en ligne"

Expand Down Expand Up @@ -683,18 +708,9 @@ msgstr "Veuillez utiliser le format suivant:"
msgid "No map available for this year."
msgstr "Aucune carte disponible pour cette année."

msgid "Embed"
msgstr "Intégration"

msgid "Download"
msgstr "Télécharger"

msgid "Candidate"
msgstr "Candidat"

msgid "Party"
msgstr "Parti"

msgid "List"
msgstr "Liste"

Expand Down Expand Up @@ -754,19 +770,6 @@ msgstr ""
"barres du côté droit aux résultats de la liste finale. La largeur des barres "
"et des connexions est proportionnelle aux votes."

#. Default: The diagram shows the votes and mandates of the parties. The rimmed
#. bars (left scale) correspond to the number of seats, the colored bars (right
#. scale) to the voices (percentages).
#.
msgid "figcaption_parties"
msgstr ""
"Le diagramme montre les votes et les mandats des partis. Les barres à rebord "
"(échelle de gauche) correspondent au nombre de sièges, les barres colorées "
"(échelle de droite) aux voix (pourcentages)."

msgid "Difference"
msgstr "Différence"

msgid "Accounted Ballots"
msgstr "Bulletins de vote comptabilisés"

Expand Down Expand Up @@ -821,14 +824,14 @@ msgstr ""
msgid "View"
msgstr "Voir"

msgid "New election"
msgstr "Nouveau election"
msgid "Upload party results"
msgstr "Uploader les résultats par parti"

msgid "Clear results"
msgstr "Effacer les résultats"

msgid "Upload party results"
msgstr "Uploader les résultats par parti"
msgid "New election"
msgstr "Nouveau election"

msgid "Trigger notifications"
msgstr "Activer les notifications"
Expand Down Expand Up @@ -950,6 +953,9 @@ msgstr ""
"Désabonnement aux services SMS réussi. Vous ne recevrez plus de SMS quand de "
"nouveaux résultats seront publiés."

msgid "Parties"
msgstr "Partis"

msgid "Blank list"
msgstr "Liste vierge"

Expand Down Expand Up @@ -996,6 +1002,10 @@ msgstr "Cartographie supprimée."
msgid "Edit compound"
msgstr ""

#, python-format
msgid "Do you really want to clear all results (party results) of \"${item}\"?"
msgstr ""

msgid "Delete compound"
msgstr ""

Expand All @@ -1005,6 +1015,9 @@ msgstr ""
msgid "Compound modified."
msgstr ""

msgid "Results deleted."
msgstr "Résultats supprimés."

msgid "Compound deleted."
msgstr ""

Expand Down Expand Up @@ -1034,9 +1047,6 @@ msgstr "Élection ajoutée."
msgid "Election modified."
msgstr "Élection modifiée."

msgid "Results deleted."
msgstr "Résultats supprimés."

msgid "Election deleted."
msgstr "Élection supprimée."

Expand Down
Loading

0 comments on commit 1f9a61e

Please sign in to comment.