error pages templates (#6978)

This commit is contained in:
Serghei Mihai 2015-04-20 17:40:10 +02:00
parent 9df7e59714
commit 1720a02564
4 changed files with 18 additions and 166 deletions

9
templates/404.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% load combo %}
{% block title %}Page inexistante {% endblock %}
{% block content %}
<div id="error-404">
<h2>Page inexistante</h2>
<p>La page <tt>{{ request_path }}</tt> n'existe pas. Souhaitez-vous revenir à <a href="/">l'accueil</a> ?</p>
</div>
{% endblock %}

9
templates/500.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% load combo %}
{% block title %}Erreur système{% endblock %}
{% block content %}
<div id="error-500">
<h2>Erreur système</h2>
<p>Une erreur système est survenue, les administrateurs du site en ont été prévenus. Souhaitez-vous revenir à <a href="/">l'accueil</a> ?</p>
</div>
{% endblock %}

View File

@ -1,80 +0,0 @@
{% load menu_tags cms_tags sekizai_tags i18n %}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="content-language" content="fr" />
<title>Compte Citoyen :: Montpellier Méditerranée Métropole :: {% page_attribute "page_title" %}</title>
<link rel="shortcut icon" href="/static/themes/django-montpellier/favicon.png">
<link rel="stylesheet" type="text/css" href="/static/themes/django-montpellier/style.css">
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,700italic,400italic|Carme|Arvo' rel='stylesheet' type='text/css'>
{% render_block "css" %}
</head>
<body {% block bodyargs %}{% endblock %}>
{% cms_toolbar %}
<div id="page">
<div id="header">
<div id="top">
<a href="/" accesskey="1"><img src="/static/themes/django-montpellier/logo.png"
title="Montpellier Méditerranée Métropole" /></a>
<div class="region-header">
{% if user.is_authenticated %}
<div id="toplinks">
<span><a class="logout" href="{% url 'account_logout' %}">{% trans "Logout" %}</a>
</span>
</div>
<div id="username">{{ user.first_name }} {{ user.last_name }}</div>
{% endif %}
</div>
</div>
{% block messages %}
{% if messages %}
<div id="messages">
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
</div> <!-- header -->
<div id="main-content-wrapper">
{% block title %}{% endblock %}
{% block menu %}
<div id="menu">
<ul><li><a href="{{ site_agglo_montpellier_url }}">Ma métropole</a></li
>{% show_menu_below_id "top-page" 0 100 100 100 %}</ul>
</div>
{% endblock %}
<div id="main-content">
<div id="content">
{% block content %}
<div id="error-404">
<h2>Page inexistante</h2>
<p>La page <tt>{{ request_path}}</tt> n'existe pas. Souhaitez-vous revenir à <a href="/">l'accueil</a> ?</p>
</div>
{% endblock %}
</div> <!-- #content -->
</div> <!-- #main-content -->
</div> <!-- #main-content-wrapper -->
<div id="footer">
<!-- p id="bottom-links">
{% show_menu_below_id "menu-du-bas" %}
{% if request.user.is_staff %}
<a href="/admin">Administration</a>
{% endif %}
</p -->
<p id="legal">Copyright © 2006-2013 Entr'ouvert</p>
</div>
</div>
{% render_block "js" %}
<script>
function toTitleCase(str)
{
return str.replace(/\w\S*/g,
function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
</script>
</body>
</html>

View File

@ -1,86 +0,0 @@
{% load menu_tags cms_tags sekizai_tags i18n %}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="content-language" content="fr" />
<title>Compte Citoyen :: Montpellier Méditerranée Métropole :: {% page_attribute "page_title" %}</title>
<link rel="shortcut icon" href="/static/themes/django-montpellier/favicon.png">
<link rel="stylesheet" type="text/css" href="/static/themes/django-montpellier/style.css">
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,700italic,400italic|Carme|Arvo' rel='stylesheet' type='text/css'>
{% render_block "css" %}
</head>
<body {% block bodyargs %}{% endblock %}>
{% cms_toolbar %}
<div id="page">
<div id="header">
<div id="top">
<a href="/" accesskey="1"><img src="/static/themes/django-montpellier/logo.png"
title="Montpellier Méditerranée Métropole" /></a>
<div class="region-header">
{% if user.is_authenticated %}
<div id="toplinks">
<span><a class="logout" href="{% url 'account_logout' %}">{% trans "Logout" %}</a>
</span>
</div>
<div id="username">{{ user.first_name }} {{ user.last_name }}</div>
{% endif %}
</div>
</div>
{% block messages %}
{% if messages %}
<div id="messages">
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
</div> <!-- header -->
<div id="main-content-wrapper">
{% block title %}{% endblock %}
{% block menu %}
<div id="menu">
<ul><li><a href={{ site_agglo_montpellier_url }}>Ma métropole</a></li
>{% show_menu_below_id "top-page" 0 100 100 100 %}</ul>
</div>
{% endblock %}
<div id="main-content">
<div id="content">
{% block content %}
<div id="error-404">
<h2>Erreur système</h2>
<p>Une erreur système est survenue, les administrateurs du site en ont été prévenus. Souhaitez-vous revenir à <a href="/">l'accueil</a> ?</p>
</div>
{% endblock %}
</div> <!-- #content -->
</div> <!-- #main-content -->
</div> <!-- #main-content-wrapper -->
<div id="footer">
<!-- p id="bottom-links">
{% show_menu_below_id "menu-du-bas" %}
{% if request.user.is_staff %}
<a href="/admin">Administration</a>
{% endif %}
</p -->
<p id="legal">Copyright © 2006-2013 Entr'ouvert</p>
</div>
</div>
{% render_block "js" %}
<script>
function toTitleCase(str)
{
return str.replace(/\w\S*/g,
function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
$('#commune-selector').live('change',
function () {
var value = $(this).val();
$('#futurs-demarches').toggleClass('selected', value != 'none');
$('#futurs-demarches').text('Ici bientôt les e-services de la commune de ' + toTitleCase(value));
});
</script>
</body>
</html>