From f5a33f5dd320a879fb9ffded0b5c770c152f10d4 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Thu, 4 Aug 2022 10:10:02 +0200 Subject: [PATCH] Nouveau parcours V1 --- teleforma/admin.py | 8 +- teleforma/context_processors.py | 128 +- .../migrations/0008_auto_20220725_1221.py | 30 + .../migrations/0009_auto_20220725_1757.py | 22 + .../0010_alter_seminarpart_webclass_text.py | 18 + teleforma/models/pro.py | 58 +- teleforma/static/admin/extra.css | 15 +- teleforma/static/teleforma/css/base.css | 1861 +++++++++-------- teleforma/static/teleforma/css/teleforma.css | 37 + teleforma/templates/quiz/question.html | 6 +- teleforma/templates/teleforma/inc/steps.html | 149 +- .../teleforma/inc/webclass_step.html | 20 + .../templates/teleforma/seminar_detail.html | 280 ++- teleforma/templates/teleforma/seminars.html | 2 +- teleforma/templatetags/teleforma_tags.py | 8 +- teleforma/views/pro.py | 24 +- 16 files changed, 1606 insertions(+), 1060 deletions(-) create mode 100644 teleforma/migrations/0008_auto_20220725_1221.py create mode 100644 teleforma/migrations/0009_auto_20220725_1757.py create mode 100644 teleforma/migrations/0010_alter_seminarpart_webclass_text.py create mode 100644 teleforma/templates/teleforma/inc/webclass_step.html diff --git a/teleforma/admin.py b/teleforma/admin.py index c36d877c..a59ec814 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -210,13 +210,13 @@ class ConferenceAdmin(admin.ModelAdmin): class SeminarQuestionInline(admin.StackedInline): model = Question -class SeminarStepInline(admin.StackedInline): - model = SeminarStep - autocomplete_fields = [ 'docs_1', 'medias', 'docs_2', 'docs_correct', 'quiz'] +class SeminarPartInline(admin.StackedInline): + model = SeminarPart + autocomplete_fields = [ 'docs_1', 'medias', 'docs_2', 'quiz'] class SeminarAdmin(admin.ModelAdmin): exclude = ['keywords'] - inlines = [SeminarQuestionInline, SeminarStepInline] + inlines = [SeminarQuestionInline, SeminarPartInline] filter_horizontal = ['professor',] # filter_vertical = ['docs_description', 'docs_1', # 'docs_2', 'docs_correct', 'medias', diff --git a/teleforma/context_processors.py b/teleforma/context_processors.py index af1dcc22..18560d93 100644 --- a/teleforma/context_processors.py +++ b/teleforma/context_processors.py @@ -51,27 +51,49 @@ def seminar_progress(user, seminar, more=False): total = 0 missing_steps = set() - objects = [ - { - 'obj': seminar.docs_1, - 'step': '1' - }, - { - 'obj': seminar.medias, - 'step': '2' - }, - { - 'obj': seminar.docs_2, - 'step': '3' - }, - { - 'obj': seminar.docs_correct, - 'step': '5' - } - ] - - if seminar.use_webclass(user): - objects[1]['obj'] = seminar.conference + multipart = seminar.is_multipart + parts = seminar.parts.all() + if not multipart: + objects = [ + { + 'obj': seminar.docs_1, + 'step': '1' + }, + { + 'obj': seminar.medias, + 'step': '2' + }, + { + 'obj': seminar.docs_2, + 'step': '3' + }, + { + 'obj': seminar.docs_correct, + 'step': '5' + } + ] + + if seminar.use_webclass(user): + objects[1]['obj'] = seminar.conference + else: + objects = [] + for part in parts: + objects.extend([ + { + 'obj': part.docs_1, + 'step': '1' + }, + { + 'obj': part.medias, + 'step': '2' + }, + { + 'obj': part.docs_2, + 'step': '3' + } + ]) + if seminar.use_webclass(user): + objects[1]['obj'] = seminar.conference for item in objects: obj = item['obj'] @@ -88,32 +110,41 @@ def seminar_progress(user, seminar, more=False): else: missing_steps.add(step) - questions = Question.objects.filter(seminar=seminar, status=3) - missing_step4 = None - for question in questions: - if question.weight: - total += question.weight - answer = Answer.objects.filter(question=question, status=3, user=user) - if answer: - answer = answer[0] - if answer: - progress += question.weight - else: - if answer and not answer.treated and not missing_step4 == '4': - missing_step4 = '4.5' + # questions are not relevant to multipart + if not multipart: + questions = Question.objects.filter(seminar=seminar, status=3) + missing_step4 = None + for question in questions: + if question.weight: + total += question.weight + answer = Answer.objects.filter(question=question, status=3, user=user) + if answer: + answer = answer[0] + if answer: + progress += question.weight else: - missing_step4 = '4' - if missing_step4: - missing_steps.add(missing_step4) - - if seminar.quiz: - quiz_weight = 3 - quiz_validations = QuizValidation.objects.filter(user=user, quiz=seminar.quiz, validated=True) - total += quiz_weight - if quiz_validations: - progress += quiz_weight - else: - missing_steps.add('2bis') + if answer and not answer.treated and not missing_step4 == '4': + missing_step4 = '4.5' + else: + missing_step4 = '4' + if missing_step4: + missing_steps.add(missing_step4) + + + quizs = [seminar.quiz] + if multipart: + quizs = [part.quiz for part in parts] + quizstep = multipart and '4' or '2bis' + for quiz in quizs: + if quiz: + quiz_weight = 3 + quiz_validations = QuizValidation.objects.filter(user=user, quiz=quiz, validated=True) + total += quiz_weight + if quiz_validations: + + progress += quiz_weight + else: + missing_steps.add(quizstep) if total != 0: progress = int(progress*100/total) @@ -128,6 +159,11 @@ def seminar_progress(user, seminar, more=False): def seminar_validated(user, seminar): + if seminar.is_multipart: + for part in seminar.parts.all(): + if not part.is_validated(user): + return False + return True validated = [] questions = seminar.question.filter(status=3) if seminar.quiz: diff --git a/teleforma/migrations/0008_auto_20220725_1221.py b/teleforma/migrations/0008_auto_20220725_1221.py new file mode 100644 index 00000000..8899ebb3 --- /dev/null +++ b/teleforma/migrations/0008_auto_20220725_1221.py @@ -0,0 +1,30 @@ +# Generated by Django 3.2.3 on 2022-07-25 12:21 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('quiz', '__first__'), + ('teleforma', '0007_alter_seminarstep_quiz'), + ] + + operations = [ + migrations.CreateModel( + name='SeminarPart', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('docs_1', models.ManyToManyField(blank=True, related_name='seminarpart_docs1', to='teleforma.Document', verbose_name='documents 1')), + ('docs_2', models.ManyToManyField(blank=True, related_name='seminarpart_docs2', to='teleforma.Document', verbose_name='documents 2')), + ('docs_correct', models.ManyToManyField(blank=True, related_name='seminarpart_docs_correct', to='teleforma.Document', verbose_name='corrected documents')), + ('medias', models.ManyToManyField(blank=True, related_name='seminarpart', to='teleforma.Media', verbose_name='media')), + ('quiz', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='seminarpart', to='quiz.quiz', verbose_name='quiz')), + ('seminar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parts', to='teleforma.seminar', verbose_name='seminar')), + ], + ), + migrations.DeleteModel( + name='SeminarStep', + ), + ] diff --git a/teleforma/migrations/0009_auto_20220725_1757.py b/teleforma/migrations/0009_auto_20220725_1757.py new file mode 100644 index 00000000..2a817fcd --- /dev/null +++ b/teleforma/migrations/0009_auto_20220725_1757.py @@ -0,0 +1,22 @@ +# Generated by Django 3.2.3 on 2022-07-25 17:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('teleforma', '0008_auto_20220725_1221'), + ] + + operations = [ + migrations.RemoveField( + model_name='seminarpart', + name='docs_correct', + ), + migrations.AddField( + model_name='seminarpart', + name='webclass_text', + field=models.TextField(blank=True, help_text='Texte utilisé lorsque les medias sont remplacés par la webclasse.', null=True, verbose_name='Titre webclass'), + ), + ] diff --git a/teleforma/migrations/0010_alter_seminarpart_webclass_text.py b/teleforma/migrations/0010_alter_seminarpart_webclass_text.py new file mode 100644 index 00000000..f31eaeaf --- /dev/null +++ b/teleforma/migrations/0010_alter_seminarpart_webclass_text.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.3 on 2022-07-25 17:59 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('teleforma', '0009_auto_20220725_1757'), + ] + + operations = [ + migrations.AlterField( + model_name='seminarpart', + name='webclass_text', + field=models.CharField(blank=True, help_text='Texte utilisé lorsque les medias sont remplacés par la webclasse.', max_length=255, null=True, verbose_name='Titre webclass'), + ), + ] diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index fab61248..9151d2b0 100644 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -35,6 +35,7 @@ """ import datetime +from itertools import chain import os from django.conf import settings from django.contrib.auth.models import User @@ -185,31 +186,31 @@ class Seminar(ClonableMixin, Displayable, ProductCodeMixin, SuggestionsMixin): return (list(self.suggested_seminars.all())+list(self.suggested_conferences.all()))[:3] @property - def is_multistep(self): - return self.steps.count() + def is_multipart(self): + return self.parts.count() @property - def number_of_steps(self): - """ number of top steps """ - return self.steps.count() or 1 + def number_of_parts(self): + """ number of top parts """ + return self.parts.count() or 1 - def get_steps(self, user): - """ get steps info """ - steps = [] + def get_parts(self, user): + """ get parts info """ + parts = [] last_accessible = None - for i, step in enumerate(self.steps.order_by('id')): - validated = step.is_validated(user) + for i, part in enumerate(self.parts.order_by('id')): + validated = part.is_validated(user) accessible = validated if not validated and not last_accessible: accessible = True last_accessible = True - steps.append({ + parts.append({ 'index': i + 1, - 'object': step, + 'object': part, 'validated': validated, 'accessible': accessible }) - return steps + return parts def use_webclass(self, user): """ @@ -273,31 +274,36 @@ class Seminar(ClonableMixin, Displayable, ProductCodeMixin, SuggestionsMixin): verbose_name = _('Seminar') ordering = ['rank'] -class SeminarStep(models.Model): - seminar = models.ForeignKey(Seminar, related_name='steps', verbose_name=_('seminar'), on_delete=models.CASCADE) - docs_1 = models.ManyToManyField(Document, related_name="seminarstep_docs1", +class SeminarPart(models.Model): + seminar = models.ForeignKey(Seminar, related_name='parts', verbose_name=_('seminar'), on_delete=models.CASCADE) + docs_1 = models.ManyToManyField(Document, related_name="seminarpart_docs1", verbose_name=_('documents 1'), blank=True) - medias = models.ManyToManyField(Media, related_name="seminarstep", + medias = models.ManyToManyField(Media, related_name="seminarpart", verbose_name=_('media'), blank=True) - docs_2 = models.ManyToManyField(Document, related_name="seminarstep_docs2", + webclass_text = models.CharField("Titre webclass", blank=True, null=True, help_text="Texte utilisé lorsque les medias sont remplacés par la webclasse.", max_length=255) + docs_2 = models.ManyToManyField(Document, related_name="seminarpart_docs2", verbose_name=_('documents 2'), blank=True) - docs_correct = models.ManyToManyField(Document, related_name="seminarstep_docs_correct", - verbose_name=_('corrected documents'), - blank=True) - quiz = models.ForeignKey(Quiz, related_name="seminarstep", + # docs_correct = models.ManyToManyField(Document, related_name="seminarpart_docs_correct", + # verbose_name=_('corrected documents'), + # blank=True) + quiz = models.ForeignKey(Quiz, related_name="seminarpart", verbose_name=_('quiz'), on_delete=models.PROTECT) def is_validated(self, user): + """ a module is validated when every doc / medias is viewed and quiz is validated """ validations = QuizValidation.objects.filter(quiz=self.quiz, user=user, validated=True, date_validated__range=[self.seminar.date_added, self.seminar.expiry_date]) - if validations: - return True - return False - + if not validations: + return False + for item in chain(self.docs_1.all(), self.medias.all(), self.docs_2.all()): + if user not in item.readers.all(): + return False + return True + class Question(ClonableMixin, models.Model): element_type = 'question' diff --git a/teleforma/static/admin/extra.css b/teleforma/static/admin/extra.css index 52336ad5..06eff77c 100644 --- a/teleforma/static/admin/extra.css +++ b/teleforma/static/admin/extra.css @@ -1,3 +1,8 @@ +:root{ + --border-color: #aaa; + --body-quiet-color: #80bdff; + --darkened-bg: #e4e4e4; +} .selector { width: 1024px; @@ -23,4 +28,12 @@ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: #fff -} \ No newline at end of file +} + +.select2-container .select2-selection--multiple, .select2-container--open.select2-container--below .select2-selection--multiple { + border: 1px solid blue; +} + +.select2-container { + min-width: 80%; +} diff --git a/teleforma/static/teleforma/css/base.css b/teleforma/static/teleforma/css/base.css index 3581536e..22e6a143 100644 --- a/teleforma/static/teleforma/css/base.css +++ b/teleforma/static/teleforma/css/base.css @@ -1,15 +1,32 @@ -body {margin: 0; padding: 0;} -a {text-decoration: none; color: #969696;} -a img {border: none;} -html, input, select, textarea, h1, h2, h3, h4, h5, h6 { - font-size: 100%; +body { + margin: 0; + padding: 0; +} +a { + text-decoration: none; + color: #969696; +} +a img { + border: none; +} +html, +input, +select, +textarea, +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: 100%; } body { - font: 0.8125em/1em Verdana, sans-serif; - line-height: 1.3em; - color: #333; - background: #FFF; - margin: 0em; + font: 0.8125em/1em Verdana, sans-serif; + line-height: 1.3em; + color: #333; + background: #fff; + margin: 0em; } /*a:link, a:visited { @@ -21,467 +38,582 @@ a:link:hover, a:visited:hover { color: #BB0000; text-decoration: underline; }*/ -a, a:visited { - color: #BB0000; - text-decoration:none; +a, +a:visited { + color: #bb0000; + text-decoration: none; } a:hover { - background-color: transparent; - color: #BB0000; - text-decoration: underline; + background-color: transparent; + color: #bb0000; + text-decoration: underline; } -a img { border: none; } +a img { + border: none; +} .rst-content h1 { - font-size: 1.2em; - font-weight: bold; - color: #353535; + font-size: 1.2em; + font-weight: bold; + color: #353535; } .nett { - clear: both; - height: 5px; + clear: both; + height: 5px; } .wazing { - clear: both; - position: relative; + clear: both; + position: relative; } /* Min-width */ #layout { - min-width: 740px; + min-width: 740px; } #content { - /*margin-top: 1em;*/ - margin-bottom: 0em; + /*margin-top: 1em;*/ + margin-bottom: 0em; } #content { - position: relative; - margin-left: 2em; - margin-right: 2em; + position: relative; + margin-left: 2em; + margin-right: 2em; } - -#content ul, #content ul ul, #content ol { - list-style: square; - padding: .7em; - padding-left: 2em; - font-size: 0.8em; - clear: both; +#content ul, +#content ul ul, +#content ol { + list-style: square; + padding: 0.7em; + padding-left: 2em; + font-size: 0.8em; + clear: both; } #content ul ul { - font-size: 1.1em; - padding-left: 0; + font-size: 1.1em; + padding-left: 0; } #content li { - padding: .2em; - padding-left: 0; + padding: 0.2em; + padding-left: 0; } #content li a { - padding: .1em 0; + padding: 0.1em 0; } #content h1 { - color: #6a0307; - font-weight: bold; - display: inline; - font-size: 120%; + color: #6a0307; + font-weight: bold; + display: inline; + font-size: 120%; } #content h3 { - color: #6a0307; - font-weight: bold; - display: inline; + color: #6a0307; + font-weight: bold; + display: inline; } #content h2 { - color: #6a0307; + color: #6a0307; } -#logo a, #logo a:hover { border: none; background: transparent; } +#logo a, +#logo a:hover { + border: none; + background: transparent; +} #header { - padding: 0em; -/* background: url("../images/waves.png") 100% 0% no-repeat; */ + padding: 0em; + /* background: url("../images/waves.png") 100% 0% no-repeat; */ } -#content_header, #header{ - margin-bottom: .8em; +#content_header, +#header { + margin-bottom: 0.8em; } -#content_header{ - width:100%; - border-collapse:collapse; +#content_header { + width: 100%; + border-collapse: collapse; } -#content_header td{ - vertical-align: top; +#content_header td { + vertical-align: top; } -#content_header td.rightcol{ - text-align:right; - white-space:nowrap; /**this implies to stretach righcol to accomodate all the width, +#content_header td.rightcol { + text-align: right; + white-space: nowrap; /**this implies to stretach righcol to accomodate all the width, UNLESS there is a div.fixedWidthAsPlayer inside td.rightcol (see blow)*/ } -#content_header td.rightcol div.fixedWidthAsPlayer{ - width:374px; /*must be width+2*padding, see #rightcol below*/ - float:right; - white-space:normal; /*to override no-wrap defined in #content_header td.rightcol*/ +#content_header td.rightcol div.fixedWidthAsPlayer { + width: 374px; /*must be width+2*padding, see #rightcol below*/ + float: right; + white-space: normal; /*to override no-wrap defined in #content_header td.rightcol*/ } -#content_header td.rightcol div.fixedWidthAsPlayer a{ - display:inline-block; - margin-top:0.5ex; +#content_header td.rightcol div.fixedWidthAsPlayer a { + display: inline-block; + margin-top: 0.5ex; } #rightcol { - width: 362px; /**if u change this, change also width #content_header td.rightcol, see above*/ - padding: 6px; /**if u change this, change also width #content_header td.rightcol, see above*/ - position: relative; - z-index: 1; - float: right; - border: 1px solid #999; - background-color: #eee; - -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; -} - -#rightcol .analyzer, #rightcol .exporter, .markers { - text-align: left; - position: relative; + width: 362px; /**if u change this, change also width #content_header td.rightcol, see above*/ + padding: 6px; /**if u change this, change also width #content_header td.rightcol, see above*/ + position: relative; + z-index: 1; + float: right; + border: 1px solid #999; + background-color: #eee; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} + +#rightcol .analyzer, +#rightcol .exporter, +.markers { + text-align: left; + position: relative; } #rightcol form { - width: 360px; - margin-top: 5px; - background-color: #fff; - border: 1px solid #adadad; + width: 360px; + margin-top: 5px; + background-color: #fff; + border: 1px solid #adadad; } #rightcol p { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } #collection_player { - background: transparent; - /* background-image: url(../images/grid_bg.png); */ + background: transparent; + /* background-image: url(../images/grid_bg.png); */ } #collection_player .title { - padding: 2px 5px 7px 5px; + padding: 2px 5px 7px 5px; } - .exporter { - background-color: #fff; - border: 1px solid #adadad; - padding: 2px; - height: 26px; - margin: 5px 0 0; - font-size: 0.9em; - color: #000; - font-weight: bold; -} - -.analyzer, .markers { - background-color: #fff; - color: #000; - border: 1px solid #adadad; - width: 356px; - padding: 2px; - /* margin: 5px 0 0; */ - font-size: 1em; + background-color: #fff; + border: 1px solid #adadad; + padding: 2px; + height: 26px; + margin: 5px 0 0; + font-size: 0.9em; + color: #000; + font-weight: bold; } +.analyzer, .markers { - max-height: 500px; - overflow-y: scroll; + background-color: #fff; + color: #000; + border: 1px solid #adadad; + width: 356px; + padding: 2px; + /* margin: 5px 0 0; */ + font-size: 1em; } -.vscroll { - max-height: 300px; - overflow-y: scroll; - width: 100%; +.markers { + max-height: 500px; + overflow-y: scroll; } +.vscroll { + max-height: 300px; + overflow-y: scroll; + width: 100%; +} .analyzer-title { - background-color: #f2f2f2; - color: #000; - padding: 2px; + background-color: #f2f2f2; + color: #000; + padding: 2px; } .analyzer-line { - background-color: #fdfdfd; - color: #000; - padding: 4px; + background-color: #fdfdfd; + color: #000; + padding: 4px; } /* Geographic navigator */ -ul.continents, ul.continents ul { list-style: none; margin: 0; padding: 0;} -ul.continents { margin: 1em 0; } -ul.continents ul {margin-left: 0; margin-bottom: 0.9em; padding: 0 1em 1em 0;} -ul.continents li.name { width: 460px; float: left; clear: left; margin-right: 30px;} -ul.continents li.odd { clear: none;} -ul.continents li.name b { font-size: 120%; font-weight: bold; } -ul.continents ul li { display: inline; padding-right: 2em;} -ul.continents ul li a { line-height: 1.8em; } +ul.continents, +ul.continents ul { + list-style: none; + margin: 0; + padding: 0; +} +ul.continents { + margin: 1em 0; +} +ul.continents ul { + margin-left: 0; + margin-bottom: 0.9em; + padding: 0 1em 1em 0; +} +ul.continents li.name { + width: 460px; + float: left; + clear: left; + margin-right: 30px; +} +ul.continents li.odd { + clear: none; +} +ul.continents li.name b { + font-size: 120%; + font-weight: bold; +} +ul.continents ul li { + display: inline; + padding-right: 2em; +} +ul.continents ul li a { + line-height: 1.8em; +} /* Collection */ #content .intro { - font-size: 1em; - font-weight: bold; - color: #444; - margin: 5px 0; - font-size: 0.8em; + font-size: 1em; + font-weight: bold; + color: #444; + margin: 5px 0; + font-size: 0.8em; } #content .intro span { - padding: 3px; - + padding: 3px; } /* Forms */ -input, textarea, select { margin: 2px } -input, select { vertical-align: middle } -input[type=button], input[type=submit], input[type=reset] { - background: #f2f2f2; - color: #444; - border: 3px double #ccc; - padding: .1em .5em; - font-weight: bold; - cursor: pointer; -} -input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover { - background: #8D8C94; - color: #fff; -} -input[type=button][disabled], input[type=submit][disabled], -input[type=reset][disabled] { - background: #f6f6f6; - border-style: solid; - color: #999; -} -input[type=text], input[type=password], input.textwidget, textarea { border: 1px solid #ccc; } -input[type=text], input[type=password], input.textwidget { padding: .25em .1em } -input[type=text]:focus, input[type=password]:focus, input.textwidget:focus, textarea:focus { - border-color: #aaa; -} -option { border-bottom: 1px dotted #d7d7d7; } -fieldset { border: 1px solid #d7d7d7; padding: .5em; margin: 0 } -fieldset.iefix { background: transparent; border: none; padding: 0; margin: 0 } -* html fieldset.iefix { width: 98% } -fieldset.iefix p { margin: 0 } -legend { color: #999; padding: 0 .25em; font-size: 90%; font-weight: bold } -label.disabled { color: #d7d7d7 } -.buttons { margin: .5em .5em .5em 0 } -.buttons form, .buttons form div { display: inline } -.buttons input { margin: 1em .5em .1em 0 } +input, +textarea, +select { + margin: 2px; +} +input, +select { + vertical-align: middle; +} +input[type="button"], +input[type="submit"], +input[type="reset"] { + background: #f2f2f2; + color: #444; + border: 3px double #ccc; + padding: 0.1em 0.5em; + font-weight: bold; + cursor: pointer; +} +input[type="button"]:hover, +input[type="submit"]:hover, +input[type="reset"]:hover { + background: #8d8c94; + color: #fff; +} +input[type="button"][disabled], +input[type="submit"][disabled], +input[type="reset"][disabled] { + background: #f6f6f6; + border-style: solid; + color: #999; +} +input[type="text"], +input[type="password"], +input.textwidget, +textarea { + border: 1px solid #ccc; +} +input[type="text"], +input[type="password"], +input.textwidget { + padding: 0.25em 0.1em; +} +input[type="text"]:focus, +input[type="password"]:focus, +input.textwidget:focus, +textarea:focus { + border-color: #aaa; +} +option { + border-bottom: 1px dotted #d7d7d7; +} +fieldset { + border: 1px solid #d7d7d7; + padding: 0.5em; + margin: 0; +} +fieldset.iefix { + background: transparent; + border: none; + padding: 0; + margin: 0; +} +* html fieldset.iefix { + width: 98%; +} +fieldset.iefix p { + margin: 0; +} +legend { + color: #999; + padding: 0 0.25em; + font-size: 90%; + font-weight: bold; +} +label.disabled { + color: #d7d7d7; +} +.buttons { + margin: 0.5em 0.5em 0.5em 0; +} +.buttons form, +.buttons form div { + display: inline; +} +.buttons input { + margin: 1em 0.5em 0.1em 0; +} .inlinebuttons input { - font-size: 70%; - border-width: 1px; - border-style: dotted; - margin: 0; - padding: 0.1em; - background: none; + font-size: 70%; + border-width: 1px; + border-style: dotted; + margin: 0; + padding: 0.1em; + background: none; } /* Quick search */ #quick_search { - position: absolute; - top: 1.7em; - left: 35%; - background-color: #6a0307; - padding: 0.3em 0em 0.3em 0.3em; - -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; + position: absolute; + top: 1.7em; + left: 35%; + background-color: #6a0307; + padding: 0.3em 0em 0.3em 0.3em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; } #quick_search form { - float: left; - margin-right: 12px; + float: left; + margin-right: 12px; } #quick_search p { - margin-top: .3em; - clear: left; + margin-top: 0.3em; + clear: left; } #quick_search a { - font-size: .8em; - font-weight: bold; - vertical-align: middle; + font-size: 0.8em; + font-weight: bold; + vertical-align: middle; } #quick_search input { - vertical-align: middle; - font-size: .8em; - margin-right: 0; - -moz-border-radius: 5px 5px 5px 5px; - -webkit-border-radius: 5px 5px 5px 5px; - border-radius: 5px 5px 5px 5px; + vertical-align: middle; + font-size: 0.8em; + margin-right: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; } #quick_search_pattern { - background: #FFF url(search_bg.png) no-repeat; - padding: .4em .1em; - padding-left: 25px; - width: 180px; - color: #555; - font-weight: bold; + background: #fff url(search_bg.png) no-repeat; + padding: 0.4em 0.1em; + padding-left: 25px; + width: 180px; + color: #555; + font-weight: bold; } /* Authentication */ #auth_info { - color: #FFF; - font-weight: bold; - position: absolute; - top: 1.5em; - right: 1.1em; - margin-right: 1em; - font-size: 0.9em; - background-color: #6a0307; - padding: 1em; - -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; + color: #fff; + font-weight: bold; + position: absolute; + top: 1.5em; + right: 1.1em; + margin-right: 1em; + font-size: 0.9em; + background-color: #6a0307; + padding: 1em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; } #auth_info a { - color: #FFF; - font-size: 1em; - font-weight: bold; + color: #fff; + font-size: 1em; + font-weight: bold; } form.login { - font-size: 0.8em; - float: left; - margin-top: 2em; - margin-bottom: 4em; - padding: .5em; - border: 1px dotted #888; + font-size: 0.8em; + float: left; + margin-top: 2em; + margin-bottom: 4em; + padding: 0.5em; + border: 1px dotted #888; } .login-error { - color: #BB0000; + color: #bb0000; } form.login label { - display: block; - width: 11em; - float: left; - clear: left; - font-weight: bold; - padding-top: 0.3em; + display: block; + width: 11em; + float: left; + clear: left; + font-weight: bold; + padding-top: 0.3em; } form.login .submit { - float: right; - margin-top: 1em; + float: right; + margin-top: 1em; } /* Search form */ #searchform { - margin: 15px 0; + margin: 15px 0; } #searchform fieldset { - padding: 0; - padding: .5em; - width: 650px; - border: none; - border: 1px solid #6a0307; - margin-bottom: 1em; - -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; + padding: 0; + padding: 0.5em; + width: 650px; + border: none; + border: 1px solid #6a0307; + margin-bottom: 1em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; } #searchform p { - background-color: #fff; - padding: .5em 0; + background-color: #fff; + padding: 0.5em 0; } #searchform label { - font-size: 0.8em; - display: block; - float: left; - width: 30%; - margin-left: 15px; - margin-top: .2em; - line-height: 1.8em; - font-weight: bold; - color: #333; - text-transform: uppercase; + font-size: 0.8em; + display: block; + float: left; + width: 30%; + margin-left: 15px; + margin-top: 0.2em; + line-height: 1.8em; + font-weight: bold; + color: #333; + text-transform: uppercase; } #searchform select { - width: 59%; + width: 59%; } #searchform fieldset input { - width: 56%; + width: 56%; } -#searchform select, #searchform fieldset input { - font-size: 0.8em; +#searchform select, +#searchform fieldset input { + font-size: 0.8em; } #searchform .submit { - padding: 0; - clear: both; - width: 450px; + padding: 0; + clear: both; + width: 450px; } #searchform select.tiny { - width: 12%; + width: 12%; } /* Main navigation bar (borrowed from Trac) */ #menu { - background-color: #6a0307 ; - font: normal verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif; - border-top: .25em solid #6a0307; - padding-left:26px; + background-color: #6a0307; + font: normal verdana, "Bitstream Vera Sans", helvetica, arial, sans-serif; + border-top: 0.25em solid #6a0307; + padding-left: 26px; } -#menu a, #menu a:visited{ - display:inline-block; - color: #fff; - text-decoration:none; - border-bottom-width:.5em; - border-bottom-style: solid; - background-color: #6a0307; - -webkit-border-top-left-radius:5px 5px; - moz-border-radius-topleft: 5px 5px; - border-top-left-radius: 5px 5px; - -webkit-border-top-right-radius:5px 5px; - moz-border-radius-topright: 5px 5px; - border-top-right-radius: 5px 5px; - font-weight: bold; - font-size: 14px; - padding: .5em 1em; -} -#menu a:hover, #menu a.active{ - background-color: #FFF; - color: #6a0307; -} - -#menu .darkblue { border-bottom-color: #0f3179; } -#menu .blue { border-bottom-color: #4f628a; } -#menu .green { border-bottom-color: #92b220; } -#menu .yellow { border-bottom-color: #f3ad17; } -#menu .orange { border-bottom-color: #e65911; } -#menu .darkgreen { border-bottom-color: #006a12; } -#menu .black { border-bottom-color: #000000; } -#menu .red { border-bottom-color: #DD0000; } -#menu .violet { border-bottom-color: #A00020; } -#menu .origin { border-bottom-color: #6a0307; } - -* html #menu :link, * html #menu :visited { background-position: 1px 0 } +#menu a, +#menu a:visited { + display: inline-block; + color: #fff; + text-decoration: none; + border-bottom-width: 0.5em; + border-bottom-style: solid; + background-color: #6a0307; + -webkit-border-top-left-radius: 5px 5px; + moz-border-radius-topleft: 5px 5px; + border-top-left-radius: 5px 5px; + -webkit-border-top-right-radius: 5px 5px; + moz-border-radius-topright: 5px 5px; + border-top-right-radius: 5px 5px; + font-weight: bold; + font-size: 14px; + padding: 0.5em 1em; +} +#menu a:hover, +#menu a.active { + background-color: #fff; + color: #6a0307; +} + +#menu .darkblue { + border-bottom-color: #0f3179; +} +#menu .blue { + border-bottom-color: #4f628a; +} +#menu .green { + border-bottom-color: #92b220; +} +#menu .yellow { + border-bottom-color: #f3ad17; +} +#menu .orange { + border-bottom-color: #e65911; +} +#menu .darkgreen { + border-bottom-color: #006a12; +} +#menu .black { + border-bottom-color: #000000; +} +#menu .red { + border-bottom-color: #dd0000; +} +#menu .violet { + border-bottom-color: #a00020; +} +#menu .origin { + border-bottom-color: #6a0307; +} +* html #menu :link, +* html #menu :visited { + background-position: 1px 0; +} /* Drop Down Menus */ -.clear {clear:both} +.clear { + clear: both; +} #nav { - margin:0; - padding:0; - list-style:none; + margin: 0; + padding: 0; + list-style: none; } /* make the LI display inline */ @@ -489,773 +621,864 @@ form.login .submit { /* can be used in submenu */ #nav li { -display:inline-block; -position:relative; -z-index:500; + display: inline-block; + position: relative; + z-index: 500; } /* this is the parent menu */ #nav li a { -display:block; -text-align:center; + display: block; + text-align: center; } /* you can make a different style for default selected value */ #nav a.selected { -color:#FFF; + color: #fff; } /* submenu, it's hidden by default */ #nav ul { - position:absolute; - left:0; - display:none; - margin:0 0 0 -2px; - padding:0; - list-style: none outside none; - border-left:2px solid #6a0307; - border-right:2px solid #6a0307; - border-bottom:2px solid #6a0307; - background-color: #6a0307; - color: #FFF; + position: absolute; + left: 0; + display: none; + margin: 0 0 0 -2px; + padding: 0; + list-style: none outside none; + border-left: 2px solid #6a0307; + border-right: 2px solid #6a0307; + border-bottom: 2px solid #6a0307; + background-color: #6a0307; + color: #fff; } #nav ul li { - width:100px; - float:left; - border-bottom:0px solid #fff; + width: 100px; + float: left; + border-bottom: 0px solid #fff; } /* display block will make the link fill the whole area of LI */ #nav ul a { - display:block; - height:15px; - padding: 5px 5px; - font-size: 11px; - text-align:left; - -webkit-border-top-left-radius:0px 0px; - moz-border-radius-topleft: 0px 0px; - border-top-left-radius: 0px 0px; - -webkit-border-top-right-radius:0px 0px; - moz-border-radius-topright: 0px 0px; - border-top-right-radius: 0px 0px; - border-bottom-width: 0px; + display: block; + height: 15px; + padding: 5px 5px; + font-size: 11px; + text-align: left; + -webkit-border-top-left-radius: 0px 0px; + moz-border-radius-topleft: 0px 0px; + border-top-left-radius: 0px 0px; + -webkit-border-top-right-radius: 0px 0px; + moz-border-radius-topright: 0px 0px; + border-top-right-radius: 0px 0px; + border-bottom-width: 0px; } #nav ul a:hover { - background-color: #FFF ; - color: #6a0307 ; + background-color: #fff; + color: #6a0307; } #nav ul a:active { - background-color: #FFF; - color: #6a0307 ; + background-color: #fff; + color: #6a0307; } - - /* Footer (borrowed from Trac) */ #footer { - background: #6a0307; - clear: both; - color: #FFF; - font-size: 10px; - border-top: 1px solid; - height: 31px; - padding: 0.5em 0.5em 1.1em 0.5em; - margin-top: 2.5em; -} -#footer :link, #footer :visited { color: #FFF; } -#footer hr { display: none } -#footer p { margin: 0; } + background: #6a0307; + clear: both; + color: #fff; + font-size: 10px; + border-top: 1px solid; + height: 31px; + padding: 0.5em 0.5em 1.1em 0.5em; + margin-top: 2.5em; +} +#footer :link, +#footer :visited { + color: #fff; +} +#footer hr { + display: none; +} +#footer p { + margin: 0; +} #footer p.left { - float: left; - margin-left: 1em; - padding: 0 1em; - border-left: 1px solid #d7d7d7; - border-right: 1px solid #d7d7d7; + float: left; + margin-left: 1em; + padding: 0 1em; + border-left: 1px solid #d7d7d7; + border-right: 1px solid #d7d7d7; } #footer p.right { - float: right; - text-align: right; + float: right; + text-align: right; } #footer p.center { - text-align: center; + text-align: center; } /* Homepage */ -.homelinks a { font-size: 120%;} - +.homelinks a { + font-size: 120%; +} /* Definition list */ dl { - position: relative; - margin: .5em 0; -} -dl dt, dl dd { - position: relative; - margin: 0; - margin-bottom: .5em; - padding: 0; - font-size: 0.8em; - line-height: 1.4em; - min-height: 1.4em; + position: relative; + margin: 0.5em 0; } +dl dt, dl dd { - border: 1px solid transparent; + position: relative; + margin: 0; + margin-bottom: 0.5em; + padding: 0; + font-size: 0.8em; + line-height: 1.4em; + min-height: 1.4em; +} +dl dd { + border: 1px solid transparent; } dl dt { - float: left; - clear: left; + float: left; + clear: left; } dl.listing dt { - width: 18em; - background-color: #f9f9f9; - border: .1em solid #eee; - border-right: .3em solid #ddd; - padding-left: .3em; - margin-right: .8em; - color: #444; + width: 18em; + background-color: #f9f9f9; + border: 0.1em solid #eee; + border-right: 0.3em solid #ddd; + padding-left: 0.3em; + margin-right: 0.8em; + color: #444; } dl.listing dt.group { - float: none; - margin-top: .9em; - background-color: #DDDDDD; - border-color: #ccc; - border-right: .1em solid #ccc; - width: 18.2em; + float: none; + margin-top: 0.9em; + background-color: #dddddd; + border-color: #ccc; + border-right: 0.1em solid #ccc; + width: 18.2em; } dl.listing dd { - margin-left: 19.4em; - font-weight: bold; + margin-left: 19.4em; + font-weight: bold; } /* dublin core display */ h4.dublincore { - text-align: left; - padding: 5px 0 10px; - font-weight: bold; - color: #666; + text-align: left; + padding: 5px 0 10px; + font-weight: bold; + color: #666; } dl.dublincore dt { - margin-right: .8em; - width: 23em !important; - font-style: italic; + margin-right: 0.8em; + width: 23em !important; + font-style: italic; } dl.dublincore dd { - margin-left: 23.4em; - font-weight: bold; + margin-left: 23.4em; + font-weight: bold; } dl.dublincore dt span { - width: 13em; - display: block; - float: left; - font-style: normal; - background-color: #f9f9f9; - border: 1px solid #eee; - border-right: 3px solid #ddd; - padding-left: .3em; - margin-right: 1.2em; - color: #444; + width: 13em; + display: block; + float: left; + font-style: normal; + background-color: #f9f9f9; + border: 1px solid #eee; + border-right: 3px solid #ddd; + padding-left: 0.3em; + margin-right: 1.2em; + color: #444; } dl.dublincore .caption { - background-color: #B8B7C1; - margin: .5em 0; - margin-top: 0; - border-bottom: 1px dotted #666; - padding-top: .4em; - padding-bottom: .4em; - padding-left: .3em; - color: #fff; - font-weight: bold; - border-right: 1px solid #fff; + background-color: #b8b7c1; + margin: 0.5em 0; + margin-top: 0; + border-bottom: 1px dotted #666; + padding-top: 0.4em; + padding-bottom: 0.4em; + padding-left: 0.3em; + color: #fff; + font-weight: bold; + border-right: 1px solid #fff; } dl.dublincore dt.caption span { - background-color: #B8B7C1; - border: none; - border-right: 1px solid #fff; - color: #fff; + background-color: #b8b7c1; + border: none; + border-right: 1px solid #fff; + color: #fff; } dl.dublincore dd.caption { - padding-top: .3em; - padding-left: .4em; - margin-left: 23.4em; + padding-top: 0.3em; + padding-left: 0.4em; + margin-left: 23.4em; } /* infos item/collection */ -.infos, .extraInfos { - margin-bottom: 15px; +.infos, +.extraInfos { + margin-bottom: 15px; } -.infos dl, .infos table { - position: relative; - font-size: 105%; +.infos dl, +.infos table { + position: relative; + font-size: 105%; } -.extraInfos dl, .extraInfos table { - position: relative; - font-size: 105%; +.extraInfos dl, +.extraInfos table { + position: relative; + font-size: 105%; } .extraInfos div { - padding: 0; - margin-bottom: 5px; + padding: 0; + margin-bottom: 5px; } .extraInfos .nett { - position: relative; - height: 0; - margin-bottom: -5px; + position: relative; + height: 0; + margin-bottom: -5px; } .extraInfos h4 { - /* clear: both; */ - font-size: 1em; - line-height: 1.4em; - border-bottom: 1px dotted #aaa; - color: #6a0307; + /* clear: both; */ + font-size: 1em; + line-height: 1.4em; + border-bottom: 1px dotted #aaa; + color: #6a0307; } .with-rightcol .extraInfos h4 { - margin-right: 395px; + margin-right: 395px; } .extraInfos h4 a { - position: relative; - display: block; - color: #6a0307 !important; - text-decoration: none; - margin: 0; - background: #fff url(../images/more.png) no-repeat left top; - background-position: 0 -16px; - padding-bottom: 2px; - padding-left: 16px; - border-bottom: none !important; - outline: none; + position: relative; + display: block; + color: #6a0307 !important; + text-decoration: none; + margin: 0; + background: #fff url(../images/more.png) no-repeat left top; + background-position: 0 -16px; + padding-bottom: 2px; + padding-left: 16px; + border-bottom: none !important; + outline: none; } .extraInfos h4 a:hover { - background-color: transparent; - border-bottom: none; - color: #6a0307 !important; - text-decoration:none; + background-color: transparent; + border-bottom: none; + color: #6a0307 !important; + text-decoration: none; } .extraInfos .folded h4 { - border-bottom: none; + border-bottom: none; } .extraInfos .folded h4 a { - background-position: 0 1px; + background-position: 0 1px; } /* Pagination */ .pagination { - margin-top: .7em; - margin-bottom: .3em; - padding: .3em 0; - font-size: 1em; - background-color: #fff; - border-bottom: 1px solid #aaa; - color: #333; - font-weight: bold; + margin-top: 0.7em; + margin-bottom: 0.3em; + padding: 0.3em 0; + font-size: 1em; + background-color: #fff; + border-bottom: 1px solid #aaa; + color: #333; + font-weight: bold; } .pagination a { - background-color: #fff; - border-bottom: none; - font-size: 1em; - padding: .3em; + background-color: #fff; + border-bottom: none; + font-size: 1em; + padding: 0.3em; } /* Item instruments */ div.instruments { - position: relative; - margin-left: -.7em; - margin-right: .5em; + position: relative; + margin-left: -0.7em; + margin-right: 0.5em; } table.instruments { - border: none; - border-collapse: separate; - /* width: 100%; */ - border-spacing: .7em; + border: none; + border-collapse: separate; + /* width: 100%; */ + border-spacing: 0.7em; } table.instruments td { - font-size: .8em; - padding: 0 .2em; + font-size: 0.8em; + padding: 0 0.2em; } table.instruments thead td { - background-color: #F9F9F9; - border: .1em solid #E1E1E1; - border-bottom: .3em solid #E1E1E1; + background-color: #f9f9f9; + border: 0.1em solid #e1e1e1; + border-bottom: 0.3em solid #e1e1e1; } table.instruments tbody td { - border-bottom: .1em solid #E1E1E1; + border-bottom: 0.1em solid #e1e1e1; } /* Styles for tabular listings (stolen from trac) */ table.listing { - - border-spacing: 0; + border-spacing: 0; } .fullpage table.listing { - width: 100%; - font-size: 105%; + width: 100%; + font-size: 105%; } table.listing th { - text-align: left; - padding: 0 14em .1em 0; - font-size: 1em; + text-align: left; + padding: 0 14em 0.1em 0; + font-size: 1em; } -table.listing th, table.listing td { - font-size: 0.8em; - border-bottom: 1px solid #dfdfdf; +table.listing th, +table.listing td { + font-size: 0.8em; + border-bottom: 1px solid #dfdfdf; +} +table.listing thead { + background: #e8eaf0; } -table.listing thead { background: #e8eaf0 } table.listing thead th { - font-size: 0.9em; - padding: 3px .5em 3px; + font-size: 0.9em; + padding: 3px 0.5em 3px; } -table.listing thead th :link:hover, table.listing thead th :visited:hover { - background-color: transparent; +table.listing thead th :link:hover, +table.listing thead th :visited:hover { + background-color: transparent; } /*conflicts with buttons inside table*/ /*table.listing a { border: none; }*/ table.listing thead th a { - padding-right: 12px; + padding-right: 12px; +} +table.listing th.asc a, +table.listing th.desc a { + font-weight: bold; } -table.listing th.asc a, table.listing th.desc a { font-weight: bold } -table.listing th.asc a, table.listing th.desc a { - background-position: 100% 50%; - background-repeat: no-repeat; +table.listing th.asc a, +table.listing th.desc a { + background-position: 100% 50%; + background-repeat: no-repeat; } -table.listing th.asc a { background-image: url(../images/asc.png) } -table.listing th.desc a { background-image: url(../images/desc.png) } -table.listing tbody td, table.listing tbody th { - padding: .33em .5em; - vertical-align: top; - font-weight: normal; +table.listing th.asc a { + background-image: url(../images/asc.png); +} +table.listing th.desc a { + background-image: url(../images/desc.png); +} +table.listing tbody td, +table.listing tbody th { + padding: 0.33em 0.5em; + vertical-align: top; + font-weight: normal; } table.listing tbody td { - font-weight: bold; + font-weight: bold; } table.listing tbody td.tmp { - width: 100%; + width: 100%; } -table.listing tbody td a:hover, table.listing tbody th a:hover { - background-color: transparent; +table.listing tbody td a:hover, +table.listing tbody th a:hover { + background-color: transparent; +} +table.listing tbody tr { + border-top: 1px solid #ddd; +} +table.listing tbody tr.even { + background-color: #fcfcfc; +} +table.listing tbody tr.odd { + background-color: #f7f7f7; +} +table.listing tbody tr:hover { + background: #f7f8fa !important; } -table.listing tbody tr { border-top: 1px solid #ddd } -table.listing tbody tr.even { background-color: #fcfcfc } -table.listing tbody tr.odd { background-color: #f7f7f7 } -table.listing tbody tr:hover { background: #f7f8fa !important } table td.error { - color: red; - font-weight: bold; + color: red; + font-weight: bold; } -.infos li.error{ - color: red; - font-weight: bold; - font-size: 110%; +.infos li.error { + color: red; + font-weight: bold; + font-size: 110%; } .gmap { - border: solid 1px #888; - margin-top: 0.8em; + border: solid 1px #888; + margin-top: 0.8em; } .rst-content { - padding-top: 5px; + padding-top: 5px; } .rst-content h1 { - color: #6a0307; + color: #6a0307; } .rst-content img.align-left { - float: left; - margin-right: 2ex; - margin-top: 0.6ex; - margin-bottom: 0.5ex; + float: left; + margin-right: 2ex; + margin-top: 0.6ex; + margin-bottom: 0.5ex; } .rst-content img.align-right { - float: left; - margin-left: 2ex; - margin-top: 0.6ex; - margin-bottom: 0.5ex; + float: left; + margin-left: 2ex; + margin-top: 0.6ex; + margin-bottom: 0.5ex; } img.align-left { - float: left; - padding-bottom: 1ex; - padding-right: 1ex; + float: left; + padding-bottom: 1ex; + padding-right: 1ex; } -#content .rst-content ul, #content .rst-content ol { - clear: none; - font-size: 1em; - margin-left: 0.4em; +#content .rst-content ul, +#content .rst-content ol { + clear: none; + font-size: 1em; + margin-left: 0.4em; } #module-set { - float: right; - clear: right; + float: right; + clear: right; } #module-set .module { - border: 1px solid #000; - background-image: url(../images/grid_bg.png); - padding: 0.2em; - margin: 0 0 1.5em 1.5em; - -moz-border-radius: 8px 0px 11px 11px; - -webkit-border-radius: 8px 0px 11px 11px; - border-radius: 11px 0px 11px 11px; + border: 1px solid #000; + background-image: url(../images/grid_bg.png); + padding: 0.2em; + margin: 0 0 1.5em 1.5em; + -moz-border-radius: 8px 0px 11px 11px; + -webkit-border-radius: 8px 0px 11px 11px; + border-radius: 11px 0px 11px 11px; } #module-set .module h3 { - color: #FFF; - font-size: 1.1em; - font-weight: bold; + color: #fff; + font-size: 1.1em; + font-weight: bold; } #module-set .module a:hover { - text-decoration: none; + text-decoration: none; } #module-set .module div { - -moz-border-radius: 8px 0px 8px 8px; - -webkit-border-radius: 8px 0px 8px 8px; - border-radius: 8px 0px 8px 8px; - } + -moz-border-radius: 8px 0px 8px 8px; + -webkit-border-radius: 8px 0px 8px 8px; + border-radius: 8px 0px 8px 8px; +} #module-set .module img { - -moz-border-radius: 8px 0px 8px 8px; - -webkit-border-radius: 8px 0px 8px 8px; - border-radius: 8px 0px 8px 8px; - } + -moz-border-radius: 8px 0px 8px 8px; + -webkit-border-radius: 8px 0px 8px 8px; + border-radius: 8px 0px 8px 8px; +} -#module-set .module ul, li { - -moz-border-radius: 8px 0px 8px 8px; - -webkit-border-radius: 8px 0px 8px 8px; - border-radius: 8px 0px 8px 8px; - } +#module-set .module ul, +li { + -moz-border-radius: 8px 0px 8px 8px; + -webkit-border-radius: 8px 0px 8px 8px; + border-radius: 8px 0px 8px 8px; +} a.image-link { - border: none; + border: none; } .map-thumbnail { - border: solid 1px #999; + border: solid 1px #999; } .home-content .module { - width: 400px; + width: 400px; } .home-description { - padding-right: 33%; - display: block; + padding-right: 33%; + display: block; } #content ul.playlist { - list-style-type: none; - border-top: solid 1px #e1e1e1; - margin: 0; - padding: 0; + list-style-type: none; + border-top: solid 1px #e1e1e1; + margin: 0; + padding: 0; } #content ul.playlist li { - display: block; - border: solid 1px #e1e1e1; - border-top: 0; - background: white; - margin: 0; - padding: 1em; -} - - -.tab_unselected, .tab_unselected:hover, .tab_unselected:visited { - background-color: #cccccc; - font-weight: normal; - color: #333333; - border: 1px solid #cccccc; - -} -.tab_selected, .tab_selected:hover, .tab_selected:visited { - background-color: #ffffff; - color: #000000; - font-weight: bold; - border-top: 1px solid #999999; - border-right: 1px solid #999999; - border-left: 1px solid #999999; - border-bottom: 1px solid #ffffff; - -} - -.tab, .tab:hover, .tab:visited{ - margin-top: 1ex; - display: inline-block; - margin-left: 0px; - padding: 1ex; - -moz-border-radius: 1ex 1ex 0ex 0ex; -webkit-border-radius: 1ex 1ex 0ex 0ex; border-radius: 1ex 1ex 0ex 0ex; -} - -.roundBorder4{ - /*padding: 0.3em 0.8em 0.8em 0.8em; + display: block; + border: solid 1px #e1e1e1; + border-top: 0; + background: white; + margin: 0; + padding: 1em; +} + +.tab_unselected, +.tab_unselected:hover, +.tab_unselected:visited { + background-color: #cccccc; + font-weight: normal; + color: #333333; + border: 1px solid #cccccc; +} +.tab_selected, +.tab_selected:hover, +.tab_selected:visited { + background-color: #ffffff; + color: #000000; + font-weight: bold; + border-top: 1px solid #999999; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #ffffff; +} + +.tab, +.tab:hover, +.tab:visited { + margin-top: 1ex; + display: inline-block; + margin-left: 0px; + padding: 1ex; + -moz-border-radius: 1ex 1ex 0ex 0ex; + -webkit-border-radius: 1ex 1ex 0ex 0ex; + border-radius: 1ex 1ex 0ex 0ex; +} + +.roundBorder4 { + /*padding: 0.3em 0.8em 0.8em 0.8em; margin: 0 0 1.5em 1.5em;*/ - -moz-border-radius: 4px 4px 4px 4px; - -webkit-border-radius: 4px 4px 4px 4px; - border-radius: 4px 4px 4px 4px; + -moz-border-radius: 4px 4px 4px 4px; + -webkit-border-radius: 4px 4px 4px 4px; + border-radius: 4px 4px 4px 4px; } -.roundBorder6{ - /*padding: 0.3em 0.8em 0.8em 0.8em; +.roundBorder6 { + /*padding: 0.3em 0.8em 0.8em 0.8em; margin: 0 0 1.5em 1.5em;*/ - -moz-border-radius: 6px 6px 6px 6px; - -webkit-border-radius: 6px 6px 6px 6px; - border-radius: 6px 6px 6px 6px; + -moz-border-radius: 6px 6px 6px 6px; + -webkit-border-radius: 6px 6px 6px 6px; + border-radius: 6px 6px 6px 6px; } -.roundBorder8{ - /*padding: 0.3em 0.8em 0.8em 0.8em; +.roundBorder8 { + /*padding: 0.3em 0.8em 0.8em 0.8em; margin: 0 0 1.5em 1.5em;*/ - -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; } -.roundBorder10{ - /*padding: 0.3em 0.8em 0.8em 0.8em; +.roundBorder10 { + /*padding: 0.3em 0.8em 0.8em 0.8em; margin: 0 0 1.5em 1.5em;*/ - -moz-border-radius: 10px 10px 10px 10px; - -webkit-border-radius: 10px 10px 10px 10px; - border-radius: 10px 10px 10px 10px; -} - -.markersdivUneditable{ - border: 0px !important; -} - -.markerdiv div{ - padding:0.7ex 1ex; -} -.markerdiv div[zero_top_padding]{ /*mathces any div with the attribute zero_top_padding set (whatever the value)*/ - padding-top:0px; -} -.markerdiv div *{ - vertical-align:middle; - font-family: sans-serif; -} -.markerdiv div input, .markerdiv div textarea{ - margin:0px; - padding:2px; -} -.markerdiv .ts-marker{ - background-image: url('../images/marker_tiny.png'); text-align: center; min-width:3ex; -} -.markerdiv .ts-marker, .markerdiv .markersdivOffset, .markerdiv .markersdivTitle, .markerdiv .markersdivAddPlaylist, .markerdiv .markersdivEdit{margin-right:.8ex;} -.markerdiv div a, .markerdiv div a:visited, .markerdiv div a:hover{ - display: inline-block; /*otherwise width and height do not work*/ - background-repeat: no-repeat; - text-decoration: none; - -} -.markerdiv .markersdivOffset, .markerdiv .markersdivOffset:hover, .markerdiv .markersdivOffset:visited{ - color: #000; -} -.markerdiv .ts-marker, .markerdiv .ts-marker:hover, .markerdiv .ts-marker:visited{ - font-family: monospace; background: #e65911;color: #FFF;padding-left: .3ex; padding-right:.3ex; + -moz-border-radius: 10px 10px 10px 10px; + -webkit-border-radius: 10px 10px 10px 10px; + border-radius: 10px 10px 10px 10px; +} + +.markersdivUneditable { + border: 0px !important; +} + +.markerdiv div { + padding: 0.7ex 1ex; +} +.markerdiv div[zero_top_padding] { + /*mathces any div with the attribute zero_top_padding set (whatever the value)*/ + padding-top: 0px; +} +.markerdiv div * { + vertical-align: middle; + font-family: sans-serif; +} +.markerdiv div input, +.markerdiv div textarea { + margin: 0px; + padding: 2px; +} +.markerdiv .ts-marker { + background-image: url("../images/marker_tiny.png"); + text-align: center; + min-width: 3ex; +} +.markerdiv .ts-marker, +.markerdiv .markersdivOffset, +.markerdiv .markersdivTitle, +.markerdiv .markersdivAddPlaylist, +.markerdiv .markersdivEdit { + margin-right: 0.8ex; +} +.markerdiv div a, +.markerdiv div a:visited, +.markerdiv div a:hover { + display: inline-block; /*otherwise width and height do not work*/ + background-repeat: no-repeat; + text-decoration: none; +} +.markerdiv .markersdivOffset, +.markerdiv .markersdivOffset:hover, +.markerdiv .markersdivOffset:visited { + color: #000; +} +.markerdiv .ts-marker, +.markerdiv .ts-marker:hover, +.markerdiv .ts-marker:visited { + font-family: monospace; + background: #e65911; + color: #fff; + padding-left: 0.3ex; + padding-right: 0.3ex; +} +.markersdivDelete { + background-image: url("../images/del_marker.png"); + width: 15px; + height: 2ex; + background-repeat: no-repeat; } -.markersdivDelete{ background-image: url('../images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;} /*backfround-repeat is redundant with .markerDiv a,.. defined above but this way .markersDivDelete is re-usable in other context (eg popupdiv*/ -.markersdivAddPlaylist{ background-image: url('../images/add_playlist_marker.png');width:13px;height:2ex; } -.markersdivTitle{ font-weight:bold;} -.markersdivEdit, .markersdivEdit:hover, .markersdivEdit:visited{ - line-height: normal; - color:#000; - background-position: -2px center; - padding-left: 13px; padding-right: 2px; - font-size: 65%; - border:2px solid #666; - background-color: #fff; - background-image: url('../images/edit_marker.png'); - -moz-border-radius: 1ex; -webkit-border-radius: 1ex; border-radius: 1ex; -} -.markersdivSave, .markersdivSave:hover, .markersdivSave:visited{ - background-color: #087714; - color: #fff; - font-weight: bold; - padding:.7ex; padding-left: 20px; - background-position: 5px center; - -moz-border-radius: 1ex;-webkit-border-radius: 1ex;border-radius: 1ex; - background-image: url('../images/ok.png'); -} -.markerdiv{ - border: 1px solid #aaaaaa; - margin-bottom: 1ex; - -moz-border-radius: 1e; - -webkit-border-radius: 1ex; - border-radius: 1ex; +.markersdivAddPlaylist { + background-image: url("../images/add_playlist_marker.png"); + width: 13px; + height: 2ex; +} +.markersdivTitle { + font-weight: bold; +} +.markersdivEdit, +.markersdivEdit:hover, +.markersdivEdit:visited { + line-height: normal; + color: #000; + background-position: -2px center; + padding-left: 13px; + padding-right: 2px; + font-size: 65%; + border: 2px solid #666; + background-color: #fff; + background-image: url("../images/edit_marker.png"); + -moz-border-radius: 1ex; + -webkit-border-radius: 1ex; + border-radius: 1ex; +} +.markersdivSave, +.markersdivSave:hover, +.markersdivSave:visited { + background-color: #087714; + color: #fff; + font-weight: bold; + padding: 0.7ex; + padding-left: 20px; + background-position: 5px center; + -moz-border-radius: 1ex; + -webkit-border-radius: 1ex; + border-radius: 1ex; + background-image: url("../images/ok.png"); +} +.markerdiv { + border: 1px solid #aaaaaa; + margin-bottom: 1ex; + -moz-border-radius: 1e; + -webkit-border-radius: 1ex; + border-radius: 1ex; } /*----------------------------------*/ -.component, .component_icon, .component:hover, .component_icon:hover, .component:visited, .component_icon:visited{ - background-position: 1ex .5ex; - -moz-border-radius: 1ex 1ex 1ex 1ex; - -webkit-border-radius: 1ex 1ex 1ex 1ex; - border-radius: 1ex 1ex 1ex 1ex; - padding:.7ex .7ex .7ex .7ex; - background-color: #f9f9f9; /*#626262;*/ - color:#444; - text-decoration: none; - margin:0; -} -.component + .component, .component + .component_icon, .component_icon + .component , -.component_icon + .component_icon{ - margin-left: .1ex; -} - -.component_icon, .component_icon:hover, .component_icon:visited{ - background-repeat: no-repeat; - background-position: 1ex .5ex; - padding:4px 8px 4px 26px; /*top right bottom left - last value depends on the icon size (default=16)*/ -} - -.button, .button:visited, .button:hover{ - font-weight: bold; - border: 1px solid #e1e1e1; - white-space:nowrap; - /* border-top: 1px solid #e1e1e1 !important; +.component, +.component_icon, +.component:hover, +.component_icon:hover, +.component:visited, +.component_icon:visited { + background-position: 1ex 0.5ex; + -moz-border-radius: 1ex 1ex 1ex 1ex; + -webkit-border-radius: 1ex 1ex 1ex 1ex; + border-radius: 1ex 1ex 1ex 1ex; + padding: 0.7ex 0.7ex 0.7ex 0.7ex; + background-color: #f9f9f9; /*#626262;*/ + color: #444; + text-decoration: none; + margin: 0; +} +.component + .component, +.component + .component_icon, +.component_icon + .component, +.component_icon + .component_icon { + margin-left: 0.1ex; +} + +.component_icon, +.component_icon:hover, +.component_icon:visited { + background-repeat: no-repeat; + background-position: 1ex 0.5ex; + padding: 4px 8px 4px 26px; /*top right bottom left - last value depends on the icon size (default=16)*/ +} + +.button, +.button:visited, +.button:hover { + font-weight: bold; + border: 1px solid #e1e1e1; + white-space: nowrap; + /* border-top: 1px solid #e1e1e1 !important; border-left: 1px solid #e1e1e1 !important; border-right: 1px solid #e1e1e1 !important; border-bottom: 1px solid #e1e1e1 !important;*/ } -.button:hover{ - border-top: 1px solid #f9f9f9 !important; - border-left: 1px solid #f9f9f9 !important; - border-bottom: 1px solid #999 !important; - border-right: 1px solid #999 !important; - background-color: #f4f4f4; /*#e9e9d9;*/ - color: #000; /*#6A0307;*/ +.button:hover { + border-top: 1px solid #f9f9f9 !important; + border-left: 1px solid #f9f9f9 !important; + border-bottom: 1px solid #999 !important; + border-right: 1px solid #999 !important; + background-color: #f4f4f4; /*#e9e9d9;*/ + color: #000; /*#6A0307;*/ } - -.list_item, .list_item:visited, .list_item:hover{ - display:block; - color:#6A0307; +.list_item, +.list_item:visited, +.list_item:hover { + display: block; + color: #6a0307; } -.list_item:hover{ - font-weight: bold; +.list_item:hover { + font-weight: bold; } -.icon_edit{ - background-image: url('../images/edit_page.png'); +.icon_edit { + background-image: url("../images/edit_page.png"); } -.icon_copy{ - background-image: url('../images/copy_page.png'); +.icon_copy { + background-image: url("../images/copy_page.png"); } -.icon_previous{ - background-image: url('../images/previous.png'); +.icon_previous { + background-image: url("../images/previous.png"); } -.icon_next{ - background-image: url('../images/next.png'); +.icon_next { + background-image: url("../images/next.png"); } -.icon_dublin_core{ - background-image: url('../images/dublin_core.png'); +.icon_dublin_core { + background-image: url("../images/dublin_core.png"); } -.icon_cancel{ - background-image: url('../images/cancel.png'); +.icon_cancel { + background-image: url("../images/cancel.png"); } -.icon_save{ - background-image: url('../images/save.png'); +.icon_save { + background-image: url("../images/save.png"); } -.icon_add{ - background-image: url('../images/add.png'); +.icon_add { + background-image: url("../images/add.png"); } -.icon_add_to_playlist{ - background-image: url('../images/add_to_playlist.png'); +.icon_add_to_playlist { + background-image: url("../images/add_to_playlist.png"); } -.icon_login{ - background-image: url('../images/password.png'); +.icon_login { + background-image: url("../images/password.png"); } -.icon_search{ - background-image: url('../images/find.png'); +.icon_search { + background-image: url("../images/find.png"); } -.icon_ok{ - background-image: url('../images/ok.png'); +.icon_ok { + background-image: url("../images/ok.png"); } -.icon_csv{ - background-image: url('../images/csv.png'); +.icon_csv { + background-image: url("../images/csv.png"); } -.icon_playlist{ - background-image: url('../images/playlist.png'); +.icon_playlist { + background-image: url("../images/playlist.png"); } -.icon_filter{ - background-image: url('../images/filter.png'); +.icon_filter { + background-image: url("../images/filter.png"); } -.icon_delete{ - background-image: url('../images/delete.png'); +.icon_delete { + background-image: url("../images/delete.png"); } -.icon_rss,.icon_rss:hover{ - background: url('../images/feed-icon-14x14.png') no-repeat; - background-position: 0ex .8ex; - padding:.0ex 0ex .8ex .7ex; - text-decoration: none; +.icon_rss, +.icon_rss:hover { + background: url("../images/feed-icon-14x14.png") no-repeat; + background-position: 0ex 0.8ex; + padding: 0ex 0ex 0.8ex 0.7ex; + text-decoration: none; } .addToPlaylist { - margin:0.5ex; - position: absolute; - display:none; - left: 0; - top: 0; + margin: 0.5ex; + position: absolute; + display: none; + left: 0; + top: 0; } - /*focus on elements*/ -a:focus,div:focus{ - -moz-outline: 1px dotted #999 !important; - outline: #999 dotted 1px; /*!important;*/ +a:focus, +div:focus { + -moz-outline: 1px dotted #999 !important; + outline: #999 dotted 1px; /*!important;*/ } -.infos input, .infos textarea{ - outline: none !important; - width: 600px; +.infos input, +.infos textarea { + outline: none !important; + width: 600px; } .related_media { - border-top: 1px dotted #6a0307; + border-top: 1px dotted #6a0307; } - #chatwindow { - min-height: 10em; - max-height: 42em; - border-bottom: 1px solid; - padding: 0.8em; - overflow: auto; - background-color: white; - font-size: 0.8125em; - -moz-border-radius: 8px 0px 8px 8px; - -webkit-border-radius: 8px 0px 8px 8px; - border-radius: 8px 0px 8px 8px; + min-height: 10em; + max-height: 42em; + border-bottom: 1px solid; + padding: 0.8em; + overflow: auto; + background-color: white; + font-size: 0.8125em; + -moz-border-radius: 8px 0px 8px 8px; + -webkit-border-radius: 8px 0px 8px 8px; + border-radius: 8px 0px 8px 8px; } .msg { - font-size: 0.9em; - } + font-size: 0.9em; +} .msg input { - -moz-border-radius: 8px 8px 8px 8px; - -webkit-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - } + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} .mod { - width: 66%; - float: left; -} \ No newline at end of file + width: 66%; + float: left; +} diff --git a/teleforma/static/teleforma/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css index 7abbec88..4203e1f6 100644 --- a/teleforma/static/teleforma/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -1490,6 +1490,16 @@ input,textarea{ display:inline-block; } +#module-set-left .sequences h3 { + display: block; + padding-bottom: 8px; + margin-bottom:1em; + width:100%; + color: black; + font-size: 1.3em; + border-bottom:1px solid #dfdfdf; +} + #module-set .ui-tabs.ui-widget-content{ margin-top: 15px; } @@ -2158,3 +2168,30 @@ form .exceed{ font-weight: bold; } +/*** TABS ***/ +.multipart-tabs li { + display: inline-block; +} + +.multipart-tabs .disabled { + color: grey; + pointer-events: none; +} +.multipart-tabs .active { + font-weight: bold; +} +.tab-content { + display: none; + padding: 6px 12px; + animation: fadeEffect 1s; +} + +@keyframes fadeEffect { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + diff --git a/teleforma/templates/quiz/question.html b/teleforma/templates/quiz/question.html index 9fcc271b..1e529730 100644 --- a/teleforma/templates/quiz/question.html +++ b/teleforma/templates/quiz/question.html @@ -12,7 +12,11 @@ {% if not can_access %}
-

