diff --git a/monstage/static/index.css b/monstage/static/index.css
new file mode 100644
index 0000000..40f5f27
--- /dev/null
+++ b/monstage/static/index.css
@@ -0,0 +1,14 @@
+@charset "utf-8";
+
+.entrer {
+ text-align:center;
+}
+
+.entrer a {
+ display:inline-block;
+ background:#4FB088;
+ color:#fff;
+ font-size:1.5em;
+ padding:8px;
+ border-radius:5px;
+}
\ No newline at end of file
diff --git a/monstage/static/style.css b/monstage/static/style.css
index 3c44181..a72aa93 100644
--- a/monstage/static/style.css
+++ b/monstage/static/style.css
@@ -4,6 +4,8 @@
body {
font: 18px 'Lato', sans-serif;
background:#4FB088;
+ padding:0;
+ margin:0;
}
a {
@@ -16,11 +18,46 @@ h1 {
margin-top:0;
}
+.beta {
+ font-size:0.5em;
+ display:inline-block;
+ transform:rotate(-20deg);
+ color:#aaa;
+}
+
+header {
+ background:#166142;
+ padding:10px;
+ margin:0;
+ overflow:hidden;
+}
+
+header li {
+ display:inline-block;
+}
+
+header h1 {
+ float:left;
+ color:#fff;
+}
+
+header li a {
+ display:inline-block;
+ padding:20px 10px;
+ margin:0 15px;
+}
+
+header ul {
+ float:right;
+ padding:0;
+ margin:0;
+}
+
#content {
width:80%;
max-width:700px;
padding:30px;
- margin:0 auto;
+ margin:20px auto;
background:#eee;
}
diff --git a/monstage/templates/monstage/home.html b/monstage/templates/monstage/home.html
new file mode 100644
index 0000000..d0a4173
--- /dev/null
+++ b/monstage/templates/monstage/home.html
@@ -0,0 +1,15 @@
+{% extends "skeleton.html" %}
+
+{% block content %}
+
Bonjour {{ user.first_name }} !
+ Modifier mon profil
+ Mes stages
+
+
+{% endblock %}
+
diff --git a/monstage/templates/monstage/index.html b/monstage/templates/monstage/index.html
index d0a4173..270a925 100644
--- a/monstage/templates/monstage/index.html
+++ b/monstage/templates/monstage/index.html
@@ -1,15 +1,22 @@
{% extends "skeleton.html" %}
+{% load staticfiles %}
-{% block content %}
- Bonjour {{ user.first_name }} !
- Modifier mon profil
- Mes stages
-
-
+{% block extra_head %}
+
+{% endblock %}
+
+{% block content %}
+ ExperiENSbeta
+ Partagez vos expériences de stages !
+
+
+
Ne partez plus en stage en terre inconnue : nourrissez-vous de l'expérience de {{ stats.num_stages }} stages effectués par la communauté normalienne et ne faites pas les mêmes erreurs !
+
+
+
Vous revenez du bout du monde (ou de la rue d'à côté) ? N'attendez plus, rédigez un avis sur votre stage pour nourrir que votre expérience profite à d'autres !
+
{% endblock %}
diff --git a/monstage/templates/monstage/search.html b/monstage/templates/monstage/search.html
new file mode 100644
index 0000000..96c9b23
--- /dev/null
+++ b/monstage/templates/monstage/search.html
@@ -0,0 +1,9 @@
+{% extends "skeleton.html" %}
+
+
+{% block content %}
+ Retour
+ Recherche
+ La recherche de stage n'est pas encore disponible. Elle devrait l'être à la rentrée 2015 !
+{% endblock %}
+
diff --git a/monstage/templates/skeleton.html b/monstage/templates/skeleton.html
index 40883d6..b33d567 100644
--- a/monstage/templates/skeleton.html
+++ b/monstage/templates/skeleton.html
@@ -9,6 +9,17 @@
+
+ ExperiENSbeta
+
+
+
+
+
{% block content %}{% endblock %}
diff --git a/monstage/urls.py b/monstage/urls.py
index d20b616..4a6126d 100644
--- a/monstage/urls.py
+++ b/monstage/urls.py
@@ -4,6 +4,7 @@ from monstage import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
+ url(r'^home/$', views.home, name='home'),
url(r'^profil/show/(?P\w+)/$', views.profil, name='profil'),
url(r'^profil/edit/$', views.profil_edit, name='profil_edit'),
url(r'^api/lieux/candidats/$', views.lieux_candidats, name='lieux_candidats'),
@@ -12,4 +13,5 @@ urlpatterns = patterns('',
url(r'^stage/(?P\d+)/edit/description/$', views.stage_edit_desc, name='stage_edit_desc'),
url(r'^stage/(?P\d+)/edit/lieu/$', views.stage_edit_lieu, name='stage_edit_lieu'),
url(r'^stage/(?P\d+)/edit/avis/$', views.stage_edit_feedback, name='stage_edit_feedback'),
+ url(r'^recherche/$', views.search, name='search'),
)
\ No newline at end of file
diff --git a/monstage/views.py b/monstage/views.py
index c47bf0f..4be5aa4 100644
--- a/monstage/views.py
+++ b/monstage/views.py
@@ -15,10 +15,14 @@ def addslashes(s):
d = {'"':'\\"', "'":"\\'", "\0":"\\\0", "\\":"\\\\", '\n':'\\n'}
return ''.join(d.get(c, c) for c in s)
-@login_required
def index(request):
- stages = Stage.objects.filter( profil_user = request.user.profil )
- return render(request, 'monstage/index.html', {"stages" : stages})
+ stats = { 'num_stages': Stage.objects.count() }
+ return render(request, 'monstage/index.html', {'stats': stats})
+
+@login_required
+def home(request):
+ stages = request.user.profil.stages.all()
+ return render(request, 'monstage/home.html', {"stages" : stages})
#
# Utilisateurs et profils
@@ -238,4 +242,12 @@ def stage_edit_feedback(request, stage_id):
def detail(request, question_id):
question = get_object_or_404(Question, pk=question_id)
- return render(request, 'monstage/detail.html', {'question': question})
\ No newline at end of file
+ return render(request, 'monstage/detail.html', {'question': question})
+
+
+#
+# Recherche de stages
+#
+
+def search(request):
+ return render(request, 'monstage/search.html')
\ No newline at end of file