Skip to content

Commit

Permalink
Merge pull request #325 from Sinkler/error_base
Browse files Browse the repository at this point in the history
Add translation to error template
  • Loading branch information
darklow committed Mar 13, 2015
2 parents 8146f44 + 65328d9 commit 1a3455f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions suit/templates/suit/error_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ <h1>{% block title %}Error{% endblock %}</h1>

<br>
<script type="text/javascript">
if(window.location.href.toString().indexOf('popup') != -1){
document.write('<a href="javascript:window.close()" class="btn btn-info btn-large">Close window</a> ');
}else {
if (document.referrer != '') {
document.write('<a href="javascript:history.back()" class="btn btn-info btn-large">Go back</a> ');
}
{% if request and user.is_authenticated and user.is_staff %}
document.write('<a href="{% url 'admin:index' %}" class="btn btn-large">Go to admin home</a> ');
{% endif %}
if (window.location.href.toString().indexOf('popup') != -1) {
document.write('<a href="javascript:window.close()" class="btn btn-info btn-large">{% trans 'Close window' %}</a> ');
} else {
if (document.referrer != '') {
document.write('<a href="javascript:history.back()" class="btn btn-info btn-large">{% trans 'Go back' %}</a> ');
}
{% if request and user.is_authenticated and user.is_staff %}
document.write('<a href="{% url 'admin:index' %}" class="btn btn-large">{% trans 'Go to admin home' %}</a> ');
{% endif %}
}
</script>
</div>
Expand Down

0 comments on commit 1a3455f

Please sign in to comment.