Better structure for upload/download
This commit is contained in:
parent
acdfbbea7a
commit
1a73801f52
@ -23,17 +23,21 @@
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<h2>{% trans "Download and upload" %}</h2>
|
||||
<h2>{% trans "Download" %}</h2>
|
||||
|
||||
<a href="{{ object.get_download_url }}">{% trans "Download" %}</a>
|
||||
{% with object.get_download_url as download_url %}
|
||||
<p>{% blocktrans %}You can <a href="{{ download_url }}">download</a> file for offline translation.{% endblocktrans %}</p>
|
||||
{% endwith %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<h2>{% trans "Upload" %}</h2>
|
||||
|
||||
<p>{% trans "Uploaded file will be merged with current translation. In case you want to overwrite already translated strings, don't forget to enable it." %}</p>
|
||||
|
||||
<form action="{% url 'trans.views.upload_translation' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code %}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
<tr><td></td><td><input type="submit" value="{% trans "Upload" %}" /></td></tr>
|
||||
</table>
|
||||
{{ form.as_p }}
|
||||
<p><input type="submit" value="{% trans "Upload" %}" /></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user