Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2aa5a01

Browse files
committed
Merge pull requestalphagov#213 from Davidslv/only-show-more-information-link-when-link-is-provided
Only show "more information" link when one is provided
2 parents73da8d7 +a1886b3 commit2aa5a01

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎campaigns.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@ def template(app):
3939
<div class="campaign-inner">
4040
<h1>{{ heading|e }}</h1>
4141
<p>{{ extra_info|e }}</p>
42-
<a href="{{ more_info_url|e }}">More information</a>
42+
43+
{% if more_info_url %}
44+
<a href="{{ more_info_url|e }}">More information</a>
45+
{% endif %}
4346
</div>
4447
</div>""")
4548
elifapp=='static':
4649
template=Template("""<p>{{ heading|e }}<br />
4750
{{ extra_info|e }}</p>
48-
<a href="{{ more_info_url|e }}" class="right">More information</a>""")
51+
{% if more_info_url %}
52+
<a href="{{ more_info_url|e }}" class="right">More information</a>
53+
{% endif %}""")
4954

5055
env['template_contents']=template.render(env.context)
5156

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp