Browse Source

Check node sections have content before outputting

pm2
Luke Childs 9 years ago
parent
commit
82ece06fbc
  1. 28
      views/node.html

28
views/node.html

@ -15,6 +15,13 @@
</section>
</div>
{% if
node.nickname or
node.fingerprint or
node.hashed_fingerprint or
node.advertised_bandwidth or
node.flags.length
%}
<section class="overview">
<h3>Overview</h3>
<i class="icon-tor"></i>
@ -43,9 +50,18 @@
{% endif %}
</dl>
</section>
{% endif %}
<div class="columns">
{% if
node.type or
node.platform or
node.or_addresses.length or
node.dir_address or
node.transports.length or
node.exit_policy.length
%}
<section class="config">
<h3>Config</h3>
<dl>
@ -81,7 +97,18 @@
{% endif %}
</dl>
</section>
{% endif %}
{% if
node.host_name or
node.contact or
node.country_name or
node.region_name or
node.city_name or
node.as_number or
node.as_name or
node.consensus_weight
%}
<section class="meta">
<h3>Meta</h3>
<dl>
@ -119,6 +146,7 @@
{% endif %}
</dl>
</section>
{% endif %}
</div>

Loading…
Cancel
Save