class ChercheurForm(forms.ModelForm):
class Meta:
model = Chercheur
- fields = ('nationalite', 'groupes')
+ fields = ('groupes',)
class PublicationForm(forms.ModelForm):
class Meta:
model = Publication
+ fields = ('titre', 'annee', 'revue', 'editeur', 'lieu_edition', 'nb_pages', 'url')
class EtablissementForm(forms.ModelForm):
class Meta:
lieu_edition = models.CharField(max_length=255, db_column='lieu_edition', null=True, blank=True, verbose_name = 'Lieu d\'édition')
nb_pages = models.CharField(max_length=255, db_column='nb_pages', null=True, blank=True, verbose_name = 'Nombre de pages')
url = models.CharField(max_length=255, db_column='url', null=True, blank=True, verbose_name = 'Lien vers la publication')
+ #Migration des publications depuis l'ancien repertoire de chercheurs
+ publication_affichage = models.TextField(verbose_name = 'Publication', null = True,
+ blank = True)
actif = models.BooleanField(editable = False, db_column='actif')
class Groupe(models.Model):
if simpleForm.is_valid ():
pays = simpleForm.cleaned_data["pays"]
if pays:
- list = list.filter (pays = pays.pk)
+ list = list.filter (nationalite = pays.pk)
fonction = simpleForm.cleaned_data["fonction"]
if fonction:
list = list.filter (fonction = fonction)
discipline_form = DisciplineForm (request.POST, prefix="discipline", instance=c)
if etablissement_form.is_valid() and discipline_form.is_valid():
- if publication1_form.is_valid():
+ if publication1_form.is_valid() and publication1_form.cleaned_data['titre']:
pub = publication1_form.save()
c.publication1 = pub
- if publication2_form.is_valid():
+ if publication2_form.is_valid() and publication2_form.cleaned_data['titre']:
pub = publication2_form.save()
c.publication2 = pub
- if publication3_form.is_valid():
+ if publication3_form.is_valid() and publication3_form.cleaned_data['titre']:
pub = publication3_form.save()
c.publication3 = pub
- if publication4_form.is_valid():
+ if publication4_form.is_valid() and publication4_form.cleaned_data['titre']:
pub = publication4_form.save()
c.publication4 = pub
etablissement_form.save(commit=False)
#actualites {position: relative;}
#rss-actualites {position: absolute; right: 26px; top: 10px;}
+
+form {padding-right:20px}
+
+form fieldset {
+ clear: both;
+ font-size: 100%;
+ border-color: #000000;
+ border-width: 1px 0 0 0;
+ border-style: solid none none none;
+ padding: 10px;
+ margin: 0 0 0 0;
+}
+
+form fieldset legend {
+ font-size: 150%;
+ font-weight: bold;
+ color: #000000;
+ margin: 0 0 0 0;
+ padding: 0 5px;
+}
+
+label {
+ font-size: 12px;
+}
+td
+{
+vertical-align:middle;
+}
+
+.infotip
+{
+width:300px;
+margin-top:5px;
+border:1px solid #CCC;
+background:#EEE;
+float:right;
+}
+.publication
+{
+
+}
{% extends "container_base.html" %}
{% block contenu %}
-<h4>Inscription</h4>
+<h4>Inscription au répertoire de chercheurs</h4>
<div class="contenu-wrapper">
<form method="post">
- <h5>Informations personnelles</h5>
- {% with personne_form as form %}
- {% include "table_form.html" %}
- {% endwith %}
-
- <h5>Informations académiques</h5>
- {% with chercheur_form as form %}
- {% include "table_form.html" %}
- {% endwith %}
-
- <h5>Etablissement de rattachement</h5>
- {% with etablissement_form as form %}
- {% include "table_form.html" %}
- {% endwith %}
- <p>Si l'établissement n'existe pas ci-dessus</p>
- {% with etablissement_autre_form as form %}
- {% include "table_form.html" %}
- {% endwith %}
-
- <h5>Champ disciplinaire, thèmes de recherche</h5>
- {% with discipline_form as form %}
- {% include "table_form.html" %}
- {% endwith %}
-
- <h5>Publications</h5>
- {% with publication1_form as form %}
- {% include "table_form.html" %}
- {% endwith %}
+ <fieldset>
+ <legend>Informations personnelles</legend>
+ {% with personne_form as form %}
+ {% include "table_form.html" %}
+ {% endwith %}
+ </fieldset>
- <p id="show_publications">Autres publications</p>
+ <fieldset>
+ <legend>Informations académiques</legend>
+ {% with chercheur_form as form %}
+ {% include "table_form.html" %}
+ {% endwith %}
+ </fieldset>
- <div class="publications_autre">
- <h6>Publication 2</h6>
- {% with publication2_form as form %}
+ <fieldset>
+ <legend>Etablissement de rattachement</legend>
+ {% with etablissement_form as form %}
{% include "table_form.html" %}
- {% endwith %}
- <h6>Publication 3</h6>
- {% with publication3_form as form %}
+ {% endwith %}
+ <p>Si l'établissement n'existe pas ci-dessus</p>
+ {% with etablissement_autre_form as form %}
{% include "table_form.html" %}
- {% endwith %}
- <h6>Publication 4</h6>
- {% with publication4_form as form %}
+ {% endwith %}
+ </fieldset>
+
+ <fieldset>
+ <legend>Champ disciplinaire, thèmes de recherche</legend>
+ {% with discipline_form as form %}
{% include "table_form.html" %}
{% endwith %}
- </div>
+ </fieldset>
+
+ <fieldset>
+ <legend>Publications</legend>
+ <div>
+ <!--<div class="infotip">
+ <strong>Renseignements préalablements enregistrés</strong>
+ <p>{{publication1_form.publication1.publication_affichage}}</p>
+ </div>-->
+ <div class="publication">
+ {% with publication1_form as form %}
+ {% include "table_form.html" %}
+ {% endwith %}
+ </div>
+ <div style="clear:both"></div>
+ </div>
+ <p id="show_publications">+ Autres publications</p>
+ <div class="publications_autre">
+ <h6>- Publication 2</h6>
+ {% with publication2_form as form %}
+ {% include "table_form.html" %}
+ {% endwith %}
+ <h6>- Publication 3</h6>
+ {% with publication3_form as form %}
+ {% include "table_form.html" %}
+ {% endwith %}
+ <h6>- Publication 4</h6>
+ {% with publication4_form as form %}
+ {% include "table_form.html" %}
+ {% endwith %}
+ </div>
+ </fieldset>
<br />
<input type="submit" name="Submit" value="Inscription" class="bouton" />
</form>
{% for chercheur in chercheurs %}
<tr class="{% cycle 'odd' 'notodd' %}">
<td><a href="{% url chercheurs.views.retrieve chercheur.id %}">{{ chercheur }}</a></td>
- <td>{{ chercheur.etablissement }}</td>
- <td>{{ chercheur.pays }}</td>
+ <td>{% firstof chercheur.etablissement chercheur.etablissement_autre_nom %}</td>
+ <td>{% firstof chercheur.etablissement.pays chercheur.etablissement_autre_pays %}</td>
</tr>
{% endfor %}
</table>
<p>{{chercheur.personne.courriel}}</p>
<h5>Information générales</h5>
<table>
- <tr>
+ <tr class="odd">
<td>Nationalité</td>
- <td>{{chercheur.pays.nom}}</td>
+ <td>{{chercheur.nationalite.nom}}</td>
</tr>
<tr>
<td>Fonction :</td>
<td>{{chercheur.fonction}}</td>
</tr>
- <tr>
+ <tr class="odd">
<td>Diplôme :</td>
- <td>{{chercheur.scolarite}}</td>
+ <td>{{chercheur.diplome}}</td>
</tr>
</table>
<h5>Établissement de rattachement</h5>
<table>
- <tr>
+ <tr class="odd">
<td>Localisation</td>
<td>{{chercheur.etablissement.pays}}</td>
</tr>
<h5>Champ disciplinaire, thèmes de recherche et publications</h5>
<table>
+ <tr class="odd">
+ <td>Thèmes de recherche et domaine d'expertise</td>
+ <td>{{chercheur.expertise}}</td>
+ </tr>
<tr>
+ <td>Adresse site Internet personnel</td>
+ <td>{%if chercheur.url_site_web %}<a href="{{chercheur.url_site_web}}">{{chercheur.url_site_web}}</a>{% endif %}</td>
+ </tr>
+ <tr class="odd">
<td>Publication 1</td>
- <td>{{chercheur.publication1}}</td>
+ <td>{{chercheur.publication1.publication_affichage}}</td>
</tr>
<tr>
<td>Publication 2</td>
- <td>{{chercheur.publication2}}</td>
+ <td>{{chercheur.publication2.publication_affichage}}</td>
</tr>
- <tr>
+ <tr class="odd">
<td>Publication 3</td>
- <td>{{chercheur.publication3}}</td>
+ <td>{{chercheur.publication3.publication_affichage}}</td>
</tr>
</table>
+<h5>Domaines de recherche</h5>
+<p>Adhésion active</p>
+<ul>
+{% for g in chercheur.chercheurgroupe_set.all %}
+<li>{{g.groupe.nom}}</li>
+{% endfor %}
+</ul>
+
</div>
{% endblock %}