class LessonAdmin(admin.ModelAdmin):
inlines = [AttachmentInline]
list_display = ['title', 'section', 'type']
+ list_filter = ['level', 'type']
admin.site.register(Section)
admin.site.register(Lesson, LessonAdmin)
type = models.CharField(max_length=15, db_index=True)
order = models.IntegerField(db_index=True)
dc = JSONField(default='{}')
- curriculum_courses = models.ManyToManyField(CurriculumCourse)
+ curriculum_courses = models.ManyToManyField(CurriculumCourse, blank=True)
xml_file = models.FileField(upload_to="catalogue/lesson/xml",
null=True, blank=True, max_length=255)
.section-level {
width: 40em;
- border-radius: 0.938em;
- margin: 1em 0; }
+ border-radius: 0.9375em;
+ margin: 1em 0;
+ overflow: hidden; }
.section-level a:hover {
text-decoration: underline; }
width: 16.25em; }
.section-type-course {
- border-radius: 0 0.938em 0.938em 0;
width: 18.75em; }
+.section-type-project {
+ width: 37.5em; }
+
.section-level-gimnazjum {
background: #f4ae83;
color: #67584f; }
color: #fff; }
.section-level-gimnazjum .section-type-course a {
color: #fff; }
+ .section-level-gimnazjum .section-type-project {
+ background-color: #f8cdb2; }
.section-level-liceum {
background: #44b69f;
color: #fff; }
.section-level-liceum .section-type-course a {
color: #fff; }
+ .section-level-liceum .section-type-project {
+ background-color: #9fdbcf; }
.course-boxes h1 {
color: #363a3e; }
.course-boxes .section-level {
background: white;
- border: 1px solid #777; }
+ border: 1px solid #777777; }
.course-boxes .section-level a, .course-boxes .section-level a:hover {
color: #363a3e; }
- .course-boxes .section-level .section-type-course {
- background: white;
- bborder-left: 1px solid #363a3e; }
+ .course-boxes .section-level .section-type {
+ background: white; }
.section-links {
float: right; }
width: 640*$px;
border-radius: 15*$px;
margin: 1em 0;
+ overflow: hidden;
+
a:hover {
text-decoration: underline;
}
width: 300*$px - 2 * 20*$px;
}
.section-type-course {
- border-radius: 0 15*$px 15*$px 0;
width: 340*$px - 2 * 20*$px;
}
+.section-type-project {
+ width: 640*$px - 2 * 20*$px;
+}
.section-level-gimnazjum {
background: #f4ae83;
color: #fff;
}
}
+ .section-type-project {
+ background-color: lighten(#f4ae83, 10);
+ }
}
color: #fff;
}
}
+ .section-type-project {
+ background-color: lighten(#44b69f, 25);
+ }
}
a, a:hover {
color: #363a3e;
}
- .section-type-course {
+ .section-type {
background: white;
- bborder-left: 1px solid #363a3e;
}
}
}
<section class="section-type section-type-{{ lesson_type }}">
{% if lesson_type == 'synthetic' %}
<h1>Lekcja syntetyczna</h1>
+ {% elif lesson_type == 'project' %}
+ <h1>Projekt</h1>
{% else %}
<h1>Pełny kurs</h1>
{% endif %}
<section class="section-type section-type-{{ lesson_type }}">
{% if lesson_type == 'synthetic' %}
<h1>Lekcje syntetyczne</h1>
+ {% elif lesson_type == 'project' %}
+ <h1>Projekty</h1>
{% else %}
<h1>Lekcje z pełnych kursów</h1>
{% endif %}