Vous n'avez pas accès à ce quizz car vous n'avez pas complété les étapes 1 et/ou 2.

+ {% if seminar.is_multipart %} +

Vous n'avez pas accès à ce quiz car vous n'avez pas complété les étapes précédentes.

+ {% else %} +

Vous n'avez pas accès à ce quiz car vous n'avez pas complété les étapes 1 et/ou 2.

+ {% endif %}

 {% trans "Back" %} au séminaire diff --git a/teleforma/templates/teleforma/inc/steps.html b/teleforma/templates/teleforma/inc/steps.html index bee8e3d5..2fc9bcbd 100644 --- a/teleforma/templates/teleforma/inc/steps.html +++ b/teleforma/templates/teleforma/inc/steps.html @@ -1,52 +1,107 @@ {% load teleforma_tags %} {% load i18n %} -{% with seminar.docs_1 as docs %} -

-

{% trans "Step" %} 1

-
-{% include "teleforma/inc/document_step.html" %} -{% endwith %} - -{% with seminar.medias as medias %} -
-

{% trans "Step" %} 2

-
-{% include "teleforma/inc/media_step.html" %} -{% endwith %} - - -{% with seminar.docs_2 as docs %} -
-

{% trans "Step" %} 3

-
-{% include "teleforma/inc/document_step.html" %} -{% endwith %} - -{% if not seminar.conference in user.auditor.get.conferences.all %} - -{% with seminar.question as questions %} -
-

