From dc662936842fe62af49792eec6d7e7d8bc2f7d9b Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 8 Apr 2020 10:50:06 +0200 Subject: [PATCH] Add interdisciplinary instrument --- client/src/components/ContentBlock.vue | 12 +++++++++++- client/src/styles/_variables.scss | 1 + .../migrations/0005_auto_20200408_0834.py | 18 ++++++++++++++++++ server/basicknowledge/models.py | 2 ++ .../migrations/0019_auto_20200408_0841.py | 18 ++++++++++++++++++ server/books/models/contentblock.py | 2 ++ 6 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 server/basicknowledge/migrations/0005_auto_20200408_0834.py create mode 100644 server/books/migrations/0019_auto_20200408_0841.py diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue index 0cafb6bd..d3e47114 100644 --- a/client/src/components/ContentBlock.vue +++ b/client/src/components/ContentBlock.vue @@ -57,7 +57,9 @@ const instruments = { base_communication: 'Sprache & Kommunikation', - base_society: 'Gesellschaft' + base_society: 'Gesellschaft', + base_interdisciplinary: 'Überfachliches Instrument', + }; export default { @@ -291,6 +293,14 @@ } } + &--base_interdisciplinary { + @include content-box($color-accent-4-list); + + .content-block__instrument-label { + color: $color-accent-4-dark; + } + } + /deep/ p { line-height: 1.5; margin-bottom: 1em; diff --git a/client/src/styles/_variables.scss b/client/src/styles/_variables.scss index f4d793bd..6e88b0e3 100644 --- a/client/src/styles/_variables.scss +++ b/client/src/styles/_variables.scss @@ -21,6 +21,7 @@ $color-accent-5: #DBE6EC; $color-accent-1-list: $color-accent-1 $color-accent-1-light $color-accent-1-dark; $color-accent-2-list: $color-accent-2 $color-accent-2-light $color-accent-2-dark; +$color-accent-4-list: $color-accent-4 $color-accent-4-light $color-accent-4-dark; /* brand */ $color-brand-dark: #138E72; diff --git a/server/basicknowledge/migrations/0005_auto_20200408_0834.py b/server/basicknowledge/migrations/0005_auto_20200408_0834.py new file mode 100644 index 00000000..caa7b6a3 --- /dev/null +++ b/server/basicknowledge/migrations/0005_auto_20200408_0834.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.15 on 2020-04-08 08:34 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('basicknowledge', '0004_auto_20191128_1601'), + ] + + operations = [ + migrations.AlterField( + model_name='basicknowledge', + name='type', + field=models.CharField(choices=[('language_communication', 'Sprache & Kommunikation'), ('society', 'Gesellschaft'), ('interdisciplinary', 'Überfachliches Instrument')], max_length=100), + ), + ] diff --git a/server/basicknowledge/models.py b/server/basicknowledge/models.py index 8d320929..273c986d 100644 --- a/server/basicknowledge/models.py +++ b/server/basicknowledge/models.py @@ -26,10 +26,12 @@ class BasicKnowledge(StrictHierarchyPage): LANGUAGE_COMMUNICATION = 'language_communication' SOCIETY = 'society' + INTERDISCIPLINARY = 'interdisciplinary' TYPE_CHOICES = ( (LANGUAGE_COMMUNICATION, 'Sprache & Kommunikation'), (SOCIETY, 'Gesellschaft'), + (INTERDISCIPLINARY, 'Überfachliches Instrument'), ) type = models.CharField( diff --git a/server/books/migrations/0019_auto_20200408_0841.py b/server/books/migrations/0019_auto_20200408_0841.py new file mode 100644 index 00000000..901d9d38 --- /dev/null +++ b/server/books/migrations/0019_auto_20200408_0841.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.15 on 2020-04-08 08:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('books', '0018_remove_module_solutions_enabled_by'), + ] + + operations = [ + migrations.AlterField( + model_name='contentblock', + name='type', + field=models.CharField(choices=[('normal', 'Normal'), ('base_communication', 'Instrument Sprache & Kommunikation'), ('task', 'Auftrag'), ('base_society', 'Instrument Gesellschaft'), ('base_interdisciplinary', 'Überfachliches Instrument')], default='normal', max_length=100), + ), + ] diff --git a/server/books/models/contentblock.py b/server/books/models/contentblock.py index 713cd2fe..de630e30 100644 --- a/server/books/models/contentblock.py +++ b/server/books/models/contentblock.py @@ -27,12 +27,14 @@ class ContentBlock(StrictHierarchyPage): BASE_COMMUNICATION = 'base_communication' TASK = 'task' BASE_SOCIETY = 'base_society' + BASE_INTERDISCIPLINARY = 'base_interdisciplinary' TYPE_CHOICES = ( (NORMAL, 'Normal'), (BASE_COMMUNICATION, 'Instrument Sprache & Kommunikation'), (TASK, 'Auftrag'), (BASE_SOCIETY, 'Instrument Gesellschaft'), + (BASE_INTERDISCIPLINARY, 'Überfachliches Instrument'), ) # blocks without owner are visible by default, need to be hidden for each class