Make showing the Terms of Service a user option, and move it to the footer.
This commit sponsored by Gjalt-Jorn Peters. Thank you!
This commit is contained in:
parent
0c875e1e96
commit
9d2b0161b9
@ -45,6 +45,11 @@ comments_ascending = boolean(default=True)
|
|||||||
# Enable/disable reporting
|
# Enable/disable reporting
|
||||||
allow_reporting = boolean(default=True)
|
allow_reporting = boolean(default=True)
|
||||||
|
|
||||||
|
# Enable/disable terms of service
|
||||||
|
# ... Note: you can override the terms of service template on a
|
||||||
|
# per-site basis...
|
||||||
|
show_tos = boolean(default=True)
|
||||||
|
|
||||||
# By default not set, but you might want something like:
|
# By default not set, but you might want something like:
|
||||||
# "%(here)s/user_dev/templates/"
|
# "%(here)s/user_dev/templates/"
|
||||||
local_templates = string()
|
local_templates = string()
|
||||||
|
@ -94,11 +94,6 @@
|
|||||||
"javascript:;"
|
"javascript:;"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>{% trans %}log out{% endtrans %}</a>
|
>{% trans %}log out{% endtrans %}</a>
|
||||||
<p class="fine_print">
|
|
||||||
<a href="{{ request.urlgen('terms_of_service') }}">
|
|
||||||
{%- trans %}Terms of Service{%- endtrans %}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- elif auth %}
|
{%- elif auth %}
|
||||||
<a href=
|
<a href=
|
||||||
|
@ -24,5 +24,12 @@
|
|||||||
{% trans source_link=app_config['source_link'] -%}
|
{% trans source_link=app_config['source_link'] -%}
|
||||||
Released under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPL</a>. <a href="{{ source_link }}">Source code</a> available.
|
Released under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPL</a>. <a href="{{ source_link }}">Source code</a> available.
|
||||||
{%- endtrans %}
|
{%- endtrans %}
|
||||||
|
{% if app_config['show_tos'] %}
|
||||||
|
<p class="fine_print">
|
||||||
|
<a href="{{ request.urlgen('terms_of_service') }}">
|
||||||
|
{%- trans %}Terms of Service{%- endtrans %}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
</footer>
|
</footer>
|
||||||
{%- endblock mediagoblin_footer -%}
|
{%- endblock mediagoblin_footer -%}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
from mediagoblin import mg_globals
|
from mediagoblin import mg_globals
|
||||||
from mediagoblin.db.models import MediaEntry
|
from mediagoblin.db.models import MediaEntry
|
||||||
from mediagoblin.tools.pagination import Pagination
|
from mediagoblin.tools.pagination import Pagination
|
||||||
from mediagoblin.tools.response import render_to_response
|
from mediagoblin.tools.response import render_to_response, render_404
|
||||||
from mediagoblin.decorators import uses_pagination, user_not_banned
|
from mediagoblin.decorators import uses_pagination, user_not_banned
|
||||||
|
|
||||||
|
|
||||||
@ -46,5 +46,8 @@ def simple_template_render(request):
|
|||||||
request, template_name, {})
|
request, template_name, {})
|
||||||
|
|
||||||
def terms_of_service(request):
|
def terms_of_service(request):
|
||||||
|
if mg_globals.app_config["show_tos"] is False:
|
||||||
|
return render_404(request)
|
||||||
|
|
||||||
return render_to_response(request,
|
return render_to_response(request,
|
||||||
'mediagoblin/terms_of_service.html', {})
|
'mediagoblin/terms_of_service.html', {})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user