{% trans "Step" %} 4

-
-{% include "teleforma/inc/question_step.html" %} -{% endwith %} - - -{% if seminar_progress == 100 %} -{% with seminar.docs_correct as docs %} -
-

{% trans "Step" %} 5

-
-{% include "teleforma/inc/document_step.html" %} -{% endwith %} - -{% with seminar.form as form %} -
-

{% trans "Step" %} 6 :

-
-{% include "teleforma/inc/evaluation_form.html" %} -{% endwith %} -{% endif %} + +{% if seminar.is_multipart %} + {% seminar_parts seminar as parts %} +
+ {% for part in parts %} + {% if part.accessible %} +

Séquence {{ part.index }}

+ + {% with part.object.docs_1 as docs %} +
+

{% trans "Step" %} 1

+
+ {% include "teleforma/inc/document_step.html" %} + {% endwith %} + + {% if show_webclass %} + {% with seminar.conference as webclass %} +
+

{% trans "Step" %} 2

+
+ {% include "teleforma/inc/webclass_step.html" %} + {% endwith %} + {% else %} + {% with part.object.medias as medias %} +
+

{% trans "Step" %} 2

+
+ {% include "teleforma/inc/media_step.html" %} + {% endwith %} + {% endif %} + + + {% with part.object.docs_2 as docs %} +
+

