Skip to content

Commit 7fcbabe

Browse files
committed
Use 'else' clause instead of separate 'unless'.
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
1 parent a446f92 commit 7fcbabe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

_includes/package_links.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414

1515
<div class="list-group list-group-sm {%if horizontal%}list-group-horizontal list-group-justified{%endif%}">
1616
<a class="{{list_group_class}} {% if package.data.docs_uri == '' %}disabled{% endif %}" target="_blank"
17-
{% unless package.data.docs_uri == '' %}href="{{ package.data.docs_uri }}"{% endunless %}
18-
{% if package.data.docs_uri == '' %}href="javascript:void(0)"{% endif %}
17+
{% if package.data.docs_uri == '' %}
18+
href="javascript:void(0)"
19+
{% else %}
20+
href="{{ package.data.docs_uri }}"
21+
{% endif %}
1922
title="View API documentation">
2023
<span style="margin-right: 5px;" class="glyphicon glyphicon-file"></span>
2124
{%if hide_link_labels%}<br>{%endif%}
@@ -54,8 +57,9 @@
5457
target="_blank"
5558
{% if package.snapshot.documented %}
5659
href="http://http404error.github.io/roseco/graph.html?id=ros.json&focus={{page.package_name}}&height=1&depth=2&tred=standard&metagroup=false&colorby=Health&direction=LR"
60+
{% else %}
61+
href="javascript:void(0);"
5762
{% endif %}
58-
{% unless package.snapshot.documented %}href="javascript:void(0);"{% endunless %}
5963
title="View RosEco package graph">
6064
<span style="margin-right: 5px;" class="glyphicon glyphicon-tree-deciduous"></span>
6165
{%if hide_link_labels%}<br>{%endif%}

0 commit comments

Comments
 (0)