From 1de4e27ac0f5fc090d5e1b257f0e5c064b6b54d1 Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Sun, 2 Mar 2014 14:57:46 -0800 Subject: [PATCH] disable showing user info when desired --- helios/templates/election_view.html | 2 +- server_ui/templates/index.html | 2 +- settings.py | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/helios/templates/election_view.html b/helios/templates/election_view.html index 0e78353..3f8c04c 100644 --- a/helios/templates/election_view.html +++ b/helios/templates/election_view.html @@ -10,7 +10,7 @@ {% endif %} {% endif %}</h3> <p style="padding-top:0px; margin-top:0px"> -<em>{% if election.private_p %}private{%else%}public{% endif %}</em> {{ election.election_type }} created by <u><b>{{election.admin.display_html_small|safe}}</b></u> +<em>{% if election.private_p %}private{%else%}public{% endif %}</em> {{ election.election_type }}{% if settings.SHOW_USER_INFO %} created by <u><b>{{election.admin.display_html_small|safe}}</b></u>{% endif %} {% if election.is_archived %} [archived] {% endif %} diff --git a/server_ui/templates/index.html b/server_ui/templates/index.html index 2c3898a..b21b502 100644 --- a/server_ui/templates/index.html +++ b/server_ui/templates/index.html @@ -40,7 +40,7 @@ More than <b>100,000 votes</b> have been cast using Helios. <p> {% for election in elections %} <div class="panel"> - <a style="font-size: 1.4em;" href="{% url helios.views.election_shortcut election.short_name %}">{{election.name}}</a> by {{election.admin.display_html_small|safe}}<br /> + <a style="font-size: 1.4em;" href="{% url helios.views.election_shortcut election.short_name %}">{{election.name}}</a>{% if settings.SHOW_USER_INFO %} by {{election.admin.display_html_small|safe}}{% endif %}<br /> {{election.description}} </div> <br /> diff --git a/settings.py b/settings.py index 544d2d2..c9485ff 100644 --- a/settings.py +++ b/settings.py @@ -24,6 +24,10 @@ MASTER_HELIOS = (get_from_env('MASTER_HELIOS', '0') == '1') # if turned off, the admin will need to know to go to /auth/login manually SHOW_LOGIN_OPTIONS = (get_from_env('SHOW_LOGIN_OPTIONS', '1') == '1') +# sometimes, when the site is not that social, it's not helpful +# to display who created the election +SHOW_USER_INFO = (get_from_env('SHOW_USER_INFO', '1') == '1') + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', -- GitLab