{% trans "Step" %} 3

+
+ {% include "teleforma/inc/document_step.html" %} + {% endwith %} + {% endif %} + {% endfor %} +
+{% else %} + + {% with seminar.docs_1 as docs %} +
+

{% trans "Step" %} 1

+
+ {% include "teleforma/inc/document_step.html" %} + {% endwith %} + + + {% if show_webclass %} + {% with seminar.conference as webclass %} +
+

{% trans "Step" %} 2

+
+ {% include "teleforma/inc/webclass_step.html" %} + {% endwith %} + {% else %} + {% with seminar.medias as medias %} +
+

{% trans "Step" %} 2

+
+ {% include "teleforma/inc/media_step.html" %} + {% endwith %} + {% endif %} + + + {% with seminar.docs_2 as docs %} +
+

{% trans "Step" %} 3

+
+ {% include "teleforma/inc/document_step.html" %} + {% endwith %} + + {% if not seminar.conference in user.auditor.get.conferences.all and seminar.is_multipart %} + + {% with seminar.question as questions %} +
+

{% trans "Step" %} 4

+
+ {% include "teleforma/inc/question_step.html" %} + {% endwith %} + + + {% if seminar_progress == 100 %} + {% with seminar.docs_correct as docs %} +
+

{% trans "Step" %} 5

