#372 fix inventory doesn't work with only one device

This commit is contained in:
Oliver Gorwits
2018-03-02 15:59:47 +00:00
parent 5cda45453d
commit 6a43842ea9
4 changed files with 24 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
<div class="container">
[% IF models.count %]
[% IF platforms.size %]
<div class="row">
<div class="span6">
<h3 class="nd_inventory-table-head">By Platform</h3>
@@ -12,7 +12,7 @@
</tr>
</thead>
<tbody>
[% FOREACH platform IN models.all %]
[% FOREACH platform IN platforms %]
[% NEXT UNLESS platform.vendor OR platform.model %]
<tr>
<th>
@@ -29,7 +29,7 @@
[% platform.model | html_entity %]</a>
[% ELSE %]unknown[% END %]
</th>
<th>[% platform.get_column('count') | html_entity %]</th>
<th>[% platform.count | html_entity %]</th>
</tr>
[% END %]
</tbody>
@@ -46,8 +46,8 @@
</tr>
</thead>
<tbody>
[% FOREACH release IN releases.all %]
[% NEXT UNLESS (release.os OR release.os_ver) %]
[% FOREACH release IN releases %]
[% NEXT UNLESS release.os OR release.os_ver %]
<tr>
<th>
[% IF release.os %]
@@ -63,7 +63,7 @@
[% release.os_ver | html_entity %]</a>
[% ELSE %]unknown[% END %]
</th>
<th>[% release.get_column('count') | html_entity %]</th>
<th>[% release.count | html_entity %]</th>
</tr>
[% END %]
</tbody>