Fixed a very confusing template variable naming.
- Legacy-Id: 9400
This commit is contained in:
parent
bf67b7caef
commit
3d2517dc1f
|
@ -17,7 +17,7 @@ def show_submission_files(context, submission):
|
|||
exists = True
|
||||
elif submission.state_id == "posted":
|
||||
continue
|
||||
result.append({'name': '%s' % ext[1:],
|
||||
result.append({'ext': '%s' % ext[1:],
|
||||
'exists': exists,
|
||||
'url': '%s%s-%s%s' % (settings.IDSUBMIT_STAGING_URL, submission.name, submission.rev, ext)})
|
||||
return {'files': result}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% for file in files %}
|
||||
{% if file.exists %}
|
||||
<a class="btn btn-default btn-xs" href="{{ file.url }}" target="_blank">
|
||||
<span class="fa fa-file-{% if file.name == "txt" %}text-o{% elif file.name == "xml" %}code-o{% elif file.name == "pdf" %}pdf-o{% else %}o{% endif %}"></span>
|
||||
{{ file.name }}
|
||||
<span class="fa fa-file-{% if file.ext == "txt" %}text-o{% elif file.ext == "xml" %}code-o{% elif file.ext == "pdf" %}pdf-o{% else %}o{% endif %}"></span>
|
||||
{{ file.ext }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue