From 90d705666da244f4b2d9a364c6587285a679e81f Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 10:04:50 +0200 Subject: [PATCH 01/19] Add theme collection to models. --- docs/models.yml | 157 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 154 insertions(+), 3 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index 79900a833..aaeb5b96b 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -85,9 +85,6 @@ organization: login_text: type: string restriction_mode: A - theme: - type: string - restriction_mode: A reset_password_verbose_errors: type: boolean restriction_mode: B @@ -119,6 +116,10 @@ organization: type: relation-list restriction_mode: B to: organization_tag/organization_id + theme_id: + type: relation + restriction_mode: A + to: theme/organization_ids user: id: @@ -393,6 +394,156 @@ organization_tag: to: organization/organization_tag_ids restriction_mode: A +theme: + id: + restriction_mode: A + type: integer + required: true + value: + restriction_mode: A + type: string + required: true + accent-100: + restriction_mode: A + type: color + accent-200: + restriction_mode: A + type: color + accent-300: + restriction_mode: A + type: color + accent-400: + restriction_mode: A + type: color + accent-50: + restriction_mode: A + type: color + accent-500: + restriction_mode: A + type: color + required: true + accent-600: + restriction_mode: A + type: color + accent-700: + restriction_mode: A + type: color + accent-800: + restriction_mode: A + type: color + accent-900: + restriction_mode: A + type: color + accent-A100: + restriction_mode: A + type: color + accent-A200: + restriction_mode: A + type: color + accent-A400: + restriction_mode: A + type: color + accent-A700: + restriction_mode: A + type: color + background_color: + restriction_mode: A + type: color + is_dark_theme: + restriction_mode: A + type: boolean + primary-100: + restriction_mode: A + type: color + primary-200: + restriction_mode: A + type: color + primary-300: + restriction_mode: A + type: color + primary-400: + restriction_mode: A + type: color + primary-50: + restriction_mode: A + type: color + primary-500: + restriction_mode: A + type: color + required: true + primary-600: + restriction_mode: A + type: color + primary-700: + restriction_mode: A + type: color + primary-800: + restriction_mode: A + type: color + primary-900: + restriction_mode: A + type: color + primary-A100: + restriction_mode: A + type: color + primary-A200: + restriction_mode: A + type: color + primary-A400: + restriction_mode: A + type: color + primary-A700: + restriction_mode: A + type: color + warn-100: + restriction_mode: A + type: color + warn-200: + restriction_mode: A + type: color + warn-300: + restriction_mode: A + type: color + warn-400: + restriction_mode: A + type: color + warn-50: + restriction_mode: A + type: color + warn-500: + restriction_mode: A + type: color + required: true + warn-600: + restriction_mode: A + type: color + warn-700: + restriction_mode: A + type: color + warn-800: + restriction_mode: A + type: color + warn-900: + restriction_mode: A + type: color + warn-A100: + restriction_mode: A + type: color + warn-A200: + restriction_mode: A + type: color + warn-A400: + restriction_mode: A + type: color + warn-A700: + restriction_mode: A + type: color + # Link to organization + organization_ids: + restriction_mode: A + to: organization/theme_id + type: relation-list + committee: id: type: number From 38ac9c2838c4d9510c76cd7e43eb9fd69dd21ed9 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 10:25:33 +0200 Subject: [PATCH 02/19] Fix type. --- docs/models.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/models.yml b/docs/models.yml index aaeb5b96b..ab5e39bbe 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -397,7 +397,7 @@ organization_tag: theme: id: restriction_mode: A - type: integer + type: number required: true value: restriction_mode: A From 23e7bc4df203dae04cbdfd8276451cd65b6acd4b Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 10:33:52 +0200 Subject: [PATCH 03/19] Fix minus problem in var names. --- docs/models.yml | 84 ++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index ab5e39bbe..41ef3a93c 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -403,47 +403,47 @@ theme: restriction_mode: A type: string required: true - accent-100: + accent_100: restriction_mode: A type: color - accent-200: + accent_200: restriction_mode: A type: color - accent-300: + accent_300: restriction_mode: A type: color - accent-400: + accent_400: restriction_mode: A type: color - accent-50: + accent_50: restriction_mode: A type: color - accent-500: + accent_500: restriction_mode: A type: color required: true - accent-600: + accent_600: restriction_mode: A type: color - accent-700: + accent_700: restriction_mode: A type: color - accent-800: + accent_800: restriction_mode: A type: color - accent-900: + accent_900: restriction_mode: A type: color - accent-A100: + accent_A100: restriction_mode: A type: color - accent-A200: + accent_A200: restriction_mode: A type: color - accent-A400: + accent_A400: restriction_mode: A type: color - accent-A700: + accent_A700: restriction_mode: A type: color background_color: @@ -452,90 +452,90 @@ theme: is_dark_theme: restriction_mode: A type: boolean - primary-100: + primary_100: restriction_mode: A type: color - primary-200: + primary_200: restriction_mode: A type: color - primary-300: + primary_300: restriction_mode: A type: color - primary-400: + primary_400: restriction_mode: A type: color - primary-50: + primary_50: restriction_mode: A type: color - primary-500: + primary_500: restriction_mode: A type: color required: true - primary-600: + primary_600: restriction_mode: A type: color - primary-700: + primary_700: restriction_mode: A type: color - primary-800: + primary_800: restriction_mode: A type: color - primary-900: + primary_900: restriction_mode: A type: color - primary-A100: + primary_A100: restriction_mode: A type: color - primary-A200: + primary_A200: restriction_mode: A type: color - primary-A400: + primary_A400: restriction_mode: A type: color - primary-A700: + primary_A700: restriction_mode: A type: color - warn-100: + warn_100: restriction_mode: A type: color - warn-200: + warn_200: restriction_mode: A type: color - warn-300: + warn_300: restriction_mode: A type: color - warn-400: + warn_400: restriction_mode: A type: color - warn-50: + warn_50: restriction_mode: A type: color - warn-500: + warn_500: restriction_mode: A type: color required: true - warn-600: + warn_600: restriction_mode: A type: color - warn-700: + warn_700: restriction_mode: A type: color - warn-800: + warn_800: restriction_mode: A type: color - warn-900: + warn_900: restriction_mode: A type: color - warn-A100: + warn_A100: restriction_mode: A type: color - warn-A200: + warn_A200: restriction_mode: A type: color - warn-A400: + warn_A400: restriction_mode: A type: color - warn-A700: + warn_A700: restriction_mode: A type: color # Link to organization From 1da3c6dced5a976d3a765eb0166ca327055c75ee Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 10:45:48 +0200 Subject: [PATCH 04/19] Changes to the models.yml. --- docs/models.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index 41ef3a93c..00f407254 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -338,6 +338,11 @@ user: to: user/vote_delegated_$_to_id restriction_mode: C + theme_id: + type: relation + to: theme/user_ids + restriction_mode: A + meeting_ids: type: number[] description: Calculated. All ids from group_$_ids as integers. @@ -399,7 +404,7 @@ theme: restriction_mode: A type: number required: true - value: + name: restriction_mode: A type: string required: true @@ -446,12 +451,6 @@ theme: accent_A700: restriction_mode: A type: color - background_color: - restriction_mode: A - type: color - is_dark_theme: - restriction_mode: A - type: boolean primary_100: restriction_mode: A type: color @@ -538,11 +537,15 @@ theme: warn_A700: restriction_mode: A type: color - # Link to organization organization_ids: restriction_mode: A to: organization/theme_id type: relation-list + user_ids: + restriction_mode: A + to: user/theme_id + type: relation-list + committee: id: From 494b8d54f4a26f3be4536426c33b7456443958ee Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 12:43:32 +0200 Subject: [PATCH 05/19] Rename organization/theme_id into default_theme_id. --- docs/models.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index 00f407254..458c9be7d 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -116,7 +116,7 @@ organization: type: relation-list restriction_mode: B to: organization_tag/organization_id - theme_id: + default_theme_id: type: relation restriction_mode: A to: theme/organization_ids @@ -539,7 +539,7 @@ theme: type: color organization_ids: restriction_mode: A - to: organization/theme_id + to: organization/default_theme_id type: relation-list user_ids: restriction_mode: A From 225a6eb5de2a8563dd700360b65deb9b2c1bffd1 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 15:14:07 +0200 Subject: [PATCH 06/19] Update initial and example data. --- docker/initial-data.json | 6 ++++-- docs/example-data.json | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index f528ab87c..1cae187ba 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -8,7 +8,6 @@ "legal_notice": "OpenSlides is a free web based presentation and assembly system for visualizing and controlling agenda, motions and elections of an assembly. The event organizer is resposible for the content.", "privacy_policy": "", "login_text": "Welcome to OpenSlides. Please login.", - "theme": "openslides-default-light-theme", "reset_password_verbose_errors": false, "enable_electronic_voting": false, "limit_of_meetings": 0, @@ -19,7 +18,8 @@ 1 ], "resource_ids": [], - "organization_tag_ids": [] + "organization_tag_ids": [], + "default_theme_id": null } }, "user": { @@ -63,11 +63,13 @@ "projection_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [] } }, "resource": {}, "organization_tag": {}, + "theme": {}, "committee": { "1": { "id": 1, diff --git a/docs/example-data.json b/docs/example-data.json index 071fe4a97..ee9f30291 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -8,7 +8,7 @@ "legal_notice": "OpenSlides is a free web based presentation and assembly system for visualizing and controlling agenda, motions and elections of an assembly.", "privacy_policy": "", "login_text": "Guten Morgen!", - "theme": "openslides-theme", + "default_theme_id": null, "enable_electronic_voting": true, "reset_password_verbose_errors": true, "committee_ids": [ @@ -141,6 +141,7 @@ ], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [ 1 ] @@ -229,6 +230,7 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [ 1 ] @@ -317,6 +319,7 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [ 1 ] @@ -331,6 +334,7 @@ "organization_id": 1 } }, + "theme": {}, "organization_tag": { "1": { "id": 1, From c293544f246bff2438f7b9b8e881d5c492e09715 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Thu, 30 Sep 2021 14:13:26 +0200 Subject: [PATCH 07/19] Remove user/theme_id. --- docs/models.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index 458c9be7d..f41b5bb56 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -337,12 +337,6 @@ user: type: relation-list to: user/vote_delegated_$_to_id restriction_mode: C - - theme_id: - type: relation - to: theme/user_ids - restriction_mode: A - meeting_ids: type: number[] description: Calculated. All ids from group_$_ids as integers. @@ -541,11 +535,6 @@ theme: restriction_mode: A to: organization/default_theme_id type: relation-list - user_ids: - restriction_mode: A - to: user/theme_id - type: relation-list - committee: id: From d5d41a532ac2d6f11f43938b38e447e6a9e83b77 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 4 Oct 2021 11:18:37 +0200 Subject: [PATCH 08/19] Add organization/theme_ids to models.yml --- docs/models.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/models.yml b/docs/models.yml index f41b5bb56..53378c843 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -120,6 +120,10 @@ organization: type: relation restriction_mode: A to: theme/organization_ids + theme_ids: + type: relation-list + restriction_mode: A + to: theme/organization_id user: id: @@ -535,6 +539,10 @@ theme: restriction_mode: A to: organization/default_theme_id type: relation-list + organization_id: + restriction_mode: A + to: organization/theme_ids + type: relation committee: id: From 703d61a3b7d6e06ec7dbafefba95ad7e502b1f69 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 4 Oct 2021 12:59:44 +0200 Subject: [PATCH 09/19] Update models.yml, initial-data.json and example-data.json --- docker/initial-data.json | 4 ++-- docs/example-data.json | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index 1cae187ba..3819a0e48 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -19,7 +19,8 @@ ], "resource_ids": [], "organization_tag_ids": [], - "default_theme_id": null + "default_theme_id": null, + "theme_ids": [] } }, "user": { @@ -63,7 +64,6 @@ "projection_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [] } }, diff --git a/docs/example-data.json b/docs/example-data.json index ee9f30291..7590d1390 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -23,7 +23,8 @@ ], "organization_tag_ids": [ 1 - ] + ], + "theme_ids": [] } }, "user": { @@ -141,7 +142,6 @@ ], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [ 1 ] @@ -230,7 +230,6 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [ 1 ] @@ -319,7 +318,6 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [ 1 ] From 9c0329b2ad33be8beb98d10effb99244c5376d7a Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 4 Oct 2021 13:37:44 +0200 Subject: [PATCH 10/19] Change theme attribute names, because large letters are not allowed. --- docs/models.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index 53378c843..10c673944 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -437,16 +437,16 @@ theme: accent_900: restriction_mode: A type: color - accent_A100: + accent_a100: restriction_mode: A type: color - accent_A200: + accent_a200: restriction_mode: A type: color - accent_A400: + accent_a400: restriction_mode: A type: color - accent_A700: + accent_a700: restriction_mode: A type: color primary_100: @@ -480,16 +480,16 @@ theme: primary_900: restriction_mode: A type: color - primary_A100: + primary_a100: restriction_mode: A type: color - primary_A200: + primary_a200: restriction_mode: A type: color - primary_A400: + primary_a400: restriction_mode: A type: color - primary_A700: + primary_a700: restriction_mode: A type: color warn_100: @@ -523,16 +523,16 @@ theme: warn_900: restriction_mode: A type: color - warn_A100: + warn_a100: restriction_mode: A type: color - warn_A200: + warn_a200: restriction_mode: A type: color - warn_A400: + warn_a400: restriction_mode: A type: color - warn_A700: + warn_a700: restriction_mode: A type: color organization_ids: From 1078a7101aeca1d0d01fa1c93b247b938579401b Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 4 Oct 2021 14:02:24 +0200 Subject: [PATCH 11/19] Change theme/organization_ids It should be a relation and not a relation-list, as there is only one organization and it is renamed to avoid name conflict. --- docs/models.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/models.yml b/docs/models.yml index 10c673944..bf5404dc9 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -119,7 +119,7 @@ organization: default_theme_id: type: relation restriction_mode: A - to: theme/organization_ids + to: theme/default_theme_for_organization_id theme_ids: type: relation-list restriction_mode: A @@ -535,10 +535,10 @@ theme: warn_a700: restriction_mode: A type: color - organization_ids: + default_theme_for_organization_id: restriction_mode: A to: organization/default_theme_id - type: relation-list + type: relation organization_id: restriction_mode: A to: organization/theme_ids From 5aa9bc082dd80dd1f0cde921b903880c0a10776a Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 29 Sep 2021 15:14:07 +0200 Subject: [PATCH 12/19] Update initial and example data. --- docker/initial-data.json | 4 ++-- docs/example-data.json | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index 3819a0e48..1cae187ba 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -19,8 +19,7 @@ ], "resource_ids": [], "organization_tag_ids": [], - "default_theme_id": null, - "theme_ids": [] + "default_theme_id": null } }, "user": { @@ -64,6 +63,7 @@ "projection_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [] } }, diff --git a/docs/example-data.json b/docs/example-data.json index 7590d1390..54f6dbca1 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -142,6 +142,7 @@ ], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [ 1 ] @@ -230,6 +231,7 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [ 1 ] @@ -318,6 +320,7 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], + "theme_id": null, "meeting_ids": [ 1 ] From cc9df51cc3d8d48a3ceab75f3866ac401e91c80e Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 4 Oct 2021 12:59:44 +0200 Subject: [PATCH 13/19] Update models.yml, initial-data.json and example-data.json --- docker/initial-data.json | 4 ++-- docs/example-data.json | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index 1cae187ba..3819a0e48 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -19,7 +19,8 @@ ], "resource_ids": [], "organization_tag_ids": [], - "default_theme_id": null + "default_theme_id": null, + "theme_ids": [] } }, "user": { @@ -63,7 +64,6 @@ "projection_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [] } }, diff --git a/docs/example-data.json b/docs/example-data.json index 54f6dbca1..7590d1390 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -142,7 +142,6 @@ ], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [ 1 ] @@ -231,7 +230,6 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [ 1 ] @@ -320,7 +318,6 @@ "vote_delegated_vote_$_ids": [], "vote_delegated_$_to_id": [], "vote_delegations_$_from_ids": [], - "theme_id": null, "meeting_ids": [ 1 ] From e2382a7c866c6680bac54547e16c8ec96881a65d Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 6 Oct 2021 10:28:16 +0200 Subject: [PATCH 14/19] Fix indentation of initial-data.json --- docker/initial-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index 3819a0e48..da9ee0ce9 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -20,7 +20,7 @@ "resource_ids": [], "organization_tag_ids": [], "default_theme_id": null, - "theme_ids": [] + "theme_ids": [] } }, "user": { From ee3b84abdedd79eb5921fd22df722d7fbc640100 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 6 Oct 2021 10:53:17 +0200 Subject: [PATCH 15/19] Add one theme to initial/example data. --- docker/initial-data.json | 16 +++++++++++++--- docs/example-data.json | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index da9ee0ce9..f2483f193 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -19,8 +19,8 @@ ], "resource_ids": [], "organization_tag_ids": [], - "default_theme_id": null, - "theme_ids": [] + "default_theme_id": 1, + "theme_ids": [1] } }, "user": { @@ -69,7 +69,17 @@ }, "resource": {}, "organization_tag": {}, - "theme": {}, + "theme": { + "1":{ + "id": 1, + "name": "OpenSlides Blue", + "accent_500": "#2196f3", + "primary_500": "#317796", + "warn_500": "#f06400", + "organization_id": 1, + "default_theme_for_organization_id": 1 + } + }, "committee": { "1": { "id": 1, diff --git a/docs/example-data.json b/docs/example-data.json index 7590d1390..193f7fea9 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -8,7 +8,6 @@ "legal_notice": "OpenSlides is a free web based presentation and assembly system for visualizing and controlling agenda, motions and elections of an assembly.", "privacy_policy": "", "login_text": "Guten Morgen!", - "default_theme_id": null, "enable_electronic_voting": true, "reset_password_verbose_errors": true, "committee_ids": [ @@ -24,7 +23,8 @@ "organization_tag_ids": [ 1 ], - "theme_ids": [] + "default_theme_id": 1, + "theme_ids": [1] } }, "user": { @@ -332,7 +332,17 @@ "organization_id": 1 } }, - "theme": {}, + "theme": { + "1":{ + "id": 1, + "name": "OpenSlides Blue", + "accent_500": "#2196f3", + "primary_500": "#317796", + "warn_500": "#f06400", + "organization_id": 1, + "default_theme_for_organization_id": 1 + } + }, "organization_tag": { "1": { "id": 1, From fdfe3bd66a119c6a0181a5e5f4befa915df2efc1 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 6 Oct 2021 11:00:53 +0200 Subject: [PATCH 16/19] Add required to default_theme_id and organization_id. --- docs/models.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/models.yml b/docs/models.yml index bf5404dc9..a55dcce1c 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -118,6 +118,7 @@ organization: to: organization_tag/organization_id default_theme_id: type: relation + required: true restriction_mode: A to: theme/default_theme_for_organization_id theme_ids: @@ -540,6 +541,7 @@ theme: to: organization/default_theme_id type: relation organization_id: + required: true restriction_mode: A to: organization/theme_ids type: relation From 285b900b5abf6a4ca2d693f34e20116f3f1ab933 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 6 Oct 2021 11:19:27 +0200 Subject: [PATCH 17/19] Rename default_theme_id into theme_id And update initial and example data. --- docker/initial-data.json | 4 ++-- docs/example-data.json | 4 ++-- docs/models.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index f2483f193..a47cd80fd 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -19,7 +19,7 @@ ], "resource_ids": [], "organization_tag_ids": [], - "default_theme_id": 1, + "theme_id": 1, "theme_ids": [1] } }, @@ -77,7 +77,7 @@ "primary_500": "#317796", "warn_500": "#f06400", "organization_id": 1, - "default_theme_for_organization_id": 1 + "theme_for_organization_id": 1 } }, "committee": { diff --git a/docs/example-data.json b/docs/example-data.json index 193f7fea9..adbebbbc1 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -23,7 +23,7 @@ "organization_tag_ids": [ 1 ], - "default_theme_id": 1, + "theme_id": 1, "theme_ids": [1] } }, @@ -340,7 +340,7 @@ "primary_500": "#317796", "warn_500": "#f06400", "organization_id": 1, - "default_theme_for_organization_id": 1 + "theme_for_organization_id": 1 } }, "organization_tag": { diff --git a/docs/models.yml b/docs/models.yml index a55dcce1c..72541d33f 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -116,11 +116,11 @@ organization: type: relation-list restriction_mode: B to: organization_tag/organization_id - default_theme_id: + theme_id: type: relation required: true restriction_mode: A - to: theme/default_theme_for_organization_id + to: theme/theme_for_organization_id theme_ids: type: relation-list restriction_mode: A @@ -536,9 +536,9 @@ theme: warn_a700: restriction_mode: A type: color - default_theme_for_organization_id: + theme_for_organization_id: restriction_mode: A - to: organization/default_theme_id + to: organization/theme_id type: relation organization_id: required: true From 97056e9f2af2747be43855a9cef856f0ec381855 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 6 Oct 2021 11:52:01 +0200 Subject: [PATCH 18/19] Add missing options to theme. --- docker/initial-data.json | 41 +++++++++++++++++++++++++++++++++++++++- docs/example-data.json | 41 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/docker/initial-data.json b/docker/initial-data.json index a47cd80fd..98ffe860a 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -77,7 +77,46 @@ "primary_500": "#317796", "warn_500": "#f06400", "organization_id": 1, - "theme_for_organization_id": 1 + "theme_for_organization_id": 1, + "accent_100": null, + "accent_200": null, + "accent_300": null, + "accent_400": null, + "accent_50": null, + "accent_600": null, + "accent_700": null, + "accent_800": null, + "accent_900": null, + "accent_a100": null, + "accent_a200": null, + "accent_a400": null, + "accent_a700": null, + "primary_100": null, + "primary_200": null, + "primary_300": null, + "primary_400": null, + "primary_50": null, + "primary_600": null, + "primary_700": null, + "primary_800": null, + "primary_900": null, + "primary_a100": null, + "primary_a200": null, + "primary_a400": null, + "primary_a700": null, + "warn_100": null, + "warn_200": null, + "warn_300": null, + "warn_400": null, + "warn_50": null, + "warn_600": null, + "warn_700": null, + "warn_800": null, + "warn_900": null, + "warn_a100": null, + "warn_a200": null, + "warn_a400": null, + "warn_a700": null } }, "committee": { diff --git a/docs/example-data.json b/docs/example-data.json index adbebbbc1..502bb766e 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -340,7 +340,46 @@ "primary_500": "#317796", "warn_500": "#f06400", "organization_id": 1, - "theme_for_organization_id": 1 + "theme_for_organization_id": 1, + "accent_100": null, + "accent_200": null, + "accent_300": null, + "accent_400": null, + "accent_50": null, + "accent_600": null, + "accent_700": null, + "accent_800": null, + "accent_900": null, + "accent_a100": null, + "accent_a200": null, + "accent_a400": null, + "accent_a700": null, + "primary_100": null, + "primary_200": null, + "primary_300": null, + "primary_400": null, + "primary_50": null, + "primary_600": null, + "primary_700": null, + "primary_800": null, + "primary_900": null, + "primary_a100": null, + "primary_a200": null, + "primary_a400": null, + "primary_a700": null, + "warn_100": null, + "warn_200": null, + "warn_300": null, + "warn_400": null, + "warn_50": null, + "warn_600": null, + "warn_700": null, + "warn_800": null, + "warn_900": null, + "warn_a100": null, + "warn_a200": null, + "warn_a400": null, + "warn_a700": null } }, "organization_tag": { From dc2998b0ea47195eea85c8127d7af27368ef5b62 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Tue, 12 Oct 2021 10:39:41 +0200 Subject: [PATCH 19/19] Update initial-data md5sum. --- .github/workflows/md5_check_initial-data.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/md5_check_initial-data.yml b/.github/workflows/md5_check_initial-data.yml index 9c4644850..4fcc9e523 100644 --- a/.github/workflows/md5_check_initial-data.yml +++ b/.github/workflows/md5_check_initial-data.yml @@ -21,4 +21,4 @@ jobs: run: md5sum docker/initial-data.json - name: Validate and protect initial-data.json - run: echo "6516e4a8d29c623d301c0c463e3d1db5 docker/initial-data.json" | md5sum -c - + run: echo "eb70fc8581fc011b5da4b022068564b9 docker/initial-data.json" | md5sum -c -