+
+ {% include "teleforma/inc/document_step.html" %} + {% endwith %} + + {% with seminar.form as form %} +
+

{% trans "Step" %} 6 :

+
+ {% include "teleforma/inc/evaluation_form.html" %} + {% endwith %} + {% endif %} + + {% endif %} {% endif %} \ No newline at end of file diff --git a/teleforma/templates/teleforma/inc/webclass_step.html b/teleforma/templates/teleforma/inc/webclass_step.html new file mode 100644 index 00000000..9183991c --- /dev/null +++ b/teleforma/templates/teleforma/inc/webclass_step.html @@ -0,0 +1,20 @@ +{% load teleforma_tags %} +{% load thumbnail %} +{% load i18n %} + + + + + + + + +
+ Voir la conférence + + {% if user in webclass.readers.all %} + + {% else %} + + {% endif %} +
diff --git a/teleforma/templates/teleforma/seminar_detail.html b/teleforma/templates/teleforma/seminar_detail.html index 96aaf513..c67bf1c6 100644 --- a/teleforma/templates/teleforma/seminar_detail.html +++ b/teleforma/templates/teleforma/seminar_detail.html @@ -48,9 +48,6 @@ } {% endif %} }); - - - @@ -78,8 +75,26 @@ var f = seminarUtils; $(document).ready(function () { onLoadSeminar('{{seminar.id}}', '{{user.username}}') + + $('.tab-link').bind('click', function(){ + openTab($(this).attr('href')); + }) + openTab($('.tab-link:not(.disabled)').last().attr('href')); }); + + function openTab(tab) { + $(".tab-content").each(function() { + $(this).hide(); + }) + $(".tab-link").each(function() { + $(this).removeClass('active'); + }) + $("a[href="+tab+"]").addClass('active'); + $(tab).show().addClass("active"); + } + + $(window).ready(function () { {% if user.is_staff %} var p = $('#publish'); @@ -99,6 +114,8 @@ }); }); + + @@ -158,16 +175,22 @@ {% endif %} - {% if seminar.is_multistep %} - {% for step in steps %} - {{ step.index }} - {% endfor %} + {% if seminar.is_multipart %} + +
+ - {% for step in steps %} -

