fancy error pages
authorMaciej Tronowski <mtro@man.poznan.pl>
Tue, 5 May 2015 14:30:51 +0000 (16:30 +0200)
committerMaciej Tronowski <mtro@man.poznan.pl>
Tue, 5 May 2015 14:30:51 +0000 (16:30 +0200)
qcg/templates/400.html [new file with mode: 0644]
qcg/templates/403.html [new file with mode: 0644]
qcg/templates/404.html [new file with mode: 0644]
qcg/templates/500.html [new file with mode: 0644]
qcg/templates/qcg/error_page.html [new file with mode: 0644]

diff --git a/qcg/templates/400.html b/qcg/templates/400.html
new file mode 100644 (file)
index 0000000..44ceec7
--- /dev/null
@@ -0,0 +1,4 @@
+{% extends 'qcg/error_page.html' %}
+
+{% block title %}Nieprawidłowe żądanie{% endblock %}
+{% block details %}Żądanie nie może zostać obsłużone przez serwer.{% endblock %}
diff --git a/qcg/templates/403.html b/qcg/templates/403.html
new file mode 100644 (file)
index 0000000..9aed16d
--- /dev/null
@@ -0,0 +1,4 @@
+{% extends 'qcg/error_page.html' %}
+
+{% block title %}Brak uprawnień{% endblock %}
+{% block details %}Użytkownik nie posiada wystarczających uprawnień do wykonania żądanej operacji.{% endblock %}
diff --git a/qcg/templates/404.html b/qcg/templates/404.html
new file mode 100644 (file)
index 0000000..d8ba4f9
--- /dev/null
@@ -0,0 +1,4 @@
+{% extends 'qcg/error_page.html' %}
+
+{% block title %}Nie znaleziono strony{% endblock %}
+{% block details %}Nie znaleziono strony o adresie <code>{{ request_path }}</code>{% endblock %}
diff --git a/qcg/templates/500.html b/qcg/templates/500.html
new file mode 100644 (file)
index 0000000..4b01627
--- /dev/null
@@ -0,0 +1,4 @@
+{% extends 'qcg/error_page.html' %}
+
+{% block title %}Błąd serwera{% endblock %}
+{% block details %}Serwer napotkał niespodziewane trudności, które uniemożliwiły zrealizowanie żądania.{% endblock %}
diff --git a/qcg/templates/qcg/error_page.html b/qcg/templates/qcg/error_page.html
new file mode 100644 (file)
index 0000000..d3b13a0
--- /dev/null
@@ -0,0 +1,11 @@
+{% extends 'qcg/base.html' %}
+
+{% block container %}
+    <h1 class="page-header">{% block title %}Błąd{% endblock %}</h1>
+    <div class="alert alert-danger" style="font-size: 16px">
+        <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+        {% block details %}{% endblock %}
+    </div>
+
+    <button type="button" class="btn btn-primary" onclick="history.back()">Powrót</button>
+{% endblock %}