--- /dev/null
+# -*- encoding: utf-8 -*-
+from django.db import models
+from django.contrib import admin
+
+from models import *
+
+admin.site.register(Chercheur)
+admin.site.register(Publication)
+admin.site.register(Groupe)
+
from models import Site
def index(request):
- sites = Site.objects.all()
+ sites = Site.objects.all().order_by('titre')
variables = { 'sites': sites,
}
return render_to_response ("sites/index.html", \
{% extends "container_base.html" %}
{% block contenu %}
-<h4>Sites</h4>
+<h4>Sitothèque</h4>
<div class="contenu-wrapper">
-<p>
-Voici les sites répertoriés.
-</p>
+<table id="repertoire">
+ <tr>
+ <th>Nom</th>
+ <th></th>
+ </tr>
+{% for s in sites %}
+ <tr class="{% cycle 'odd' 'notodd' %}">
+ <td><a href="{% url sitotheque.views.retrieve s.id %}">{{ s }}</a></td>
+ <td><a href="{{s.url}}"><img src="/media/img/page_white_link.png" /></a></td>
+ </tr>
+{% endfor %}
+</table>
</div>
{% endblock %}
<h4>{{ site }}</h4>
<div class="contenu-wrapper">
-<p>
-Voici la fiche site de {{ site }}.
-</p>
+ <a href="{{site.url}}">{{site.url}}</a>
+ <br />
+ <p>{{site.description}}</p>
+
+ <table>
+ <tr>
+ <td><strong>Type:</strong></td>
+ <td>{{site.type}}</td>
+ </tr>
+ <tr>
+ <td><strong>Éditeur:</strong></td>
+ <td>{{site.editeur}}</td>
+ </tr>
+ <tr>
+ <td><strong>Auteur:</strong></td>
+ <td>{{site.auteur}}</td>
+ </tr>
+ <tr>
+ <td><strong>Mots-clés:</strong></td>
+ <td>{{site.mots_cles}}</td>
+ </tr>
+ <tr>
+ <td><strong>Date de publication:</strong></td>
+ <td>{{site.date_publication|default:"-"}}</td>
+ </tr>
+ <tr>
+ <td><strong>Disciplines:</strong></td>
+ <td>{{ site.discipline.all|join:", " }}</td>
+ </tr>
+ <tr>
+ <td><strong>Thématiques:</strong></td>
+ <td>{{ site.thematique.all|join:", " }}</td>
+ </tr>
+ </table>
</div>
{% endblock %}