| Total Complexity | 0 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python |
||
| 2 | # -*- coding: UTF-8 -*- |
||
| 3 | |||
| 4 | # Isomer - The distributed application framework |
||
| 5 | # ============================================== |
||
| 6 | # Copyright (C) 2011-2020 Heiko 'riot' Weinen <[email protected]> and others. |
||
| 7 | # |
||
| 8 | # This program is free software: you can redistribute it and/or modify |
||
| 9 | # it under the terms of the GNU Affero General Public License as published by |
||
| 10 | # the Free Software Foundation, either version 3 of the License, or |
||
| 11 | # (at your option) any later version. |
||
| 12 | # |
||
| 13 | # This program is distributed in the hope that it will be useful, |
||
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 16 | # GNU Affero General Public License for more details. |
||
| 17 | # |
||
| 18 | # You should have received a copy of the GNU Affero General Public License |
||
| 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 20 | |||
| 21 | """ |
||
| 22 | |||
| 23 | Schema: Theme |
||
| 24 | ============= |
||
| 25 | |||
| 26 | Contains |
||
| 27 | -------- |
||
| 28 | |||
| 29 | User interface theme definition |
||
| 30 | |||
| 31 | See also |
||
| 32 | -------- |
||
| 33 | |||
| 34 | Provisions |
||
| 35 | |||
| 36 | |||
| 37 | """ |
||
| 38 | |||
| 39 | from isomer.schemata.base import base_object |
||
| 40 | |||
| 41 | # Basic Theme definitions |
||
| 42 | |||
| 43 | ThemeSchema = base_object("theme", all_roles="crew") |
||
| 44 | |||
| 45 | ThemeSchema["properties"].update({ |
||
| 46 | "notes": { |
||
| 47 | "type": "string", |
||
| 48 | "format": "html", |
||
| 49 | "title": "Theme notes", |
||
| 50 | "description": "Descriptive Theme notes", |
||
| 51 | }, |
||
| 52 | "theme_file": { |
||
| 53 | "type": "string" |
||
| 54 | } |
||
| 55 | }) |
||
| 56 | |||
| 57 | ThemeForm = ["name", "color", "notes"] |
||
| 58 | |||
| 59 | Theme = {"schema": ThemeSchema, "form": ThemeForm} |
||
| 60 |