Add a button linking to the forum

This commit is contained in:
kezzle 2022-11-14 20:59:54 +00:00 committed by Gus
parent 0eb5accc67
commit f2547fd3d1
20 changed files with 43 additions and 2 deletions

View File

@ -5,3 +5,5 @@ title: About Tor
key: 2
---
seo_slug: about
---
forum_link: https://forum.torproject.net/tag/tor

View File

@ -6,3 +6,4 @@ seo_slug: abuse-faq
---
key: 16
---
forum_link: https://forum.torproject.net/c/general-discussion/

View File

@ -5,3 +5,5 @@ title: Alternate Designs We Don't Do (Yet)
seo_slug: alternate-designs
---
key: 20
---
forum_link: https://forum.torproject.net/c/feedback/

View File

@ -6,3 +6,4 @@ seo_slug: censorship
---
key:8
---
forum_link: https://forum.torproject.net/c/support/censorship-circumvention/

View File

@ -6,3 +6,4 @@ seo_slug: connecting-to-tor
---
key:7
---
forum_link: https://forum.torproject.net/tag/tor-browser

View File

@ -6,3 +6,4 @@ seo_slug: faq
---
key:1
---
forum_link: https://forum.torproject.net/c/support/12/l/top?period=all

View File

@ -6,3 +6,4 @@ key: 13
---
seo_slug: get-in-touch
---
forum_link: https://forum.torproject.net/c/support/

View File

@ -1,3 +1,5 @@
_model: glossary
---
title: Glossary
---
forum_link: https://forum.torproject.net/tags/

View File

@ -6,3 +6,4 @@ seo_slug: little-t-tor
---
key:19
---
forum_link: https://forum.torproject.net/c/support/core-tor/

View File

@ -6,3 +6,4 @@ seo_slug: metrics
---
key: 17
---
forum_link: https://forum.torproject.net/tag/metrics

View File

@ -6,3 +6,4 @@ seo_slug: misc
---
key:12
---
forum_link: https://forum.torproject.net/c/general-discussion/

View File

@ -6,3 +6,4 @@ seo_slug: onion-services
---
key:11
---
forum_link: https://forum.torproject.net/c/support/onion-services/

View File

@ -6,3 +6,4 @@ seo_slug: relay-operators
---
key:10
---
forum_link: https://forum.torproject.net/c/support/relay-operator/

View File

@ -6,3 +6,4 @@ seo_slug: tor-browser
---
key:3
---
forum_link: https://forum.torproject.net/c/support/tor-browser-desktop/

View File

@ -6,3 +6,4 @@ seo_slug: tor-mobile
---
key:5
---
forum_link: https://forum.torproject.net/c/support/tor-browser-for-android/

View File

@ -21,3 +21,8 @@ translate = False
[fields.key]
label = Key
type = sort_key
[fields.forum_link]
label = Forum Link
type = url
translate = False

View File

@ -11,3 +11,8 @@ label = Title
type = string
size = large
translate = True
[fields.forum_link]
label = Forum Link
type = url
translate = False

View File

@ -21,3 +21,8 @@ type = sort_key
label = Seo Slug
type = string
translate = False
[fields.forum_link]
label = Forum Link
type = url
translate = False

View File

@ -41,8 +41,13 @@
{% include 'sidenav.html' %}
{% set locale = bag('alternatives', this.alt) %}
<main role="main" class="col-sm-12 col-xs-12 ml-sm-auto col-md-9 col-lg-9 {{ locale.order }} {{ locale.direction }}">
<button class="btn btn-primary float-right" data-toggle="collapse" data-target=".expand" aria-expanded="false" onclick="change(event)">expand</button>
{% block body %}{% endblock %}
<div class="d-flex justify-content-end" style="gap: 0.5em;">
{% if this._model == 'topic' and this.forum_link %}
<a href="{{ this.forum_link }}"><button class="btn btn-outline-primary float-right"><i class="fab fa-discourse pr-2"></i>View this topic on the forum</button></a>
{% endif %}
<button class="btn btn-primary" data-toggle="collapse" data-target=".expand" aria-expanded="false" onclick="change(event)">expand</button>
</div>
{% block body %}{% endblock %}
</main>
</div>
</div>

View File

@ -15,6 +15,9 @@
<ul class="list-group list-group-flush">
<!--li class="list-group-item"><a><span class="card-text text-muted">{{ _("Contributors to this page:") }} <a href="#" title="#">cypherpunk</a></span></li-->
<li class="list-group-item">
{% if item.forum_link %}
<a href="{{ item.forum_link }}">{{ _("Read more on the forum") }}</a> -
{% endif %}
<a href="https://gitlab.torproject.org/tpo/web/support/-/edit/main/content{{ item.path }}/contents.lr">{{ _("Edit this page") }}</a> -
<a href="https://support.torproject.org/misc/bug-or-feedback/">{{ _("Suggest Feedback") }}</a> -
<a href="{{ item|url }}">{{ _("Permalink") }}</a>