From e6f3506e6499620bbf8f61b898f43661c66b52a7 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 18 2019 16:55:14 +0000 Subject: [PATCH 1/6] Remove fedmenu from elections Signed-off-by: Clement Verna --- diff --git a/fedora_elections/templates/base.html b/fedora_elections/templates/base.html index c128ae8..d18e2f8 100644 --- a/fedora_elections/templates/base.html +++ b/fedora_elections/templates/base.html @@ -126,17 +126,6 @@ $('[data-toggle="tooltip"]').tooltip() }) - {% if config['FEDMENU_URL'] %} - - - {% endif %} - {% endblock %} From ad6162a7c5ed944535b7392cba730345f75a61d9 Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Nov 18 2019 16:55:27 +0000 Subject: [PATCH 2/6] Open information links in a new window. Fixes #56 --- diff --git a/fedora_elections/forms.py b/fedora_elections/forms.py index 8fc90b0..91947ba 100644 --- a/fedora_elections/forms.py +++ b/fedora_elections/forms.py @@ -135,7 +135,7 @@ def get_range_voting_form(candidates, max_range): for candidate in candidates: title = candidate.fas_name or candidate.name if candidate.url: - title = '%s [Info]' % (title, candidate.url) + title = '%s [Info]' % (title, candidate.url) field = wtforms.SelectField( title, choices=[(str(item), item) for item in range(max_range + 1)] @@ -160,7 +160,7 @@ def get_simple_voting_form(candidates, fasusers): except (KeyError, AuthError) as err: APP.logger.debug(err) if candidate.url: - title = '%s [Info]' % (title, candidate.url) + title = '%s [Info]' % (title, candidate.url) titles.append((str(candidate.id), title)) field = wtforms.RadioField( 'Candidates', @@ -192,7 +192,7 @@ def get_select_voting_form(candidates, max_selection): for candidate in candidates: title = candidate.fas_name or candidate.name if candidate.url: - title = '%s [Info]' % (title, candidate.url) + title = '%s [Info]' % (title, candidate.url) field = wtforms.BooleanField( title, ) diff --git a/fedora_elections/templates/vote_simple.html b/fedora_elections/templates/vote_simple.html index a088925..6b53e70 100644 --- a/fedora_elections/templates/vote_simple.html +++ b/fedora_elections/templates/vote_simple.html @@ -13,7 +13,7 @@

{{election.description}}

-

[More Information]

+

[More Information]

Here are the candidates for the {{ election.seats_elected }} seat(s) open:

From ff15dcafb612fc2a321062d1b55eeb4130debcd5 Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Nov 18 2019 16:55:27 +0000 Subject: [PATCH 3/6] Add another place to open the link in a new window --- diff --git a/fedora_elections/templates/vote_range.html b/fedora_elections/templates/vote_range.html index d6f0f2b..ce45b8a 100644 --- a/fedora_elections/templates/vote_range.html +++ b/fedora_elections/templates/vote_range.html @@ -13,7 +13,7 @@

{{election.description}}

-

[More Information]

+

[More Information]

Here are the candidates for the {{ election.seats_elected }} seat(s) open:

From 1eb88013a7bb141ed487aef94fe3cd7192ad4896 Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Nov 18 2019 16:55:27 +0000 Subject: [PATCH 4/6] Clarify that the names are clickable links Fixes #55 --- diff --git a/fedora_elections/templates/about.html b/fedora_elections/templates/about.html index b87fea8..8a2e1de 100644 --- a/fedora_elections/templates/about.html +++ b/fedora_elections/templates/about.html @@ -68,12 +68,13 @@

Candidates

