fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2789ef
)
Add project as course type.
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 22 Jul 2013 08:56:31 +0000
(10:56 +0200)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 22 Jul 2013 08:56:31 +0000
(10:56 +0200)
catalogue/admin.py
patch
|
blob
|
history
catalogue/models.py
patch
|
blob
|
history
catalogue/static/catalogue/css/section_list.css
patch
|
blob
|
history
catalogue/static/catalogue/css/section_list.scss
patch
|
blob
|
history
catalogue/templates/catalogue/snippets/section_box.html
patch
|
blob
|
history
curriculum/templates/curriculum/snippets/course_box.html
patch
|
blob
|
history
diff --git
a/catalogue/admin.py
b/catalogue/admin.py
index
43488ce
..
f79b375
100755
(executable)
--- a/
catalogue/admin.py
+++ b/
catalogue/admin.py
@@
-7,6
+7,7
@@
class AttachmentInline(admin.TabularInline):
class LessonAdmin(admin.ModelAdmin):
inlines = [AttachmentInline]
list_display = ['title', 'section', 'type']
class LessonAdmin(admin.ModelAdmin):
inlines = [AttachmentInline]
list_display = ['title', 'section', 'type']
+ list_filter = ['level', 'type']
admin.site.register(Section)
admin.site.register(Lesson, LessonAdmin)
admin.site.register(Section)
admin.site.register(Lesson, LessonAdmin)
diff --git
a/catalogue/models.py
b/catalogue/models.py
index
8e6793f
..
3ae4490
100644
(file)
--- a/
catalogue/models.py
+++ b/
catalogue/models.py
@@
-71,7
+71,7
@@
class Lesson(models.Model):
type = models.CharField(max_length=15, db_index=True)
order = models.IntegerField(db_index=True)
dc = JSONField(default='{}')
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)
xml_file = models.FileField(upload_to="catalogue/lesson/xml",
null=True, blank=True, max_length=255)
diff --git
a/catalogue/static/catalogue/css/section_list.css
b/catalogue/static/catalogue/css/section_list.css
index
1b6749a
..
d079abe
100644
(file)
--- a/
catalogue/static/catalogue/css/section_list.css
+++ b/
catalogue/static/catalogue/css/section_list.css
@@
-1,7
+1,8
@@
.section-level {
width: 40em;
.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; }
.section-level a:hover {
text-decoration: underline; }
@@
-18,9
+19,11
@@
width: 16.25em; }
.section-type-course {
width: 16.25em; }
.section-type-course {
- border-radius: 0 0.938em 0.938em 0;
width: 18.75em; }
width: 18.75em; }
+.section-type-project {
+ width: 37.5em; }
+
.section-level-gimnazjum {
background: #f4ae83;
color: #67584f; }
.section-level-gimnazjum {
background: #f4ae83;
color: #67584f; }
@@
-31,6
+34,8
@@
color: #fff; }
.section-level-gimnazjum .section-type-course a {
color: #fff; }
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;
.section-level-liceum {
background: #44b69f;
@@
-42,17
+47,18
@@
color: #fff; }
.section-level-liceum .section-type-course a {
color: #fff; }
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;
.course-boxes h1 {
color: #363a3e; }
.course-boxes .section-level {
background: white;
- border: 1px solid #777; }
+ border: 1px solid #777
777
; }
.course-boxes .section-level a, .course-boxes .section-level a:hover {
color: #363a3e; }
.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; }
.section-links {
float: right; }
diff --git
a/catalogue/static/catalogue/css/section_list.scss
b/catalogue/static/catalogue/css/section_list.scss
index
535ebb4
..
72e0f96
100755
(executable)
--- a/
catalogue/static/catalogue/css/section_list.scss
+++ b/
catalogue/static/catalogue/css/section_list.scss
@@
-4,6
+4,8
@@
$px: 0.0625em;
width: 640*$px;
border-radius: 15*$px;
margin: 1em 0;
width: 640*$px;
border-radius: 15*$px;
margin: 1em 0;
+ overflow: hidden;
+
a:hover {
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
@@
-24,9
+26,11
@@
$px: 0.0625em;
width: 300*$px - 2 * 20*$px;
}
.section-type-course {
width: 300*$px - 2 * 20*$px;
}
.section-type-course {
- border-radius: 0 15*$px 15*$px 0;
width: 340*$px - 2 * 20*$px;
}
width: 340*$px - 2 * 20*$px;
}
+.section-type-project {
+ width: 640*$px - 2 * 20*$px;
+}
.section-level-gimnazjum {
background: #f4ae83;
.section-level-gimnazjum {
background: #f4ae83;
@@
-44,6
+48,9
@@
$px: 0.0625em;
color: #fff;
}
}
color: #fff;
}
}
+ .section-type-project {
+ background-color: lighten(#f4ae83, 10);
+ }
}
}
@@
-63,6
+70,9
@@
$px: 0.0625em;
color: #fff;
}
}
color: #fff;
}
}
+ .section-type-project {
+ background-color: lighten(#44b69f, 25);
+ }
}
}
@@
-76,9
+86,8
@@
$px: 0.0625em;
a, a:hover {
color: #363a3e;
}
a, a:hover {
color: #363a3e;
}
- .section-type
-course
{
+ .section-type {
background: white;
background: white;
- bborder-left: 1px solid #363a3e;
}
}
}
}
}
}
diff --git
a/catalogue/templates/catalogue/snippets/section_box.html
b/catalogue/templates/catalogue/snippets/section_box.html
index
271b6c6
..
bbca27a
100755
(executable)
--- a/
catalogue/templates/catalogue/snippets/section_box.html
+++ b/
catalogue/templates/catalogue/snippets/section_box.html
@@
-10,6
+10,8
@@
<section class="section-type section-type-{{ lesson_type }}">
{% if lesson_type == 'synthetic' %}
<h1>Lekcja syntetyczna</h1>
<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 %}
{% else %}
<h1>Pełny kurs</h1>
{% endif %}
diff --git
a/curriculum/templates/curriculum/snippets/course_box.html
b/curriculum/templates/curriculum/snippets/course_box.html
index
c647b83
..
f1bd074
100755
(executable)
--- a/
curriculum/templates/curriculum/snippets/course_box.html
+++ b/
curriculum/templates/curriculum/snippets/course_box.html
@@
-10,6
+10,8
@@
<section class="section-type section-type-{{ lesson_type }}">
{% if lesson_type == 'synthetic' %}
<h1>Lekcje syntetyczne</h1>
<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 %}
{% else %}
<h1>Lekcje z pełnych kursów</h1>
{% endif %}