First commit
This commit is contained in:
commit
dc05952f76
46 changed files with 1752 additions and 0 deletions
0
cms/__init__.py
Normal file
0
cms/__init__.py
Normal file
40
cms/admin.py
Normal file
40
cms/admin.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
from django.contrib import admin
|
||||
from .models import (Enseignant, Domaine, Competence, SousCompetence, Objectif,
|
||||
Ressource, Module, Processus)
|
||||
from django.forms.widgets import Widget
|
||||
from django.forms import widgets
|
||||
# Register your models here.
|
||||
|
||||
class SousCompetenceInline(admin.TabularInline):
|
||||
model = SousCompetence
|
||||
extra = 0
|
||||
|
||||
class CompetenceInline(admin.TabularInline):
|
||||
model = Competence
|
||||
extra=0
|
||||
#template ='templates/admin/cms/processus/edit_inline/tabular.html'
|
||||
|
||||
|
||||
class ModuleAdmin(admin.ModelAdmin):
|
||||
inlines = [CompetenceInline,]
|
||||
extra = 0
|
||||
|
||||
|
||||
class ProcessusAdmin(admin.ModelAdmin):
|
||||
inlines = (CompetenceInline,)
|
||||
|
||||
class CompetenceAdmin(admin.ModelAdmin):
|
||||
inlines = (SousCompetenceInline,)
|
||||
|
||||
class RessourceAdmin(admin.ModelAdmin):
|
||||
pass
|
||||
|
||||
|
||||
admin.site.register(Enseignant)
|
||||
admin.site.register(Domaine)
|
||||
admin.site.register(Competence, CompetenceAdmin)
|
||||
admin.site.register(SousCompetence)
|
||||
admin.site.register(Objectif)
|
||||
admin.site.register(Ressource)
|
||||
admin.site.register(Module)
|
||||
admin.site.register(Processus, ProcessusAdmin)
|
||||
5
cms/apps.py
Normal file
5
cms/apps.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class EvalConfig(AppConfig):
|
||||
name = 'cms'
|
||||
12
cms/forms.py
Normal file
12
cms/forms.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
'''
|
||||
Created on 17 nov. 2012
|
||||
|
||||
@author: alzo
|
||||
'''
|
||||
|
||||
from django import forms
|
||||
|
||||
class DocumentForm(forms.Form):
|
||||
docfile = forms.FileField(label='Selectionner un fichier',
|
||||
help_text='Taille max.: 42 megabytes')
|
||||
110
cms/migrations/0001_initial.py
Normal file
110
cms/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-24 09:06
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Competence',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('code', models.CharField(blank=True, max_length=20)),
|
||||
('libelle', models.CharField(max_length=200)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Domaine',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('code', models.CharField(blank=True, max_length=20)),
|
||||
('libelle', models.CharField(max_length=200)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Enseignant',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('sigle', models.CharField(blank=True, default='', max_length=5)),
|
||||
('nom', models.CharField(blank=True, default='', max_length=20)),
|
||||
('prenom', models.CharField(blank=True, default='', max_length=20)),
|
||||
('email', models.EmailField(blank=True, default='', max_length=254)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Module',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('code', models.CharField(default='Code', max_length=10)),
|
||||
('nom', models.CharField(default='Nom du module', max_length=30)),
|
||||
('type', models.CharField(choices=[('Spécifique', 'spécifique'), ('Transversal', 'transversal')], max_length=20)),
|
||||
('situation', models.TextField()),
|
||||
('evaluation', models.TextField()),
|
||||
('contenu', models.TextField()),
|
||||
('periode_presentiel', models.IntegerField()),
|
||||
('travail_perso', models.IntegerField()),
|
||||
('sem1', models.IntegerField(default=0)),
|
||||
('sem2', models.IntegerField(default=0)),
|
||||
('sem3', models.IntegerField(default=0)),
|
||||
('sem4', models.IntegerField(default=0)),
|
||||
('sem5', models.IntegerField(default=0)),
|
||||
('sem6', models.IntegerField(default=0)),
|
||||
('semestre', models.CharField(default='', max_length=15)),
|
||||
('competences', models.ManyToManyField(to='cms.Competence')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Objectif',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('libelle', models.CharField(max_length=200)),
|
||||
('type', models.CharField(choices=[('Savoir', 'savoir'), ('Savoir méthodologique', 'savoir méthodologique'), ('Savoir relationnel', 'savoir relationnel')], max_length=30)),
|
||||
('module', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='cms.Module')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Processus',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('code', models.CharField(blank=True, max_length=20)),
|
||||
('libelle', models.CharField(max_length=200)),
|
||||
('domaine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cms.Domaine')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Ressource',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('libelle', models.CharField(max_length=200)),
|
||||
('module', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='cms.Module')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SousCompetence',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('code', models.CharField(blank=True, max_length=20)),
|
||||
('libelle', models.CharField(max_length=200)),
|
||||
('competence', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cms.Competence')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='domaine',
|
||||
name='responsable',
|
||||
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='cms.Enseignant'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='competence',
|
||||
name='processus',
|
||||
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='cms.Processus'),
|
||||
),
|
||||
]
|
||||
32
cms/migrations/0002_auto_20161224_0929.py
Normal file
32
cms/migrations/0002_auto_20161224_0929.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-24 09:29
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='domaine',
|
||||
options={'ordering': ('code',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='enseignant',
|
||||
options={'ordering': ('nom',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='processus',
|
||||
options={'ordering': ('code',)},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='competence',
|
||||
name='tyoe',
|
||||
field=models.CharField(blank=True, default='', max_length=35),
|
||||
),
|
||||
]
|
||||
20
cms/migrations/0003_auto_20161224_0929.py
Normal file
20
cms/migrations/0003_auto_20161224_0929.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-24 09:29
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0002_auto_20161224_0929'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='competence',
|
||||
old_name='tyoe',
|
||||
new_name='type',
|
||||
),
|
||||
]
|
||||
23
cms/migrations/0004_auto_20161224_1234.py
Normal file
23
cms/migrations/0004_auto_20161224_1234.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-24 12:34
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0003_auto_20161224_0929'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='competence',
|
||||
options={'ordering': ('code',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='souscompetence',
|
||||
options={'ordering': ('code',)},
|
||||
),
|
||||
]
|
||||
36
cms/migrations/0005_auto_20161224_1236.py
Normal file
36
cms/migrations/0005_auto_20161224_1236.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-24 12:36
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0004_auto_20161224_1234'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='module',
|
||||
name='didactique',
|
||||
field=models.TextField(default=''),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='module',
|
||||
name='pratique_prof',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='module',
|
||||
name='processus',
|
||||
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cms.Processus'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='module',
|
||||
name='evaluation',
|
||||
field=models.TextField(default=''),
|
||||
),
|
||||
]
|
||||
24
cms/migrations/0006_auto_20161224_1339.py
Normal file
24
cms/migrations/0006_auto_20161224_1339.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-24 13:39
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0005_auto_20161224_1236'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='module',
|
||||
options={'ordering': ('code',)},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='module',
|
||||
name='nom',
|
||||
field=models.CharField(default='Nom du module', max_length=100),
|
||||
),
|
||||
]
|
||||
25
cms/migrations/0007_auto_20161225_1951.py
Normal file
25
cms/migrations/0007_auto_20161225_1951.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-25 19:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0006_auto_20161224_1339'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='competence',
|
||||
name='libelle',
|
||||
field=models.CharField(max_length=250),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='souscompetence',
|
||||
name='libelle',
|
||||
field=models.CharField(max_length=250),
|
||||
),
|
||||
]
|
||||
22
cms/migrations/0008_document.py
Normal file
22
cms/migrations/0008_document.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2016-12-26 08:47
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0007_auto_20161225_1951'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Document',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('docfile', models.FileField(upload_to='media')),
|
||||
],
|
||||
),
|
||||
]
|
||||
20
cms/migrations/0009_module_description.py
Normal file
20
cms/migrations/0009_module_description.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2017-01-04 12:47
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0008_document'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='module',
|
||||
name='description',
|
||||
field=models.TextField(blank=True, default=''),
|
||||
),
|
||||
]
|
||||
20
cms/migrations/0010_auto_20170104_1251.py
Normal file
20
cms/migrations/0010_auto_20170104_1251.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2017-01-04 12:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0009_module_description'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='module',
|
||||
name='description',
|
||||
field=models.TextField(),
|
||||
),
|
||||
]
|
||||
20
cms/migrations/0011_processus_description.py
Normal file
20
cms/migrations/0011_processus_description.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2017-01-04 12:52
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0010_auto_20170104_1251'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='processus',
|
||||
name='description',
|
||||
field=models.TextField(default=''),
|
||||
),
|
||||
]
|
||||
24
cms/migrations/0012_auto_20170104_1347.py
Normal file
24
cms/migrations/0012_auto_20170104_1347.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.4 on 2017-01-04 13:47
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0011_processus_description'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='objectif',
|
||||
name='type',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ressource',
|
||||
name='type',
|
||||
field=models.CharField(choices=[('Savoir', 'savoir'), ('Savoir méthodologique', 'savoir méthodologique'), ('Savoir relationnel', 'savoir relationnel')], default='Savoir', max_length=30),
|
||||
),
|
||||
]
|
||||
0
cms/migrations/__init__.py
Normal file
0
cms/migrations/__init__.py
Normal file
164
cms/models.py
Normal file
164
cms/models.py
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
'''
|
||||
Created on 17 nov. 2012
|
||||
|
||||
@author: alzo
|
||||
'''
|
||||
from django.db import models
|
||||
|
||||
|
||||
# Create your models here.
|
||||
|
||||
CHOIX_TYPE_SAVOIR = (
|
||||
('Savoir','savoir'),
|
||||
('Savoir méthodologique','savoir méthodologique'),
|
||||
('Savoir relationnel','savoir relationnel'),
|
||||
)
|
||||
|
||||
CHOIX_TYPE_MODULE = (
|
||||
('Spécifique', 'spécifique'),
|
||||
('Transversal', 'transversal'),
|
||||
)
|
||||
|
||||
class Enseignant(models.Model):
|
||||
sigle = models.CharField(max_length= 5, blank=True, default='')
|
||||
nom = models.CharField(max_length=20, blank=True, default='')
|
||||
prenom = models.CharField(max_length=20, blank=True, default='')
|
||||
email = models.EmailField(blank=True, default='')
|
||||
|
||||
class Meta:
|
||||
ordering =('nom',)
|
||||
|
||||
def __str__(self):
|
||||
return '{0} {1}'.format(self.nom, self.prenom)
|
||||
|
||||
|
||||
class Domaine(models.Model):
|
||||
code = models.CharField(max_length=20, blank=True)
|
||||
libelle = models.CharField(max_length=200, blank=False)
|
||||
responsable = models.ForeignKey(Enseignant, null=True, default=None)
|
||||
|
||||
class Meta:
|
||||
ordering = ('code',)
|
||||
|
||||
def __str__(self):
|
||||
return '{0} - {1}'.format(self.code, self.libelle)
|
||||
|
||||
def url(self):
|
||||
return "<a href='/domaine/{0}'>{1}</a>".format(self.id, self.__str__())
|
||||
|
||||
|
||||
class Processus(models.Model):
|
||||
code = models.CharField(max_length=20, blank=True)
|
||||
libelle = models.CharField(max_length=200, blank=False)
|
||||
domaine = models.ForeignKey(Domaine, null=False)
|
||||
description = models.TextField(default='')
|
||||
|
||||
|
||||
class Meta:
|
||||
ordering = ('code',)
|
||||
verbose_name_plural = 'processus'
|
||||
|
||||
def __str__(self):
|
||||
return '{0} - {1}'.format(self.code, self.libelle)
|
||||
|
||||
def url(self):
|
||||
return "<a href='/processus/{0}'>{1}</a>".format(self.id, self.__str__())
|
||||
|
||||
|
||||
class Module(models.Model):
|
||||
|
||||
code = models.CharField(max_length=10, blank=False, default='Code')
|
||||
nom = models.CharField(max_length=100, blank=False, default='Nom du module')
|
||||
description = models.TextField()
|
||||
type = models.CharField(max_length=20, choices= CHOIX_TYPE_MODULE)
|
||||
competences = models.ManyToManyField('Competence')
|
||||
situation = models.TextField()
|
||||
evaluation = models.TextField()
|
||||
contenu = models.TextField()
|
||||
periode_presentiel = models.IntegerField()
|
||||
travail_perso = models.IntegerField()
|
||||
pratique_prof = models.IntegerField(default=0)
|
||||
didactique = models.TextField(default='')
|
||||
evaluation = models.TextField(default='')
|
||||
sem1 = models.IntegerField(default=0)
|
||||
sem2 = models.IntegerField(default=0)
|
||||
sem3 = models.IntegerField(default=0)
|
||||
sem4 = models.IntegerField(default=0)
|
||||
sem5 = models.IntegerField(default=0)
|
||||
sem6 = models.IntegerField(default=0)
|
||||
semestre = models.CharField(max_length=15, default='', blank=False)
|
||||
processus = models.ForeignKey(Processus, null=False, default=None)
|
||||
|
||||
|
||||
class Meta:
|
||||
ordering = ('code',)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return '{0} - {1}'.format(self.code, self.nom)
|
||||
|
||||
def url(self):
|
||||
return "<a href='/module/{0}'>{1}</a>".format(self.id, self.__str__())
|
||||
|
||||
def url_code(self):
|
||||
return "<a href='/module/{0}'>{1}</a>".format(self.id, self.code)
|
||||
|
||||
|
||||
class Competence(models.Model):
|
||||
code = models.CharField(max_length=20, blank=True)
|
||||
libelle = models.CharField(max_length=250, blank=False)
|
||||
type = models.CharField(max_length=35, blank=True, default='')
|
||||
processus = models.ForeignKey(Processus, null=True, default=None)
|
||||
|
||||
class Meta:
|
||||
ordering = ('code',)
|
||||
verbose_name = 'compétence'
|
||||
|
||||
def __str__(self):
|
||||
return '{0} - {1}'.format(self.code, self.libelle)
|
||||
|
||||
|
||||
|
||||
class SousCompetence(models.Model):
|
||||
code = models.CharField(max_length=20, blank=True)
|
||||
libelle = models.CharField(max_length=250, blank=False)
|
||||
competence = models.ForeignKey(Competence, null=False)
|
||||
|
||||
class Meta:
|
||||
ordering = ('code',)
|
||||
verbose_name = 'sous-compétence'
|
||||
|
||||
def __str__(self):
|
||||
return '{0} - {1}'.format(self.code, self.libelle)
|
||||
|
||||
|
||||
class Ressource(models.Model):
|
||||
libelle = models.CharField(max_length=200, blank=False)
|
||||
type = models.CharField(max_length=30, choices = CHOIX_TYPE_SAVOIR, default='Savoir')
|
||||
module=models.ForeignKey(Module, null=True, default=None)
|
||||
|
||||
def __str__(self):
|
||||
return '{0}'.format(self.libelle)
|
||||
|
||||
class Objectif(models.Model):
|
||||
libelle = models.CharField(max_length=200, blank=False)
|
||||
#type = models.CharField(max_length=30, choices = CHOIX_TYPE_SAVOIR)
|
||||
module=models.ForeignKey(Module, null=True, default=None)
|
||||
|
||||
def __str__(self):
|
||||
return '{0}'.format(self.libelle)
|
||||
|
||||
|
||||
class Document(models.Model):
|
||||
docfile = models.FileField(upload_to='media')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
214
cms/static/css/main.css
Normal file
214
cms/static/css/main.css
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
#submenu {
|
||||
width:100%;
|
||||
background: #79aec8;
|
||||
padding: 10px 40px;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
color: #c4dce8;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.dashboard #content {
|
||||
width:1200px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
#plan a:link {
|
||||
color:black;
|
||||
}
|
||||
|
||||
#plan a:visited {
|
||||
color:black;
|
||||
}
|
||||
|
||||
#plan a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
#plan {
|
||||
border-collapse: separate;
|
||||
border-spacing: 5px 10px;
|
||||
|
||||
}
|
||||
|
||||
table th {
|
||||
font-size:120%;
|
||||
}
|
||||
|
||||
ul, ul li {
|
||||
list-style-type: none;
|
||||
float:left;
|
||||
}
|
||||
|
||||
ul li {
|
||||
/*)
|
||||
list-style-type:none;
|
||||
*/
|
||||
}
|
||||
|
||||
.liste-table {
|
||||
list-style-type:square;
|
||||
margin-left:0px;
|
||||
padding:0px;
|
||||
}
|
||||
.clear-booth {
|
||||
float:none;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.liste-verticale li {
|
||||
float:none;
|
||||
clear:both;
|
||||
list-style-type:square;
|
||||
margin-left:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
|
||||
.l1 {
|
||||
background-color:#fcaf3e;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
|
||||
}
|
||||
|
||||
.l2 {
|
||||
background-color:#cc0000;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
.l3 {
|
||||
background-color:#ef896b;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
.l4 {
|
||||
background-color:#ad7fa8;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
.l5 {
|
||||
background-color:#729fcf;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
.l6 {
|
||||
background-color:#73d216;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
.l7 {
|
||||
background-color:#ffffff;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
.l8 {
|
||||
background-color:#babdb6;
|
||||
padding:5px;
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
|
||||
.d {
|
||||
border:1px solid black;
|
||||
vertical-align:middle;
|
||||
font-weight:bold;
|
||||
font-size:105%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.p {
|
||||
border:1px solid black;
|
||||
font-size:105%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
.m {
|
||||
border:1px solid black;
|
||||
font-size:105%;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
height:20px;
|
||||
}
|
||||
|
||||
/* Affiche des infos dans la page DOMAINE */
|
||||
.processus {
|
||||
margin-left: 50px;
|
||||
line-height:2em;
|
||||
}
|
||||
|
||||
.module {
|
||||
margin-left:100px;
|
||||
margin-bottom:0px;
|
||||
line-height:2em;
|
||||
}
|
||||
|
||||
.competence {
|
||||
margin-left: 150px;
|
||||
line-height:2em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* BREADCRUMBS */
|
||||
|
||||
div.breadcrumbs {
|
||||
background: #79aec8;
|
||||
padding: 15px 0px;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
color: #c4dce8;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
div.breadcrumbs ul {
|
||||
text-indent: 0px;
|
||||
}
|
||||
|
||||
div.breadcrumbs ul li {
|
||||
line-height:0px;
|
||||
text-indent:0px;
|
||||
margin-left:0px;
|
||||
padding-left:0px;
|
||||
padding-right:30px;
|
||||
float:left;
|
||||
|
||||
}
|
||||
|
||||
div.breadcrumbs a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div.breadcrumbs a:focus, div.breadcrumbs a:hover {
|
||||
color: #c4dce8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
3
cms/tests.py
Normal file
3
cms/tests.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
118
cms/views.py
Normal file
118
cms/views.py
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
Created on 4 déc. 2012
|
||||
|
||||
@author: alzo
|
||||
'''
|
||||
import os
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import ListView, TemplateView, DetailView
|
||||
from .models import Domaine, Processus, Module, Document, Document
|
||||
from django.db.models import F, Sum
|
||||
from django.conf import settings
|
||||
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.http import HttpResponse
|
||||
from .forms import DocumentForm
|
||||
|
||||
# Create your views here.
|
||||
|
||||
class HomeView(TemplateView):
|
||||
template_name = 'cms/index.html'
|
||||
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(HomeView, self).get_context_data(**kwargs)
|
||||
for d in Domaine.objects.all().order_by('code'):
|
||||
context[d.code] = d
|
||||
|
||||
for c in Processus.objects.all().order_by('code'):
|
||||
context[c.code] = c
|
||||
|
||||
for m in Module.objects.all().order_by('code'):
|
||||
context[m.code] = m
|
||||
|
||||
return context
|
||||
|
||||
|
||||
|
||||
class DomaineDetailView(DetailView):
|
||||
template_name = 'cms/domaine_detail.html'
|
||||
model = Domaine
|
||||
|
||||
|
||||
class DomaineListView(ListView):
|
||||
template_name = 'cms/domaine_list.html'
|
||||
model = Domaine
|
||||
|
||||
|
||||
class ProcessusDetailView(DetailView):
|
||||
template_name = 'cms/processus_detail.html'
|
||||
model = Processus
|
||||
|
||||
|
||||
class ProcessusListView(ListView):
|
||||
template_name = 'cms/processus_list.html'
|
||||
model = Processus
|
||||
|
||||
|
||||
class ModuleDetailView(DetailView):
|
||||
template_name = 'cms/module_detail.html'
|
||||
model = Module
|
||||
|
||||
|
||||
class ModuleListView(ListView):
|
||||
template_name = 'cms/module_list.html'
|
||||
model = Module
|
||||
|
||||
|
||||
|
||||
|
||||
class PeriodeView(TemplateView):
|
||||
template_name = 'cms/periodes.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = TemplateView.get_context_data(self, **kwargs)
|
||||
liste = Module.objects.exclude(periode_presentiel = 0)
|
||||
context['tot'] = liste.aggregate(Sum(F('periode_presentiel')))
|
||||
context['sem1'] = liste.exclude(sem1 = 0)
|
||||
context['tot1'] = liste.aggregate(Sum(F('sem1')))
|
||||
context['sem2'] = liste.exclude(sem2 = 0)
|
||||
context['tot2'] = liste.aggregate(Sum(F('sem2')))
|
||||
context['sem3'] = liste.exclude(sem3 = 0)
|
||||
context['tot3'] = liste.aggregate(Sum(F('sem3')))
|
||||
context['sem4'] = liste.exclude(sem4 = 0)
|
||||
context['tot4'] = liste.aggregate(Sum(F('sem4')))
|
||||
context['sem5'] = liste.exclude(sem5 = 0)
|
||||
context['tot5'] = liste.aggregate(Sum(F('sem5')))
|
||||
context['sem6'] = liste.exclude(sem6 = 0)
|
||||
context['tot6'] = liste.aggregate(Sum(F('sem6')))
|
||||
|
||||
return context
|
||||
|
||||
|
||||
|
||||
|
||||
def AddDoc(request):
|
||||
if request.method == 'POST':
|
||||
form = DocumentForm(request.POST, request.FILES)
|
||||
if form.is_valid():
|
||||
newdoc = Document(docfile = request.FILES['docfile'])
|
||||
newdoc.save()
|
||||
return HttpResponseRedirect('')
|
||||
else:
|
||||
form = DocumentForm()
|
||||
|
||||
documents = Document.objects.all()
|
||||
return render (request, 'cms/upload.html', {'documents': documents,'form': form})
|
||||
|
||||
|
||||
def Download(request, file_name):
|
||||
f = os.path.join(settings.MEDIA_ROOT, file_name)
|
||||
response = HttpResponse(content_type='application/pdf')
|
||||
response['Content-Disposition'] = 'attachment; filename={0}'.format(file_name)
|
||||
response['Content-Length'] = os.stat(f).st_size
|
||||
return response
|
||||
|
||||
|
||||
|
||||
0
common/__init__.py
Normal file
0
common/__init__.py
Normal file
120
common/settings.py
Normal file
120
common/settings.py
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
# Django settings for histone project.
|
||||
"""
|
||||
Django settings for eds project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 1.10.4.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.10/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/1.10/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
|
||||
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'cms',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'common.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [os.path.join(BASE_DIR, 'templates/')],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'common.wsgi.application'
|
||||
|
||||
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'fr-fr'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_L10N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
#STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
|
||||
|
||||
MEDIA_URL = '/media/'
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
|
||||
from .local_settings import *
|
||||
|
||||
|
||||
34
common/urls.py
Normal file
34
common/urls.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"""eds URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/1.10/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.conf.urls import url, include
|
||||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf.urls import url
|
||||
from django.contrib import admin
|
||||
from cms import views
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.HomeView.as_view(), name='home'),
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^domaine/(?P<pk>\d+)$', views.DomaineDetailView.as_view(), name='domaine-detail'),
|
||||
url(r'^domaines/$', views.DomaineListView.as_view(), name='domaine-list'),
|
||||
url(r'^processus/(?P<pk>\d+)$', views.ProcessusDetailView.as_view(), name='processus-detail'),
|
||||
url(r'^processus/$', views.ProcessusListView.as_view(), name='processus-list'),
|
||||
url(r'^module/(?P<pk>\d+)$', views.ModuleDetailView.as_view(), name='module-detail'),
|
||||
url(r'^modules/$', views.ModuleListView.as_view(), name='module-list'),
|
||||
url(r'^periode$', views.PeriodeView.as_view(), name='periode'),
|
||||
url(r'^upload$', views.AddDoc, name='upload'),
|
||||
url(r'^download/(?P<file_name>.+)$', views.Download, name='download'),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
16
common/wsgi.py
Normal file
16
common/wsgi.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
WSGI config for eds project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "eds.settings")
|
||||
|
||||
application = get_wsgi_application()
|
||||
22
manage.py
Executable file
22
manage.py
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/home/alzo/.virtualenv/eds/bin/ python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "common.settings")
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError:
|
||||
# The above import may fail for some other reason. Ensure that the
|
||||
# issue is really that Django is missing to avoid masking other
|
||||
# exceptions on Python 2.
|
||||
try:
|
||||
import django
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
)
|
||||
raise
|
||||
execute_from_command_line(sys.argv)
|
||||
BIN
media/media/EDS_Calendrier_2017.pdf
Normal file
BIN
media/media/EDS_Calendrier_2017.pdf
Normal file
Binary file not shown.
BIN
media/media/EDS_Calendrier_2018.pdf
Normal file
BIN
media/media/EDS_Calendrier_2018.pdf
Normal file
Binary file not shown.
BIN
media/media/EDS_Calendrier_2019.pdf
Normal file
BIN
media/media/EDS_Calendrier_2019.pdf
Normal file
Binary file not shown.
BIN
media/media/LotEtiquettes.pdf
Normal file
BIN
media/media/LotEtiquettes.pdf
Normal file
Binary file not shown.
7
static/css/main.css
Normal file
7
static/css/main.css
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
#titre_col ul li {
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
|
||||
88
templates/admin/base.html
Normal file
88
templates/admin/base.html
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{% load i18n static %}<!DOCTYPE html>
|
||||
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
||||
<html lang="{{ LANGUAGE_CODE|default:"fr" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" />
|
||||
{% block extrastyle %}{% endblock %}
|
||||
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %}
|
||||
{% block extrahead %}{% endblock %}
|
||||
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
|
||||
</head>
|
||||
{% load i18n %}
|
||||
|
||||
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
|
||||
data-admin-utc-offset="{% now "Z" %}">
|
||||
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
|
||||
{% if not is_popup %}
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
{% block branding %}{% endblock %}
|
||||
</div>
|
||||
{% block usertools %}
|
||||
{% if has_permission %}
|
||||
<div id="user-tools">
|
||||
{% block welcome-msg %}
|
||||
{% trans 'Welcome,' %}
|
||||
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
|
||||
{% endblock %}
|
||||
{% block userlinks %}
|
||||
{% if site_url %}
|
||||
<a href="{{ site_url }}">{% trans 'View site' %}</a> /
|
||||
{% endif %}
|
||||
{% if user.is_active and user.is_staff %}
|
||||
{% url 'django-admindocs-docroot' as docsroot %}
|
||||
{% if docsroot %}
|
||||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.has_usable_password %}
|
||||
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block nav-global %}{% endblock %}
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
{% if title %} › {{ title }}{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messagelist">{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
||||
{% endfor %}</ul>
|
||||
{% endif %}
|
||||
{% endblock messages %}
|
||||
|
||||
<!-- Content -->
|
||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
||||
{% block pretitle %}{% endblock %}
|
||||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||
{% block content %}
|
||||
{% block object-tools %}{% endblock %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
{% block sidebar %}{% endblock %}
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
|
||||
{% block footer %}<div id="footer"></div>{% endblock %}
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
15
templates/admin/base_site.html
Normal file
15
templates/admin/base_site.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}EDS{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav-global %}{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'home' %}">Accueil</a>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
1
templates/admin/cms/processus/edit_inline/tabular.html
Normal file
1
templates/admin/cms/processus/edit_inline/tabular.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
helle
|
||||
89
templates/cms/base.html
Normal file
89
templates/cms/base.html
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
{% load i18n static %}<!DOCTYPE html>
|
||||
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
||||
<html lang="{{ LANGUAGE_CODE|default:"fr" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
|
||||
{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}" />{% endblock %}
|
||||
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %}
|
||||
{% block extrahead %}{% endblock %}
|
||||
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
|
||||
</head>
|
||||
{% load i18n %}
|
||||
|
||||
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}dashboard{% endblock %}"
|
||||
data-admin-utc-offset="{% now "Z" %}">
|
||||
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
|
||||
{% if not is_popup %}
|
||||
<!-- Header -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
{% block branding %}{% endblock %}
|
||||
</div>
|
||||
{% block usertools %}
|
||||
{% if has_permission %}
|
||||
<div id="user-tools">
|
||||
{% block welcome-msg %}
|
||||
{% trans 'Welcome,' %}
|
||||
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
|
||||
{% endblock %}
|
||||
{% block userlinks %}
|
||||
{% if site_url %}
|
||||
<a href="{{ site_url }}">{% trans 'View site' %}</a> /
|
||||
{% endif %}
|
||||
{% if user.is_active and user.is_staff %}
|
||||
{% url 'django-admindocs-docroot' as docsroot %}
|
||||
{% if docsroot %}
|
||||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.has_usable_password %}
|
||||
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
{% block nav-global %}{% endblock %}
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
{% block breadcrumbs %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messagelist">{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
||||
{% endfor %}</ul>
|
||||
{% endif %}
|
||||
{% endblock messages %}
|
||||
|
||||
<!-- Content -->
|
||||
<div id="content">
|
||||
{% block pretitle %}{% endblock %}
|
||||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||
{% block content %}
|
||||
{% block object-tools %}{% endblock %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
{% block sidebar %}{% endblock %}
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
|
||||
{% block footer %}<div id="footer"></div>{% endblock %}
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
21
templates/cms/base_site.html
Normal file
21
templates/cms/base_site.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{% extends "./base.html" %}
|
||||
|
||||
{% block title %}EDS{% endblock %}
|
||||
|
||||
{% block branding %}<h1 id="site-name"><a href="{% url 'admin:index' %}">Formation EDS</a></h1>{% endblock %}
|
||||
{% block usertools %}<div id="user-tools"><a href="{% url 'admin:index' %}">Admin</a></div>{% endblock %}
|
||||
{% block nav-global %}{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="{% url 'home' %}">Accueil</a> </li>
|
||||
<li><a href="{% url 'domaine-list' %}">Domaines</a> </li>
|
||||
<li><a href="{% url 'processus-list' %}">Processus</a> </li>
|
||||
<li><a href="{% url 'module-list' %}">Modules</a> </li>
|
||||
<li><a href="#">Calendrier</a> </li>
|
||||
{% if has_permission %}
|
||||
<li><a href="#">Calendrier</a> </li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
29
templates/cms/documents.html
Normal file
29
templates/cms/documents.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}" />{% endblock %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'home' %}">Accueil</a>
|
||||
<a href="{% url 'document' %}">Document</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Documents utiles</h1>
|
||||
<ul>
|
||||
<li><a href=""
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
26
templates/cms/domaine_detail.html
Normal file
26
templates/cms/domaine_detail.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Domaine: {{object.code}} - {{object.libelle}}</h1>
|
||||
{% for p in object.processus_set.all %}
|
||||
<div class="processus"><h2>Processus: {{ p.url|safe }}</h2></div>
|
||||
{% for m in p.module_set.all %}
|
||||
<div class="module">Module: <a href="/module/{{m.id}}">{{ m }}</a></div>
|
||||
<div class="competence">Compétences visées</div>
|
||||
{% for c in m.competences.all %}
|
||||
<div class="competence">{{ c }}</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
31
templates/cms/domaine_list.html
Normal file
31
templates/cms/domaine_list.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Liste des domaines</h1>
|
||||
<table border="0">
|
||||
{% for d in object_list %}
|
||||
<tr><td colspan="3">{{d}}</td></td></tr>
|
||||
{% for p in d.processus_set.all %}
|
||||
<tr><th width="10px"> </th><td colspan="2"><a href=" {% url 'processus-detail' p.id %}">{{p}}</a></td></tr>
|
||||
{% for m in p.module_set.all %}
|
||||
<tr><th colspan="2" width="45px"> <td><a href=" {% url 'module-detail' m.id %}">{{m}}</a></td></tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
103
templates/cms/index.html
Normal file
103
templates/cms/index.html
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
|
||||
<table id="plan">
|
||||
<tr>
|
||||
<th width="300px">Domaines</th>
|
||||
<th width="600px">Processus</th>
|
||||
<th width="180px" style="text-align:center;">Sem1</th>
|
||||
<th width="180px" style="text-align:center;">Sem2</th>
|
||||
<th width="180px" style="text-align:center;">Sem3</th>
|
||||
<th width="180px" style="text-align:center;">Sem4</th>
|
||||
<th width="180px" style="text-align:center;">Sem5</th>
|
||||
<th width="180px" style="text-align:center;">Sem6</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td rowspan="4" class="l1 d">{{D1.url|safe}}</td>
|
||||
<td rowspan="2" class="l1 p">{{P01.url|safe}}</td>
|
||||
<td class="l1 m">{{M01.url_code|safe}}</td><td> </td><td> </td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="l1 m" >{{M02.url_code|safe}}</td><td> </td><td> </td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" class="l1 p">{{P02.url|safe}}</td>
|
||||
<td></td><td class="l1 m">{{M03.url_code|safe}}</td><td> </td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td></td><td class="l1 m">{{M04.url_code|safe}}</td><td> </td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
<!-- Ligne 2 -->
|
||||
<tr>
|
||||
<td rowspan="3" class="l2 d">{{D2.url|safe}}</td>
|
||||
<td class="l2 p">{{P03.url|safe}}</td>
|
||||
<td class="l2 m">{{M05.url_code|safe}}</td><td> </td><td class="l2 m">{{M06.url_code|safe}}</td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" class="l2 p">{{P04.url|safe}}</td>
|
||||
<td></td><td> </td><td> </td><td> </td><td class="l2 m">{{M07.url_code|safe}}</td><td class="l2 m">{{M09.url_code|safe}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td></td><td> </td><td> </td><td> </td><td class="l2 m">{{M08.url_code|safe}}</td><td> </td>
|
||||
</tr>
|
||||
|
||||
<!-- Ligne 3 -->
|
||||
<tr>
|
||||
<td rowspan="2" class="l3 d">{{D3.url|safe}}</td>
|
||||
<td class="l3 p">{{P05.url|safe}}</td>
|
||||
<td > </td><td> </td><td colspan="2" class="l3 m">{{M10.url_code|safe}}</td><td class="l3 m">{{M12.url_code|safe}}</td><td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l3 p">{{P06.url|safe}}</td>
|
||||
<td > </td><td> </td><td colspan="2" class="l3 m">{{M11.url_code|safe}}</td><td> </td><td> </td>
|
||||
</tr>
|
||||
<!-- Ligne 4 -->
|
||||
<tr>
|
||||
<td class="l4 d">{{D4.url|safe}}</td>
|
||||
<td class="l4 p">{{P07.url|safe}}</td>
|
||||
<td > </td><td> </td><td class="l4 m">{{M13.url_code|safe}}</td><td> </td><td> </td><td class="l4 m">{{M14.url_code|safe}}</td>
|
||||
</tr>
|
||||
|
||||
<!-- Ligne 5 -->
|
||||
<tr>
|
||||
<td class="l5 d">{{D5.url|safe}}</td>
|
||||
<td class="l5 p">{{P08.url|safe}}</td>
|
||||
<td colspan="6" class="l5 m">{{M15.url_code|safe}}</td>
|
||||
</tr>
|
||||
|
||||
<!-- Ligne 6 -->
|
||||
<tr>
|
||||
<td class="l6 d">{{D6.url|safe}}</td>
|
||||
<td class="l6 p">{{P09.url|safe}}</td>
|
||||
<td colspan="2" class="l6 m">{{M16_1a.url_code|safe}} - {{M16_1b.url_code|safe}} - {{M16_1c.url_code|safe}}</td>
|
||||
<td colspan="2" class="l6 m">{{M16_2a.url_code|safe}} - {{M16_2b.url_code|safe}} - {{M16_2c.url_code|safe}}</td>
|
||||
<td colspan="2" class="l6 m">{{M16_3a.url_code|safe}} - {{M16_3b.url_code|safe}} - {{M16_3c.url_code|safe}}</td>
|
||||
</tr>
|
||||
<!-- Ligne 7 -->
|
||||
<tr>
|
||||
<td class="l7 d">{{D7.url|safe}}</td>
|
||||
<td class="l7 p">{{P10.url|safe}}</td>
|
||||
<td colspan="2" class="l7 m">{{M17_1.url_code|safe}}</td><td colspan="2" class="l7 m">{{M17_2.url_code|safe}}</td><td colspan="2" class="l7 m">{{M17_3.url_code|safe}}</td>
|
||||
</tr>
|
||||
|
||||
<!-- Ligne 8 -->
|
||||
<tr>
|
||||
<td class="l8 d">{{D8.url|safe}}</td>
|
||||
<td class="l8 p">{{P11.url|safe}}</td>
|
||||
<td colspan="6" class="l8 m">{{MACC.url_code|safe}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
38
templates/cms/module_detail.html
Normal file
38
templates/cms/module_detail.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>{{object}}</h1>
|
||||
<table>
|
||||
<tr><th>Domaine</th><td>{{object.processus.domaine.url|safe}}</td></tr>
|
||||
<tr><th>Processus</th><td>{{object.processus.url|safe}}</td></tr>
|
||||
<tr><th>Situation emblématique</th><td>{{object.situation}}</td></tr>
|
||||
<tr><th>Compétences visées</th><td><p>L'éducateur social, l'éducatrice sociale</p>
|
||||
{% for c in object.competences.all %}- {{c.libelle}} ({{c.code}})<br />{% endfor %}</td></tr>
|
||||
<tr><th>Ressources</th><td>{% for c in object.ressource_set.all %}- {{c}}<br />{% endfor %}</td></tr>
|
||||
<tr><th>Objectifs</th><td>{% for c in object.objectif_set.all %}- {{c}}<br />{% endfor %}</td></tr>
|
||||
<tr><th>Contenu</th><td>{{object.contenu}}</td></tr>
|
||||
<tr><th>Evaluation</th><td>{{object.evaluation}}</td></tr>
|
||||
<tr><th>Type</th><td>{{object.type}}</td></tr>
|
||||
<tr><th>Semestre</th><td>{{object.semestre}}</td></tr>
|
||||
{% if object.periode_presentiel > 0 %}
|
||||
<tr><th>Présentiel</th><td>{{object.periode_presentiel}} heures</td></tr>
|
||||
{% endif %}
|
||||
{% if object.pratique_prof > 0 %}
|
||||
<tr><th>Pratique prof.</th><td>{{object.pratique_prof}} heures</td></tr>
|
||||
{% endif %}
|
||||
{% if object.travail_perso > 0 %}
|
||||
<tr><th>Travail perso.</th><td>{{object.travail_perso}} heures</td></tr>
|
||||
{% endif %}
|
||||
<tr><th>Responsable</th><td>{{object.processus.domaine.responsable}} ({{object.processus.domaine.responsable.email}})</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
25
templates/cms/module_list.html
Normal file
25
templates/cms/module_list.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Liste des modules</h1>
|
||||
<table>
|
||||
{% for m in object_list %}
|
||||
<tr><th>{{m.code}}</th><td><a href=" {% url 'module-detail' m.id %}">{{m.nom}}</a></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
48
templates/cms/periodes.html
Normal file
48
templates/cms/periodes.html
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}" />{% endblock %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Périodes de formation</h1>
|
||||
<table>
|
||||
<tr><th>Semestre 1</th><th text-align="right">{{tot1.sem1__sum}}h.</th></tr>
|
||||
{% for s in sem1 %}
|
||||
<tr><td>{{s}}</td><td>{{s.sem1}} h.</td></tr>
|
||||
{% endfor %}
|
||||
<tr><th>Semestre 2</th><th text-align="right">{{tot2.sem2__sum}}h.</th></tr>
|
||||
{% for s in sem2 %}
|
||||
<tr><td>{{s}}</td><td>{{s.sem2}} h.</td></tr>
|
||||
{% endfor %}
|
||||
<tr><th>Semestre 3</th><th text-align="right">{{tot3.sem3__sum}}h.</th></tr>
|
||||
{% for s in sem3 %}
|
||||
<tr><td>{{s}}</td><td>{{s.sem3}} h.</td></tr>
|
||||
{% endfor %}
|
||||
<tr><th>Semestre 4</th><th text-align="right">{{tot4.sem4__sum}}h.</th></tr>
|
||||
{% for s in sem4 %}
|
||||
<tr><td>{{s}}</td><td>{{s.sem4}} h.</td></tr>
|
||||
{% endfor %}
|
||||
<tr><th>Semestre 5</th><th text-align="right">{{tot5.sem5__sum}}h.</th></tr>
|
||||
{% for s in sem5 %}
|
||||
<tr><td>{{s}}</td><td>{{s.sem5}} h.</td></tr>
|
||||
{% endfor %}
|
||||
<tr><th>Semestre 6</th><th text-align="right">{{tot6.sem6__sum}}h.</th></tr>
|
||||
{% for s in sem6 %}
|
||||
<tr><td>{{s}}</td><td>{{s.sem6}} h.</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{{tot.tot__sum}}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
30
templates/cms/processus_detail.html
Normal file
30
templates/cms/processus_detail.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>{{object}}</h1>
|
||||
<table>
|
||||
<tr><th>Description</th><td>{{object.description}}</td></tr>
|
||||
<tr><th>Compétences visées</th><td><p>L'éducateur social, l'éducatrice sociale</p>
|
||||
{% for m in object.module_set.all %}{% for c in m.competences.all %}
|
||||
- {{c.libelle}} ({{c.code}})<br />{% endfor %}{% endfor %}</td></tr>
|
||||
<tr><th>Domaine</th><td>{{object.domaine.url|safe}}</td></tr>
|
||||
<tr><th>Responsable</th><td>{{object.domaine.responsable}} ({{object.domaine.responsable.email}})</td></tr>
|
||||
<tr><th>Modules concernés</th><td>{% for m in object.module_set.all %}{{m.url|safe}}</br>{% endfor %}</td></tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
28
templates/cms/processus_list.html
Normal file
28
templates/cms/processus_list.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Liste des processus</h1>
|
||||
<table>
|
||||
{% for p in object_list %}
|
||||
<tr><th>{{p.code}}</th><td><a href=" {% url 'processus-detail' p.id %}">{{p.libelle}}</a></td></tr>
|
||||
{% for m in p.module_set.all %}
|
||||
<tr><th> </th><td><a href=" {% url 'module-detail' m.id %}">{{m}}</a></td></tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
49
templates/cms/upload.html
Normal file
49
templates/cms/upload.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{% extends "./base_site.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}" />{% endblock %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'home' %}">Accueil</a>
|
||||
<a href="{% url 'upload' %}">Document</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="content-main">
|
||||
<h1>Enregistrements de documents</h1>
|
||||
{% if documents %}
|
||||
<ul class="liste-verticale">
|
||||
{% for document in documents %}
|
||||
<li><a href="download/{{ document.docfile.name }}">{{document.docfile.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>No documents.</p>
|
||||
{% endif %}
|
||||
<!-- Upload form. Note enctype attribute! -->
|
||||
<div class="clear-booth">
|
||||
<form action="{% url 'upload' %}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<p>{{ form.non_field_errors }}</p>
|
||||
<p>{{ form.docfile.label_tag }} {{ form.docfile.help_text }}</p>
|
||||
<p>
|
||||
{{ form.docfile.errors }}
|
||||
{{ form.docfile }}
|
||||
</p>
|
||||
|
||||
<p><input type="submit" value="Upload" /></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue