groupes = models.ManyToManyField('Groupe', through='ChercheurGroupe')
actif = models.BooleanField(editable = False)
+ def __unicode__(self):
+ return u"%s %s" % (self.personne.nom.upper(), self.personne.prenom)
+
class Groupe(models.Model):
id = models.AutoField(primary_key=True, db_column='id')
-# Create your views here.
+# -*- encoding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template import Context, RequestContext
from forms import *
from auf_references_client.models import Discipline, TypeImplantation
from models import Personne
+def repertoire(request):
+ """Mock up du répertoire"""
+ chercheurs = Chercheur.objects.all()
+ variables = { 'chercheurs': chercheurs,
+ }
+ return render_to_response ("chercheurs/repertoire.html", \
+ Context (variables),
+ context_instance = RequestContext(request))
+
def inscription(request):
if request.method == 'POST':
personne_form = PersonneForm (request.POST, prefix="personne")
return render_to_response ("chercheurs/inscription.html", \
Context (variables),
context_instance = RequestContext(request))
+
+def perso(request, ID):
+ """Mock up de l'espace perso"""
+ chercheur = None #Chercheur.objects.get(id=id)
+ variables = { 'chercheur': chercheur,
+ }
+ return render_to_response ("chercheurs/perso.html", \
+ Context (variables),
+ context_instance = RequestContext(request))
- /*===========================================*/
- /* -- Feuille de styles - GLOBAL */
-/*-- Par Erick chez http://www.ixmedia.com /
--- Date de creation: 2009-05-11 /
-Modification: 2009-05-14 [Erick] /
-========================================== /
-
- /*============================ /
- / -- COULEURS -- /
-/ ============================ /
+/*
+Feuille de styles - GLOBAL
+Par Erick chez http://www.ixmedia.com
+Date de creation: 2009-05-11
+Modification: 2009-05-14 [Erick]
+*/
+
+/* COULEURS
+
TXT -----------> #3a3125 et #000
LINK ----------> #97012c
-LIGNES grises -> #e0e0e0 et #d5d5d5 */
+LIGNES grises -> #e0e0e0 et #d5d5d5
+*/
+
+/* RESET */
- /*============================*/
- /* -- RESET -- */
-/*============================*/
@import url("reset.css");
- /*============================*/
- /* -- GENERAL -- */
-/*============================*/
+/* General */
+
html {height:100%;}
-body{ height:100%; font-size: 62.5%; /* <- 1em equivaut 10px */ line-height:1.4; color:#3a3125; background:#fff url(../img/background-body.jpg) repeat-y 50% 0; font-family: Verdana, Arial, Sans-Serif; text-align: center;}
+body { height:100%; font-size: 62.5%; /* <- 1em equivaut 10px */ line-height:1.4; color:#3a3125; background:#fff url(../img/background-body.jpg) repeat-y 50% 0; font-family: Verdana, Arial, Sans-Serif; text-align: center;}
a, a:active {text-decoration:underline;color:#97012c;}
-a:visited{color:#97012c;}
-a:hover{color:#97012c;}
-a img{border: none;}
-abbr, acronym{border-bottom:.1em dotted;cursor:help;}
+a:visited {color:#97012c;}
+a:hover {color:#97012c;}
+a img {border: none;}
+abbr, acronym {border-bottom:.1em dotted;cursor:help;}
+
h1{font-size:1em;margin:0 0 1em 0;}
h2{font-size:1em;margin:0 0 1em 0;}
h3{font-size:1em;margin:0 0 1em 0;}
h4{font-size:1em;margin:0 0 1em 0;}
h5{font-size:1em;margin:0 0 1em 0;}
h6{font-size:1em;margin:0 0 1em 0;}
+
em{font-style:italic;}
strong{font-weight:bold;}
p{margin:0 0 1em 0;}
dt{margin:0.5em 0 0;}
dd{margin:0.25em 0 0.5em 2.5em;}
sup{font-size: smaller; vertical-align: 0.5em; line-height: 1px;}
+
+.box { padding:0 0 20px 0; }
.lbl {color: #97012c; }
#fond {padding:0; margin:0; display:block; position:relative; width:100%; height:auto !important; height:100%; min-height:100%; background: url(../img/background-fond.jpg) no-repeat 50% 0; text-align:left;}
div.boite-recherche p a { color:#3a3125;}
div.boite-recherche p a:hover { color:#97012c; text-decoration:none;}
-#contenu { width:744px; margin:0; padding:0; margin-top:100px; margin-bottom:50px; margin-left:0; display:inline; float:left;background:url(../img/contenu-bkg-middle.png) repeat-y 0 0;}
+#contenu { width:744px; margin:100px 0px 50px 0px; padding:0; display:inline; float:left;background:url(../img/contenu-bkg-middle.png) repeat-y 0 0; }
#tabs { margin-left: 8px; margin-right: 8px; }
-#contenu h4 {padding: 0 25px; margin-bottom:1.2em; font-size:2.2em; font-weight:normal; letter-spacing:-1px;}
+#contenu h4 { padding: 0 25px; margin-bottom:0.4em; font-size:2.2em; font-weight:normal; letter-spacing:-1px; }
#contenu .zone-texte {padding: 0 25px; font-size: 1.2em; min-height: 375px;}
#contenu .zone-texte ul li {list-style: disc; margin: 0 0 .25em;}
#contenu .zone-texte ol li {list-style: decimal; margin: 0 0 .25em;}
#contenu .zone-texte h3 {font-size: 1.1em;}
#contenu .zone-texte blockquote {margin: 0 2em 1em; font-style: italic;}
-
-
#contenu img.top, .resultats img.top { height:10px; position:relative; top:-10px; left:0;}
#contenu img.bottom, .resultats img.bottom{ height:10px; position:relative; bottom:-10px; left:0;}
#contenu .demi-gauche { width:361px; margin-left:12px; background-color:#f5f5f5; float:left;}
+#contenu .demi-droite { width:358px; margin-right:12px; float:right;}
#contenu .demi-gauche img.top { height:9px; position:relative; top:-9px;}
#contenu .demi-gauche img.bottom { height:9px; position:relative; bottom:-9px;}
-#contenu .demi-droite { width:358px; margin-top:8px; margin-right:12px;float:right;}
#calendar-links { padding: 0 25px; }
#calendar-links p { margin: 0px; }
+ul a { text-decoration:none; }
+ul a:hover { text-decoration:underline; }
+
ul.liste-de-l-accueil { padding:0 2.5em 0 0;}
-ul.liste-de-l-accueil li { margin:1em 0; padding-bottom:1.1em;border-bottom:2px solid #d5d5d5;}
-ul.liste-de-l-accueil a:hover { text-decoration:underline;}
+ul.liste-de-l-accueil li { margin:1em 0; padding-top:1.1em; border-top:2px solid #d5d5d5;}
ul.liste-de-l-accueil img { float: left; margin: 0 1em 5px 0; max-width: 75px;}
ul.liste-de-l-accueil span { display:block;}
ul.liste-de-l-accueil .la-date {font-size:1.1em;}
ul.liste-de-l-accueil .le-titre {display: block; font-size:1.2em; font-weight:bold; margin: .25em 0;}
ul.liste-de-l-accueil .le-resume {font-size:1.1em;}
ul.liste-de-l-accueil .le-resume a { display:inline;}
+ul.sous-menu li { display:inline; padding:0px 10px 0px 0px; font-size: 1.1em; }
.resultats { width:744px; display:inline; margin:0; padding:0; float:left; margin-top:100px; margin-bottom:50px; margin-left:0; background:url(../img/contenu-bkg-middle.png) repeat-y 0 0;}
.resultats a:hover{text-decoration:none;}
#col-droite ul li a:hover { cursor:pointer; text-decoration:underline; }
#col-droite ul li.actif a { color:#97012c; font-weight:bold; }
- /*============================*/
- /* -- D I V E R S -- */
-/*============================*/
+/* Divers */
+
.clear { clear:both!important; display:block!important; width:0!important; height:0!important; margin:0!important; padding:0!important; visibility:hidden!important;}
.clear-droite { clear:right!important; display:block!important; width:0!important; height:0!important; margin:0!important; padding:0!important; visibility:hidden!important;}
- /*============================*/
- /* -- Clearfix -- */
-/*============================*/
+
+/* Clearfix */
+
.clearfix {display: inline-block; }
.clearfix:after, .container:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}
* html .clearfix { height: 1%; }
import backend_config
from forms import *
from models import *
+from chercheurs.models import Chercheur
def index (request):
articles = Actualite.objects.filter (visible = '1', date__gt = oldest)
articles = articles[0:configuration['accueil_actualite']]
events = evenements()[0:configuration['accueil_evenement']]
+ chercheurs = Chercheur.objects.all().order_by('?')[:5]
return render_to_response ("savoirs/index.html", \
Context ({"articles": articles,
"events": events,
- "caldav_url": configuration['calendrier_publique']}), \
+ "caldav_url": configuration['calendrier_publique'],
+ "chercheurs":chercheurs,
+ }), \
context_instance = RequestContext(request))
def recherche (request):
--- /dev/null
+{% extends "container_base.html" %}
+
+{% block contenu %}
+<h4>Espace chercheur</h4>
+
+<p>
+Bonjour {{ chercheur }}, vous êtes dans votre espace personnel.
+</p>
+
+{% endblock %}
--- /dev/null
+{% extends "container_base.html" %}
+
+{% block contenu %}
+<h4>Chercheurs</h4>
+
+<ul>
+{% for chercheur in chercheurs %}
+ <li><a href="">{{ chercheur }}</a></li>
+{% endfor %}
+</ul>
+
+{% endblock %}
</p>
</div>
</div>
+
<div id="contenu" class="clearfix">
<img src="{{ MEDIA_URL }}img/contenu-bkg-top.png" width="744" height="10" alt="top" align="top" class="top" />
-
<div class="clearfix">
{% block contenu %}
{% endblock %}
{% block contenu %}
<div class="demi-gauche clearfix">
- <h4>Actualités</h4>
+ <div class="box">
+ <h4>Actualités</h4>
- <ul class="liste-de-l-accueil">
- <!-- dans la vue, cloner avoirListeActualitesAccueil -->
- {% for article in articles %}
- <li class="clearfix">
- {% if article.logo %}
- <a href="{{ article.url }}"><img src="{{ article.logo }}" alt="{{ article.titre }}" /></a>
- {% endif %}
- <span class="la-date">{{ article.date|date:"d F Y" }}</span>
- <a href="{{ article.url }}" class="le-titre">{{ article.titre }}</a>
- <span class="le-resume">{{ article.texte }} - <a href="{{ article.url }}">Lire</a></span>
- </li>
- {% endfor %}
- </ul>
+ <ul class="liste-de-l-accueil">
+ {% comment %}<!-- dans la vue, cloner avoirListeActualitesAccueil -->{% endcomment %}
+ {% for article in articles %}
+ <li class="clearfix">
+ {% if article.logo %}
+ <a href="{{ article.url }}"><img src="{{ article.logo }}" alt="{{ article.titre }}" /></a>
+ {% endif %}
+ <span class="la-date">{{ article.date|date:"d F Y" }}</span>
+ <a href="{{ article.url }}" class="le-titre">{{ article.titre }}</a>
+ {% comment %}
+ <span class="le-resume">{{ article.texte }} - <a href="{{ article.url }}">Lire</a></span>
+ {% endcomment %}
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ <div class="box">
+ <h4>Chercheurs</h4>
+ <ul class="sous-menu">
+ <li><a href="{% url chercheurs.views.repertoire %}">Répertoire</a></li>
+ <li><a href="{% url chercheurs.views.inscription %}">Inscription</a></li>
+ <li><a href="">Espace chercheur</a></li>
+ </ul>
+ <ul class="liste-de-l-accueil">
+ {% for chercheur in chercheurs %}
+ <li class="clearfix">
+ <a href="" class="le-titre">{{ chercheur }}</a>
+ <span class="la-date">Disciplines : {{ chercheur.discipline }}</span>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
</div>
<div class="demi-droite clearfix">
- <h4>Agenda</h4>
- <ul class="liste-de-l-accueil">
- {% for event in events %}
- <li>
- <span class="la-date">{{ event.dtstart.value|date:"Y-m-d" }}
- {{ event.dtstart.value|date:"H:i" }}</span>
- <a href="{% url savoirs.views.evenement event.uid.value %}"
- class="le-titre">{{ event.summary.value }}</a>
- <span class="le-resume">{{ event.description.value }}</span>
- </li>
- {% endfor %}
- </ul>
- <div id="calendar-links">
- <p>- <a href="{% url savoirs.views.evenement_ajout %}">Soumettre un événement</a></p>
- <p>- <a href="{{ caldav_url }}">S'abonner</a></p>
- {% if user.is_authenticated %}
- <p>- <a href="{% url savoirs.views.evenement_moderation %}">Modération</a></p>
- {% endif %}
- </div>
+ <div class="box">
+ <h4>Agenda</h4>
+ <ul class="sous-menu">
+ <li><a href="{% url savoirs.views.evenement_ajout %}">Soumettre un événement</a></li>
+ <li><a href="{{ caldav_url }}">S'abonner</a></li>
+ {% if user.is_authenticated %}
+ <li><a href="{% url savoirs.views.evenement_moderation %}">Modération</a></li>
+ {% endif %}
+ </ul>
+ <ul class="liste-de-l-accueil">
+ {% for event in events %}
+ <li>
+ <span class="la-date">{{ event.dtstart.value|date:"Y-m-d" }}
+ {{ event.dtstart.value|date:"H:i" }}</span>
+ <a href="{% url savoirs.views.evenement event.uid.value %}"
+ class="le-titre">{{ event.summary.value }}</a>
+ <span class="le-resume">{{ event.description.value }}</span>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
</div>
{% endblock %}
(r'^json/set/$', 'savoirs.views.json_set'),
(r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
+ (r'^chercheurs/repertoire/$', 'chercheurs.views.repertoire'),
+ (r'^espace/chercheur/(?P<id>\d+)/$', 'chercheurs.views.perso'),
)
if settings.DEBUG: