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 authored and tfoote committed Jan 2, 2024
1 parent 7fbcb26 commit 9d0c592
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 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

0 comments on commit 9d0c592

Please sign in to comment.