{% for candidate in election.candidates %} - + {% if election.candidates_are_fasusers %} {{ usernamemap['%s' % candidate.id] }} {% else %} {{ candidate.name }} {% endif %} + {% if candidate.url %}(click for more info){% endif %} {% endfor %} {% if election.candidates.count() == 0 %} From 6dffcae7a16aa1c1625c65a206a6de4f66a546ca Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Nov 18 2019 17:04:42 +0000 Subject: [PATCH 5/6] Protect against info leakage with rel="noopener noreferrer" on our new tabs. --- diff --git a/fedora_elections/forms.py b/fedora_elections/forms.py index 91947ba..b88edaf 100644 --- a/fedora_elections/forms.py +++ b/fedora_elections/forms.py @@ -135,7 +135,7 @@ def get_range_voting_form(candidates, max_range): for candidate in candidates: title = candidate.fas_name or candidate.name if candidate.url: - title = '%s [Info]' % (title, candidate.url) + title = '%s [Info]' % (title, candidate.url) field = wtforms.SelectField( title, choices=[(str(item), item) for item in range(max_range + 1)] @@ -160,7 +160,7 @@ def get_simple_voting_form(candidates, fasusers): except (KeyError, AuthError) as err: APP.logger.debug(err) if candidate.url: - title = '%s [Info]' % (title, candidate.url) + title = '%s [Info]' % (title, candidate.url) titles.append((str(candidate.id), title)) field = wtforms.RadioField( 'Candidates', @@ -192,7 +192,7 @@ def get_select_voting_form(candidates, max_selection): for candidate in candidates: title = candidate.fas_name or candidate.name if candidate.url: - title = '%s [Info]' % (title, candidate.url) + title = '%s [Info]' % (title, candidate.url) field = wtforms.BooleanField( title, ) diff --git a/fedora_elections/templates/about.html b/fedora_elections/templates/about.html index 8a2e1de..de10caa 100644 --- a/fedora_elections/templates/about.html +++ b/fedora_elections/templates/about.html @@ -68,7 +68,7 @@

Candidates

{% block jscripts %} diff --git a/fedora_elections/templates/vote_range.html b/fedora_elections/templates/vote_range.html index ce45b8a..ade038b 100644 --- a/fedora_elections/templates/vote_range.html +++ b/fedora_elections/templates/vote_range.html @@ -13,7 +13,7 @@

{{election.description}}

-

[More Information]

+

[More Information]

Here are the candidates for the {{ election.seats_elected }} seat(s) open:

diff --git a/fedora_elections/templates/vote_simple.html b/fedora_elections/templates/vote_simple.html index 6b53e70..ef202da 100644 --- a/fedora_elections/templates/vote_simple.html +++ b/fedora_elections/templates/vote_simple.html @@ -13,7 +13,7 @@

{{election.description}}

-

[More Information]

+

[More Information]

Here are the candidates for the {{ election.seats_elected }} seat(s) open:

From ed4fd1d56d62311b71f803a86eb8d0b6a6033937 Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Nov 18 2019 17:12:27 +0000 Subject: [PATCH 6/6] Release 2.9 --- diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py index c782d8f..20e7865 100644 --- a/fedora_elections/__init__.py +++ b/fedora_elections/__init__.py @@ -25,7 +25,7 @@ # from __future__ import unicode_literals, absolute_import -__version__ = '2.7' +__version__ = '2.9' import logging # noqa import os # noqa diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec index fc99887..f84d23e 100644 --- a/files/fedora-elections.spec +++ b/files/fedora-elections.spec @@ -1,7 +1,7 @@ %define modname fedora_elections Name: fedora-elections -Version: 2.7 +Version: 2.9 Release: 1%{?dist} Summary: Fedora elections application @@ -112,6 +112,11 @@ install -m 644 files/update_1_to_2.sql \ %changelog +* Mon Nov 18 2019 Ben Cotton 2.9-1 +- Update to 2.9 (2.8 existed, in a sense) +- Open "more info" links in a new window +- Make it more clear that names are clickable links + * Tue Oct 17 2017 Pierre-Yves Chibon - 2.7-1 - Update to 2.7 - Fix spelling error (VoidWhisperer)