use can_download flag for media front end messages

This commit is contained in:
meeb 2020-12-09 19:54:34 +11:00
parent 35bd26727b
commit 602eb9b90f
3 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<div class="col s12"> <div class="col s12">
<div class="card errorbox"> <div class="card errorbox">
<div class="card-content"> <div class="card-content">
<i class="fas fa-exclamation-triangle"></i> {{ message|safe }} <i class="fas fa-fw fa-exclamation-triangle"></i> {{ message|safe }}
</div> </div>
</div> </div>
</div> </div>

View File

@ -10,6 +10,7 @@
<p class="truncate">Saving to: <strong>{{ media.source.directory_path }}</strong></p> <p class="truncate">Saving to: <strong>{{ media.source.directory_path }}</strong></p>
</div> </div>
</div> </div>
{% if not media.can_download %}{% include 'errorbox.html' with message='Media cannot be downloaded because it has no formats which match the source requirements.' %}{% endif %}
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<table class="striped"> <table class="striped">

View File

@ -18,7 +18,7 @@
<img src="{% if m.thumb %}{% url 'sync:media-thumb' pk=m.pk %}{% else %}{% static 'images/nothumb.png' %}{% endif %}"> <img src="{% if m.thumb %}{% url 'sync:media-thumb' pk=m.pk %}{% else %}{% static 'images/nothumb.png' %}{% endif %}">
<span class="card-title truncate">{{ m.source }}<br> <span class="card-title truncate">{{ m.source }}<br>
<span>{{ m.name }}</span><br> <span>{{ m.name }}</span><br>
<span>{{ m.published|date:'Y-m-d' }}</span> <span>{% if m.can_download %}{{ m.published|date:'Y-m-d' }}{% else %}<i class="fas fa-exclamation-triangle"></i> No matching formats{% endif %}</span>
</span> </span>
</div> </div>
</a> </a>