Add placeholder pages, change order of boxes in user management
This commit is contained in:
parent
82b16b868f
commit
a501948aee
@ -143,6 +143,18 @@ if __name__ == "__main__":
|
||||
build=pages.ManageUsersPage,
|
||||
guard=team_guard
|
||||
),
|
||||
ComponentPage(
|
||||
name="ManageCateringPage",
|
||||
url_segment="manage-catering",
|
||||
build=pages.ManageCateringPage,
|
||||
guard=team_guard
|
||||
),
|
||||
ComponentPage(
|
||||
name="ManageTournamentsPage",
|
||||
url_segment="manage-tournaments",
|
||||
build=pages.ManageTournamentsPage,
|
||||
guard=team_guard
|
||||
),
|
||||
ComponentPage(
|
||||
name="DbErrorPage",
|
||||
url_segment="db-error",
|
||||
|
||||
32
src/ez_lan_manager/pages/ManageCateringPage.py
Normal file
32
src/ez_lan_manager/pages/ManageCateringPage.py
Normal file
@ -0,0 +1,32 @@
|
||||
import logging
|
||||
|
||||
from rio import Column, Component, event, TextStyle, Text, Spacer
|
||||
|
||||
from src.ez_lan_manager import ConfigurationService
|
||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||
|
||||
logger = logging.getLogger(__name__.split(".")[-1])
|
||||
|
||||
class ManageCateringPage(Component):
|
||||
@event.on_populate
|
||||
async def on_populate(self) -> None:
|
||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Catering Verwaltung")
|
||||
|
||||
def build(self) -> Component:
|
||||
return Column(
|
||||
MainViewContentBox(
|
||||
Column(
|
||||
Text(
|
||||
text="Catering Verwaltung",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=2,
|
||||
align_x=0.5
|
||||
)
|
||||
)
|
||||
),
|
||||
Spacer()
|
||||
)
|
||||
32
src/ez_lan_manager/pages/ManageTournamentsPage.py
Normal file
32
src/ez_lan_manager/pages/ManageTournamentsPage.py
Normal file
@ -0,0 +1,32 @@
|
||||
import logging
|
||||
|
||||
from rio import Column, Component, event, TextStyle, Text, Spacer
|
||||
|
||||
from src.ez_lan_manager import ConfigurationService
|
||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||
|
||||
logger = logging.getLogger(__name__.split(".")[-1])
|
||||
|
||||
class ManageTournamentsPage(Component):
|
||||
@event.on_populate
|
||||
async def on_populate(self) -> None:
|
||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Turnier Verwaltung")
|
||||
|
||||
def build(self) -> Component:
|
||||
return Column(
|
||||
MainViewContentBox(
|
||||
Column(
|
||||
Text(
|
||||
text="Turnier Verwaltung",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=2,
|
||||
align_x=0.5
|
||||
)
|
||||
)
|
||||
),
|
||||
Spacer()
|
||||
)
|
||||
@ -148,33 +148,6 @@ class ManageUsersPage(Component):
|
||||
)
|
||||
)
|
||||
),
|
||||
MainViewContentBox(
|
||||
Column(
|
||||
Text(
|
||||
text="Allgemeines",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=2,
|
||||
align_x=0.5
|
||||
) if self.selected_user else Spacer(),
|
||||
UserEditForm(
|
||||
is_own_profile=False,
|
||||
user=self.selected_user
|
||||
) if self.selected_user else Text(
|
||||
text="Bitte Nutzer auswählen...",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=2,
|
||||
align_x=0.5
|
||||
)
|
||||
)
|
||||
),
|
||||
MainViewContentBox(
|
||||
Column(
|
||||
Text(
|
||||
@ -277,5 +250,32 @@ class ManageUsersPage(Component):
|
||||
)
|
||||
)
|
||||
) if self.selected_user else Spacer(),
|
||||
MainViewContentBox(
|
||||
Column(
|
||||
Text(
|
||||
text="Allgemeines",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=2,
|
||||
align_x=0.5
|
||||
) if self.selected_user else Spacer(),
|
||||
UserEditForm(
|
||||
is_own_profile=False,
|
||||
user=self.selected_user
|
||||
) if self.selected_user else Text(
|
||||
text="Bitte Nutzer auswählen...",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=2,
|
||||
align_x=0.5
|
||||
)
|
||||
)
|
||||
),
|
||||
align_y=0
|
||||
)
|
||||
|
||||
@ -17,3 +17,5 @@ from .SeatingPlanPage import SeatingPlanPage
|
||||
from .BuyTicketPage import BuyTicketPage
|
||||
from .ManageNewsPage import ManageNewsPage
|
||||
from .ManageUsersPage import ManageUsersPage
|
||||
from .ManageCateringPage import ManageCateringPage
|
||||
from .ManageTournamentsPage import ManageTournamentsPage
|
||||
|
||||
Loading…
Reference in New Issue
Block a user