Step {{ step.index }} - {{ step.validated }} {{ step.accessible }}

+ {% for part in parts %} +
+

Séquence {{ part.index }}

- {% with step.object.docs_1 as docs %} + {% with part.object.docs_1 as docs %}

{% trans "Step" %} 1 : @@ -178,134 +201,185 @@

{% endwith %} - {% with step.object.medias as medias %} -
-
-

{% trans "Step" %} 2 : - {% if medias.all.count > 1 %}{% trans "view these conferences" %}{% else %}{% trans "view this conference" %}{% endif %} -

+ {% if seminar.use_webclass %} + {% with seminar.conference as webclass %} +
+
+

{% trans "Step" %} 2 : + {% if part.object.webclass_text %}{{ part.object.webclass_text}}{% else %}{% trans "view this conference" %}{% endif %}

+
+ {% include "teleforma/inc/webclass.html" %}
- {% include "teleforma/inc/media_package_list.html" %} -
- {% endwith %} - - {% with step.object.quiz as quiz %} + {% endwith %} + {% else %} + {% with part.object.medias as medias %}
-

{% trans "Step" %} 2bis : - {% trans "Quiz" %}

+

{% trans "Step" %} 2 : + {% if medias.all.count > 1 %}{% trans "view these conferences" %}{% else %}{% trans "view this conference" %}{% endif %} +

