- User Slide
+
+
{{ data.data.user }}
diff --git a/client/src/styles.scss b/client/src/styles.scss
index 09625db31..2ddc0baf0 100644
--- a/client/src/styles.scss
+++ b/client/src/styles.scss
@@ -41,7 +41,9 @@ body {
h1,
h2,
h3,
-.title-font {
+.title-font,
+.slidetitle h1,
+.slidetitle h2 {
font-family: OSFont Condensed, Fira Sans Condensed, Roboto-condensed, Arial, Helvetica, sans-serif;
}
@@ -232,6 +234,15 @@ mat-card {
.os-listview-table {
@extend %os-table;
+ /* multi select column */
+ .mat-column-selector {
+ flex: 0 0 60px;
+ }
+ /* projector button column */
+ .mat-column-projector {
+ flex: 0 0 40px;
+ overflow: visible;
+ }
/** hide mat header row */
.mat-header-row {
display: none;
@@ -242,6 +253,7 @@ mat-card {
@extend %os-table;
}
+
/* TODO: find a better way to get more vertical space in (empty/small) tables for maximize filter dialog */
mat-paginator {
min-height: 800px;
@@ -292,10 +304,6 @@ mat-expansion-panel {
display: none;
}
-.icon-cell {
- flex: 0 0 40px;
-}
-
// ngx-file-drop requires the custom style in the global css file
.file-drop-style {
margin: auto;
@@ -565,6 +573,7 @@ button.mat-menu-item.selected {
flex: 1;
min-width: 0px;
}
+
.filter-imports {
max-width: 50%;
}
@@ -574,3 +583,42 @@ button.mat-menu-item.selected {
font-weight: 500;
font-size: 16px;
}
+
+
+/*** Projector slides ***/
+
+#slide {
+
+ h3 {
+ color: #222;
+ margin-bottom: 10px
+ }
+
+ .slidetitle {
+ border-bottom: 5px solid #d3d3d3;
+ margin-bottom: 40px;
+
+ h1 {
+ font-size: 2.25em;
+ line-height: 1.1em;
+ margin-bottom: 0;
+ padding-bottom: 0;
+ }
+ h2 {
+ color: #9a9898;
+ margin-top: 10px;
+ margin-bottom: 0px;
+ font-size: 28px;
+ font-weight: normal;
+ display: block;
+ }
+ }
+
+ ul, ol {
+ margin: 0 0 10px 0;
+ }
+
+ hr {
+ margin: 10px 0;
+ }
+}
diff --git a/openslides/agenda/projector.py b/openslides/agenda/projector.py
index 3b0c72321..731d76f0a 100644
--- a/openslides/agenda/projector.py
+++ b/openslides/agenda/projector.py
@@ -107,5 +107,9 @@ def current_list_of_speakers_slide(
def register_projector_slides() -> None:
register_projector_slide("agenda/item-list", items_slide)
register_projector_slide("agenda/list-of-speakers", list_of_speakers_slide)
- register_projector_slide("agenda/current-list-of-speakers", current_list_of_speakers_slide)
- register_projector_element("agenda/current-list-of-speakers-overlay", current_list_of_speakers_slide)
+ register_projector_slide(
+ "agenda/current-list-of-speakers", current_list_of_speakers_slide
+ )
+ register_projector_slide(
+ "agenda/current-list-of-speakers-overlay", current_list_of_speakers_slide
+ )
diff --git a/openslides/core/projector.py b/openslides/core/projector.py
index ac814b363..a2564f535 100644
--- a/openslides/core/projector.py
+++ b/openslides/core/projector.py
@@ -54,4 +54,4 @@ def clock_slide(all_data: AllData, element: Dict[str, Any]) -> Dict[str, Any]:
def register_projector_slides() -> None:
register_projector_slide("core/countdown", countdown_slide)
register_projector_slide("core/projector-message", message_slide)
- register_projector_element("core/clock", clock_slide)
+ register_projector_slide("core/clock", clock_slide)
diff --git a/openslides/core/views.py b/openslides/core/views.py
index 278fe053d..4ce5720e6 100644
--- a/openslides/core/views.py
+++ b/openslides/core/views.py
@@ -173,7 +173,9 @@ class ProjectorViewSet(ModelViewSet):
elements = request.data.get("elements")
preview = request.data.get("preview")
history_element = request.data.get("append_to_history")
- delete_last_history_element = request.data.get("delete_last_history_element", False)
+ delete_last_history_element = request.data.get(
+ "delete_last_history_element", False
+ )
changed_data = {}
if elements is not None:
diff --git a/openslides/motions/projector.py b/openslides/motions/projector.py
index d58980bdd..1ae69fb88 100644
--- a/openslides/motions/projector.py
+++ b/openslides/motions/projector.py
@@ -45,12 +45,11 @@ def motion_slide(all_data: AllData, element: Dict[str, Any]) -> Dict[str, Any]:
* show_meta_box
* reason
* modified_final_version
- * state
- * state_extension
* recommendation
* recommendation_extension
+ * recommender
+ * change_recommendations
* submitter
- * poll
"""
mode = element.get("mode")
motion_id = element.get("id")
@@ -81,11 +80,6 @@ def motion_slide(all_data: AllData, element: Dict[str, Any]) -> Dict[str, Any]:
return_value["modified_final_version"] = motion["modified_final_version"]
if show_meta_box:
- state = get_state(all_data, motion, motion["state_id"])
- return_value["state"] = state["name"]
- if state["show_state_extension_field"]:
- return_value["state_extension"] = motion["state_extension"]
-
if (
not get_config(all_data, "motions_disable_recommendation_on_projector")
and motion["recommendation_id"]
@@ -101,6 +95,9 @@ def motion_slide(all_data: AllData, element: Dict[str, Any]) -> Dict[str, Any]:
"recommendation_extension"
]
+ return_value["recommender"] = get_config(
+ all_data, "motions_recommendations_by"
+ )
return_value["change_recommendations"] = motion["change_recommendations"]
return_value["submitter"] = [
@@ -110,15 +107,6 @@ def motion_slide(all_data: AllData, element: Dict[str, Any]) -> Dict[str, Any]:
)
]
- for poll in motion["polls"][::-1]:
- if poll["has_votes"]:
- return_value["poll"] = {
- "yes": poll["yes"],
- "no": poll["no"],
- "abstain": poll["abstain"],
- }
- break
-
return return_value
diff --git a/openslides/users/projector.py b/openslides/users/projector.py
index c65d40547..a383d1bfb 100644
--- a/openslides/users/projector.py
+++ b/openslides/users/projector.py
@@ -1,6 +1,10 @@
from typing import Any, Dict, List
-from ..utils.projector import AllData, register_projector_slide
+from ..utils.projector import (
+ AllData,
+ ProjectorElementException,
+ register_projector_slide,
+)
# Important: All functions have to be prune. This means, that thay can only
@@ -12,8 +16,22 @@ from ..utils.projector import AllData, register_projector_slide
def user_slide(all_data: AllData, element: Dict[str, Any]) -> Dict[str, Any]:
"""
User slide.
+
+ The returned dict can contain the following fields:
+ * user
"""
- return {"error": "TODO"}
+ user_id = element.get("id")
+
+ if user_id is None:
+ return {"error": "id is required for user slide"}
+
+ try:
+ user = all_data["users/user"][user_id]
+ except KeyError:
+ raise ProjectorElementException(f"user with id {user_id} does not exist")
+
+ return_value = {"user": get_user_name(all_data, user["id"])}
+ return return_value
def get_user_name(all_data: AllData, user_id: int) -> str:
diff --git a/tests/unit/motions/test_projector.py b/tests/unit/motions/test_projector.py
index eb91a2df5..e372748b5 100644
--- a/tests/unit/motions/test_projector.py
+++ b/tests/unit/motions/test_projector.py
@@ -166,7 +166,5 @@ def test_motion_slide(all_data):
"is_child": False,
"show_meta_box": True,
"reason": "",
- "state": "submitted",
"submitter": ["Administrator"],
- "poll": {"yes": "10.000000", "no": "-1.000000", "abstain": "20.000000"},
}