Skip to content

Commit

Permalink
Use 'else' clause instead of separate 'unless'.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic committed Feb 7, 2020
1 parent a446f92 commit 7fcbabe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions _includes/package_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

<div class="list-group list-group-sm {%if horizontal%}list-group-horizontal list-group-justified{%endif%}">
<a class="{{list_group_class}} {% if package.data.docs_uri == '' %}disabled{% endif %}" target="_blank"
{% unless package.data.docs_uri == '' %}href="{{ package.data.docs_uri }}"{% endunless %}
{% if package.data.docs_uri == '' %}href="javascript:void(0)"{% endif %}
{% if package.data.docs_uri == '' %}
href="javascript:void(0)"
{% else %}
href="{{ package.data.docs_uri }}"
{% endif %}
title="View API documentation">
<span style="margin-right: 5px;" class="glyphicon glyphicon-file"></span>
{%if hide_link_labels%}<br>{%endif%}
Expand Down Expand Up @@ -54,8 +57,9 @@
target="_blank"
{% if package.snapshot.documented %}
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"
{% else %}
href="javascript:void(0);"
{% endif %}
{% unless package.snapshot.documented %}href="javascript:void(0);"{% endunless %}
title="View RosEco package graph">
<span style="margin-right: 5px;" class="glyphicon glyphicon-tree-deciduous"></span>
{%if hide_link_labels%}<br>{%endif%}
Expand Down

0 comments on commit 7fcbabe

Please sign in to comment.