- {% include "teleforma/inc/quiz_list.html" %} + {% include "teleforma/inc/media_package_list.html" %}
- {% endwith %} - - {% endfor %} - - {% else %} - {% with seminar.docs_1 as docs %} -
-
-

{% trans "Step" %} 1 : - {% if docs.all.count > 1 %}{% trans "read these documents" %}{% else %}{% trans "read this document" %}{% endif %} -

-
- {% include "teleforma/inc/document_simple_list.html" %} -
- {% endwith %} + {% endwith %} + {% endif %} - {% if show_webclass %} - {% with seminar.conference as webclass %} -
-
-

{% trans "Step" %} 2 : - {% trans "view this conference" %}

-
- {% include "teleforma/inc/webclass.html" %} -
- {% endwith %} - {% else %} - {% with seminar.medias as medias %} + {% with part.object.docs_2 as docs %}
-

{% trans "Step" %} 2 : - {% if medias.all.count > 1 %}{% trans "view these conferences" %}{% else %}{% trans "view this conference" %}{% endif %} +

{% trans "Step" %} 3 : + {% if docs.all.count > 1 %}{% trans "read these documents" %}{% else %}{% trans "read this document" %}{% endif %}

- {% include "teleforma/inc/media_package_list.html" %} + {% include "teleforma/inc/document_simple_list.html" %}
{% endwith %} - {% endif %} + - - - {% if seminar.quiz %} - {% with seminar.quiz as quiz %} + {% with part.object.quiz as quiz %}
-

