Hide tags if none exist
Diff
templates/repo/refs.html | 20 ++++++++++++++------
templates/repo/summary.html | 38 +++++++++++++++++++++++++++-----------
2 files changed, 31 insertions(+), 27 deletions(-)
@@ -7,15 +7,17 @@
<table class="repositories">
{% call refs::branch_table(refs.heads) %}
<tbody>
<tr class="separator">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
{% if !refs.tags.is_empty() %}
<tbody>
<tr class="separator">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
{% call refs::tag_table(refs.tags) %}
{% call refs::tag_table(refs.tags) %}
{% endif %}
</table>
{% endblock %}
@@ -17,25 +17,27 @@
</tbody>
{% endif %}
<tbody>
<tr class="separator">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
{% if !refs.tags.is_empty() %}
<tbody>
<tr class="separator">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
{% call refs::tag_table(refs.tags.iter().take(10)) %}
{% if refs.tags.len() > 10 %}
<tbody>
<tr class="no-background">
<td><a href="/{{ repo.display() }}/refs" class="no-style">[...]</a></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
{% call refs::tag_table(refs.tags.iter().take(10)) %}
{% if refs.tags.len() > 10 %}
<tbody>
<tr class="no-background">
<td><a href="/{{ repo.display() }}/refs" class="no-style">[...]</a></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
{% endif %}
{% endif %}
<tbody>