Add display for snapshot files on homepage
This commit is contained in:
parent
4efc421f04
commit
ba07636a85
2 changed files with 10 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
.table.col4 {grid-template-columns: repeat(4, auto)}
|
.table.col4 {grid-template-columns: repeat(4, auto)}
|
||||||
.table.col5 {grid-template-columns: repeat(5, auto)}
|
.table.col5 {grid-template-columns: repeat(5, auto)}
|
||||||
.table.col6 {grid-template-columns: repeat(6, auto)}
|
.table.col6 {grid-template-columns: repeat(6, auto)}
|
||||||
|
.table.col1-5 {grid-template-columns: min-content repeat(5, auto)}
|
||||||
.table.col1-6 {grid-template-columns: min-content repeat(6, auto)}
|
.table.col1-6 {grid-template-columns: min-content repeat(6, auto)}
|
||||||
|
|
||||||
.table > div {
|
.table > div {
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
|
|
||||||
{% if snapshots %}
|
{% if snapshots %}
|
||||||
<h2>{% translate "Snapshots" %}</h2>
|
<h2>{% translate "Snapshots" %}</h2>
|
||||||
<div id="snapshots" class="table col5">
|
<div id="snapshots" class="table col1-5">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
<strong class="attach center"><i class="fa fa-paperclip"></i></strong>
|
||||||
<strong class="date center">{% translate "Date" %}</strong>
|
<strong class="date center">{% translate "Date" %}</strong>
|
||||||
<strong class="value center">{% translate "Value" %}</strong>
|
<strong class="value center">{% translate "Value" %}</strong>
|
||||||
<strong class="diff center">{% translate "Difference" %}</strong>
|
<strong class="diff center">{% translate "Difference" %}</strong>
|
||||||
|
@ -36,6 +37,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% for snap in snapshots %}
|
{% for snap in snapshots %}
|
||||||
<div class="snapshot {% cycle 'w' 'g' %}">
|
<div class="snapshot {% cycle 'w' 'g' %}">
|
||||||
|
<span class="attach center">
|
||||||
|
{% if snap.file %}
|
||||||
|
<a href="{{ snap.file.url }}">
|
||||||
|
<i class="fa fa-paperclip"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
<span class="date num center">
|
<span class="date num center">
|
||||||
<a href="{% url 'snapshot' snap.id %}">{{ snap.date|date:"Y-m-d" }}</a>
|
<a href="{% url 'snapshot' snap.id %}">{{ snap.date|date:"Y-m-d" }}</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in a new issue