{% trans "Step" %} 2bis : +

{% trans "Step" %} 4 : {% trans "Quiz" %}

{% include "teleforma/inc/quiz_list.html" %}
{% endwith %} - {% endif %} - - {% with seminar.docs_2 as docs %} -
-
-

{% trans "Step" %} 3 : - {% if docs.all.count > 1 %}{% trans "read these documents" %}{% else %}{% trans "read this document" %}{% endif %} -

-
- {% include "teleforma/inc/document_simple_list.html" %}
- {% endwith %} + {% endfor %} +
+ {% if seminar_progress == 100 %} + {% with seminar.form as form %} +
+
+

{% trans "Step" %} 1 : + {% trans "evaluate the seminar" %}

+
+ {% include "teleforma/inc/evaluation_form.html" %} +
+ {% endwith %} + {% endif %} + + {% if seminar_validated and seminar_progress == 100 and delta_sec >= 0 %} +
+
+

{% trans "Step" %} 2 : + {% trans "download your testimonial" %}

+
+ {% include "teleforma/inc/testimonial_list.html" %} +
+ {% endif %} - {% with seminar.question as questions %} -
-
-

{% trans "Step" %} 4 : - {% if questions.all.count > 1 %}{% trans "answer to these questions" %}{% else %}{% trans "answer to this question" %}{% endif %} -

-
- {% include "teleforma/inc/question_list.html" %}
- {% endwith %} +
- {% with seminar.docs_correct as docs %} -
-
-

{% trans "Step" %} 5 : - {% if docs.all.count > 1 %}{% trans "read these corrected documents" %}{% else %}{% trans "read this corrected document" %}{% endif %} -

-
- {% include "teleforma/inc/document_simple_list.html" %} + {% else %} + {% with seminar.docs_1 as docs %} +
+
+

{% trans "Step" %} 1 : + {% if docs.all.count > 1 %}{% trans "read these documents" %}{% else %}{% trans "read this document" %}{% endif %} +

+
+ {% include "teleforma/inc/document_simple_list.html" %} +
+ {% endwith %} + + {% if seminar.use_webclass %} + {% with seminar.conference as webclass %} +
+
+

{% trans "Step" %} 2 : + {% trans "view this conference" %}

+
+ {% include "teleforma/inc/webclass.html" %} +
+ {% endwith %} + {% else %} + {% with seminar.medias as medias %} +
+
+

{% trans "Step" %} 2 : + {% if medias.all.count > 1 %}{% trans "view these conferences" %}{% else %}{% trans "view this conference" %}{% endif %} +

- {% endwith %} + {% include "teleforma/inc/media_package_list.html" %} +
+ {% endwith %} + {% endif %} + + + + {% if seminar.quiz %} + {% with seminar.quiz as quiz %} +
+
+

{% trans "Step" %} 2bis : + {% trans "Quiz" %}

+
+ {% include "teleforma/inc/quiz_list.html" %} +
+ {% endwith %} {% endif %} + {% with seminar.docs_2 as docs %} +
+
+

{% trans "Step" %} 3 : + {% if docs.all.count > 1 %}{% trans "read these documents" %}{% else %}{% trans "read this document" %}{% endif %} +

+
+ {% include "teleforma/inc/document_simple_list.html" %} +
+ {% endwith %} + + + {% with seminar.question as questions %} +
+
+

{% trans "Step" %} 4 : + {% if questions.all.count > 1 %}{% trans "answer to these questions" %}{% else %}{% trans "answer to this question" %}{% endif %} +

+
+ {% include "teleforma/inc/question_list.html" %} +
+ {% endwith %} + + {% with seminar.docs_correct as docs %} +
+
+

{% trans "Step" %} 5 : + {% if docs.all.count > 1 %}{% trans "read these corrected documents" %}{% else %}{% trans "read this corrected document" %}{% endif %} +

+
+ {% include "teleforma/inc/document_simple_list.html" %} +
+ {% endwith %} + {% if seminar_progress == 100 %} - {% with seminar.form as form %} -
-
-

{% trans "Step" %} 6 : - {% trans "evaluate the seminar" %}

-
- {% include "teleforma/inc/evaluation_form.html" %} + {% with seminar.form as form %} +
+
+

{% trans "Step" %} 6 : + {% trans "evaluate the seminar" %}

- {% endwith %} + {% include "teleforma/inc/evaluation_form.html" %} +
+ {% endwith %} {% endif %} {% if seminar_validated and seminar_progress == 100 and delta_sec >= 0 %} -
-
-

{% trans "Step" %} 7 : - {% trans "download your testimonial" %}

-
- {% include "teleforma/inc/testimonial_list.html" %} +
+
+

{% trans "Step" %} 7 : + {% trans "download your testimonial" %}

+ {% include "teleforma/inc/testimonial_list.html" %} +
+ {% endif %} + {% endif %} {% endblock course_content %} diff --git a/teleforma/templates/teleforma/seminars.html b/teleforma/templates/teleforma/seminars.html index b33d3071..5f73763f 100644 --- a/teleforma/templates/teleforma/seminars.html +++ b/teleforma/templates/teleforma/seminars.html @@ -58,7 +58,7 @@ $(function() { diff --git a/teleforma/templatetags/teleforma_tags.py b/teleforma/templatetags/teleforma_tags.py index 895746ae..32475fed 100644 --- a/teleforma/templatetags/teleforma_tags.py +++ b/teleforma/templatetags/teleforma_tags.py @@ -409,4 +409,10 @@ def render_flatpage(content): parts = publish_parts(source=smart_str(parsed), writer_name="html4css1", settings_overrides={}) return mark_safe('
\n' + force_text(parts["html_body"]) + '
') -render_flatpage.is_safe = True \ No newline at end of file +render_flatpage.is_safe = True + + +@register.simple_tag(takes_context=True) +def seminar_parts(context, seminar): + """ get parts for multipar seminar """ + return seminar.get_parts(context.request.user) diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 8b2515e9..c3ee45f7 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -71,7 +71,7 @@ from quiz.views import QuizTake from teleforma.context_processors import all_conferences, all_seminars, seminar_progress, seminar_validated from teleforma.models.core import Conference -from teleforma.models.pro import Answer, Question, QuizValidation, Seminar, SeminarRevision, SeminarStep, Testimonial +from teleforma.models.pro import Answer, Question, QuizValidation, Seminar, SeminarRevision, SeminarPart, Testimonial from teleforma.forms import AnswerForm from teleforma.views.core import DocumentDownloadView, DocumentReadView, MediaView @@ -148,6 +148,7 @@ class SeminarAccessMixin(object): sec = (totsec % 3600) % 60 context['timer'] = "%d:%d:%d" % (h, m, sec) context['conferences'] = all_conferences(self.request) + context['show_webclass'] = seminar.use_webclass(user) return context def render_to_response(self, context): @@ -230,8 +231,7 @@ class SeminarView(SeminarAccessMixin, DetailView): seminar = context['seminar'] user = self.request.user - context['show_webclass'] = seminar.use_webclass(user) - context['steps'] = seminar.get_steps(user) + context['parts'] = seminar.get_parts(user) validated = seminar_validated(user, seminar) @@ -268,7 +268,6 @@ class SeminarView(SeminarAccessMixin, DetailView): messages.info(self.request, _( "You have successfully terminated all steps of your e-learning seminar. You can now download your training testimonial below.")) elif len(missing_steps) == 1: - if missing_steps == set(['4.5']): messages.warning(self.request, _("Yours submissions have been submitted. They will be processed within 48 hours.")) @@ -945,9 +944,9 @@ class QuizQuestionView(SeminarAccessMixin, SeminarRevisionMixin, QuizTake): def _init(self): self.seminar = Seminar.objects.get(pk=self.kwargs['pk']) try: - self.step = self.quiz.seminarstep.get(seminar__pk=self.kwargs['pk']) - except SeminarStep.DoesNotExist: - self.step = self.seminar + self.part = self.quiz.seminarpart.get(seminar__pk=self.kwargs['pk']) + except SeminarPart.DoesNotExist: + self.part = self.seminar def get_user(self): user_id = self.request.user.id @@ -955,7 +954,10 @@ class QuizQuestionView(SeminarAccessMixin, SeminarRevisionMixin, QuizTake): def can_access(self): user = self.get_user() - for items in [self.step.docs_1, self.step.medias]: + items = [self.part.docs_1, self.part.medias] + if self.seminar.is_multipart: + items.append(self.part.docs_2) + for items in items: for item in items.all(): if item.weight: if user not in item.readers.all(): @@ -1001,11 +1003,11 @@ class QuizQuestionView(SeminarAccessMixin, SeminarRevisionMixin, QuizTake): if self.sitting.get_percent_correct >= self.quiz.pass_mark: validation = QuizValidation( - user=user, quiz=self.step.quiz, validated=True) + user=user, quiz=self.part.quiz, validated=True) validation.save() else: - # revert step 1 validation - for doc in self.step.docs_1.all(): + # revert part 1 validation + for doc in self.part.docs_1.all(): doc.readers.remove(user) doc.save() -- 2.39.5