Require bug_project setting

If bug_project is not set, do not show the "Report a bug" link.

Change-Id: Ifd715d1d46d1b1796d79679c9e954d21e9d09455
This commit is contained in:
Andreas Jaeger 2017-06-29 21:54:59 +02:00
parent 0dbb289956
commit a713646d06
4 changed files with 12 additions and 3 deletions

View File

@ -56,7 +56,9 @@ ga('send', 'pageview');
{% if next %}
<a href="{{ next.link|e }}"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: {{ next.title }}"></i></a>
{% endif %}
{%- if bug_project %}
<a id="logABugLink3" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a>
{% endif %}
</div>
<div class="row docs-byline bottom">
<div class="docs-updated">updated: {{ last_updated }}</div>
@ -67,8 +69,11 @@ ga('send', 'pageview');
</div>
<div class="col-lg-4 col-md-4 col-sm-4 docs-actions-wrapper">
<!-- ID buglinkbottom added so that pre-filled doc bugs
are sent to Launchpad projects related to the document -->
are sent to Launchpad projects related to the
document -->
{%- if bug_project %}
<a href="#" id="logABugLink2" class="docs-footer-actions"><i class="fa fa-bug"></i> found an error? report a bug</a>
{%- endif %}
<a href="http://ask.openstack.org" class="docs-footer-actions"><i class="fa fa-question-circle"></i> questions?</a>
</div>
</div>

View File

@ -38,8 +38,6 @@
var gitSha = "SHA: {{ gitsha }}";
{%- if bug_project %}
var bugProject = "{{ bug_project }}";
{%- else %}
var bugProject = "openstack-manuals";
{%- endif %}
{%- if bug_title %}
var bugTitle = "{{ bug_title }}";

View File

@ -13,6 +13,8 @@
{% if next %}
<a href="{{ next.link|e }}"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: {{ next.title }}"></i></a>
{% endif %}
{%- if bug_project %}
<a id="logABugLink1" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a>
{% endif %}
</div>
</div>

View File

@ -0,0 +1,4 @@
---
fixes:
- If ``bug_project`` is not set, the "Report a bug" links are not
displayed at all.