Browse Source

Improve 'back' funcitonality

master
Burathar 3 years ago
parent
commit
7733a91b68
  1. 4
      biscd/biscd/templates/400.html
  2. 6
      biscd/biscd/templates/401.html
  3. 4
      biscd/biscd/templates/404.html
  4. 4
      biscd/biscd/templates/500.html
  5. 12
      biscd/biscd/templates/base_error.html

4
biscd/biscd/templates/400.html

@ -1,8 +1,8 @@
{% extends "base.html" %} {% extends "base_error.html" %}
{% block app_content %} {% block app_content %}
<h1>400 Bad Request</h1> <h1>400 Bad Request</h1>
<p><a href="{{ url_for('index') }}">Back</a></p> <p><a id="back" title="Go Back" href="{{ url_for('index') }}">Back</a></p>
<h2>Error Message:</h2> <h2>Error Message:</h2>
{{ error }} {{ error }}

6
biscd/biscd/templates/401.html

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base_error.html" %}
{% block app_content %} {% block app_content %}
<h1>401 Unauthorized</h1> <h1>401 Unauthorized</h1>
<p><a href="{{ url_for('index') }}">Back</a></p> <p><a id="back" title="Go Back" href="{{ url_for('index') }}">Back</a></p>
{% endblock %} {% endblock %}

4
biscd/biscd/templates/404.html

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base_error.html" %}
{% block app_content %} {% block app_content %}
<h1>404 Page Not Found</h1> <h1>404 Page Not Found</h1>
<p><a href="{{ url_for('index') }}">Back</a></p> <p><a id="back" title="Go Back" href="{{ url_for('index') }}">Back</a></p>
{% endblock %} {% endblock %}

4
biscd/biscd/templates/500.html

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base_error.html" %}
{% block app_content %} {% block app_content %}
<h1>500 Internal Server Error</h1> <h1>500 Internal Server Error</h1>
<p><a href="{{ url_for('index') }}">Back</a></p> <p><a id="back" title="Go Back" href="{{ url_for('index') }}">Back</a></p>
{% endblock %} {% endblock %}

12
biscd/biscd/templates/base_error.html

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block scripts %}
<script>
function goBack() {
window.history.back();
}
$('#back').click(function(){ goBack(); return false; });
$('#back').attr("href","#");
</script>
{% endblock %}
Loading…
Cancel
Save