UX-Update 2.0, Neues Dashboard
This commit is contained in:
@@ -5,13 +5,6 @@
|
||||
x:Class="LehrerApp.Desktop.Views.Groups.GroupListView"
|
||||
x:DataType="vm:GroupListViewModel">
|
||||
|
||||
<UserControl.Styles>
|
||||
<Style Selector="TextBlock.overdue">
|
||||
<Setter Property="Foreground" Value="Red"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
|
||||
<!-- Kopfzeile mit Schuljahr-Wähler und Neu-Button -->
|
||||
@@ -28,180 +21,85 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Master-Detail: Liste links, Übersicht rechts -->
|
||||
<Grid Grid.Row="1" ColumnDefinitions="260,*">
|
||||
<!-- Eine Navigationsebene: Karten öffnen direkt das Gruppendetail. Die Verwaltung sitzt
|
||||
am jeweiligen Eintrag und benötigt keine vorgeschaltete Bereichsauswahl mehr. -->
|
||||
<Grid Grid.Row="1" RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="*,Auto" Margin="24,18,24,8">
|
||||
<TextBox Grid.Column="0" Text="{Binding SearchText}"
|
||||
PlaceholderText="Name oder Fach suchen …" MaxWidth="560"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
<ToggleSwitch Grid.Column="1" Content="Archiv anzeigen" IsChecked="{Binding ShowArchived}"
|
||||
Margin="20,0,0,0" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Linke Spalte: Sucheingabe + Listenansicht -->
|
||||
<Border Grid.Column="0"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,1,0">
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Margin="12,8" Spacing="8">
|
||||
<TextBox Text="{Binding SearchText}" PlaceholderText="Suchen…"/>
|
||||
<ToggleSwitch Content="Archiv anzeigen" IsChecked="{Binding ShowArchived}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding EmptyListMessage}" TextWrapping="Wrap"
|
||||
Margin="16,12" FontSize="12" Opacity="0.45"
|
||||
IsVisible="{Binding HasNoGroups}"/>
|
||||
<ListBox ItemsSource="{Binding Groups}"
|
||||
SelectedItem="{Binding SelectedGroup}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="vm:GroupListItem">
|
||||
<Grid ColumnDefinitions="4,*" Margin="2,4">
|
||||
<Border Grid.Column="0" Width="4" CornerRadius="2"
|
||||
Background="{DynamicResource SystemAccentColor}"
|
||||
Margin="0,0,10,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}"
|
||||
FontWeight="SemiBold" FontSize="13"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding TypeLabel}"
|
||||
FontSize="11" Opacity="0.5"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding Subject}" FontSize="12" Opacity="0.65"
|
||||
IsVisible="{Binding Subject, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<TextBlock Text="{Binding GradingLabel}" FontSize="11" Opacity="0.4"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Rechte Spalte: Platzhalter wenn keine Auswahl -->
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Spacing="8"
|
||||
IsVisible="{Binding SelectedGroup, Converter={x:Static ObjectConverters.IsNull}}">
|
||||
<TextBlock Text="Gruppe auswählen" FontSize="16" Opacity="0.4"
|
||||
HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="oder + Neue Gruppe anlegen" FontSize="12" Opacity="0.3"
|
||||
HorizontalAlignment="Center"/>
|
||||
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10"
|
||||
IsVisible="{Binding HasNoGroups}">
|
||||
<TextBlock Text="{Binding EmptyListMessage}" FontSize="15" Opacity="0.55"
|
||||
TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
<Button Content="+ Erste Lerngruppe anlegen" Command="{Binding AddGroupCommand}"
|
||||
IsVisible="{Binding !ShowArchived}" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Rechte Spalte: Gruppen-Übersicht wenn ausgewählt -->
|
||||
<ScrollViewer Grid.Column="1"
|
||||
IsVisible="{Binding SelectedGroup, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<StackPanel Margin="28,24" Spacing="20">
|
||||
|
||||
<!-- Gruppenname und Kurzinfos -->
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" Spacing="4">
|
||||
<TextBlock Text="{Binding SelectedGroupDisplayName}"
|
||||
FontSize="24" FontWeight="SemiBold" TextWrapping="Wrap"/>
|
||||
<TextBlock Text="{Binding SelectedGroupSubtitle}"
|
||||
FontSize="12" Opacity="0.55"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="1" Content="⋯ Verwalten" VerticalAlignment="Top"
|
||||
Margin="16,0,0,0">
|
||||
<Button.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuItem Header="Details bearbeiten"
|
||||
Command="{Binding EditGroupCommand}"/>
|
||||
<MenuItem Header="Ins nächste Schuljahr übernehmen …"
|
||||
Command="{Binding RollOverGroupCommand}"/>
|
||||
<MenuItem Header="{Binding SelectedGroup.ArchiveActionLabel}"
|
||||
Command="{Binding ToggleArchiveCommand}"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="Teilnehmer importieren (bald)" IsEnabled="False"
|
||||
ToolTip.Tip="Import aus dem Teilnehmerexport der Lernplattform folgt."/>
|
||||
<Separator/>
|
||||
<MenuItem Header="Lerngruppe löschen"
|
||||
Command="{Binding DeleteGroupCommand}"/>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Separator/>
|
||||
|
||||
<!-- Schnellüberblick (Nutzer-Feedback) -->
|
||||
<StackPanel Spacing="8" IsVisible="{Binding QuickHasAnything}">
|
||||
<TextBlock Text="SCHNELLÜBERBLICK" FontSize="10" FontWeight="Bold" Opacity="0.4"/>
|
||||
<StackPanel Spacing="1" IsVisible="{Binding QuickHasNextLesson}">
|
||||
<TextBlock Text="Nächste Stunde" FontSize="11" Opacity="0.55"/>
|
||||
<TextBlock Text="{Binding QuickNextLessonLabel}" FontSize="13" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="1" IsVisible="{Binding QuickHasNextExam}">
|
||||
<TextBlock Text="Nächste Klausur" FontSize="11" Opacity="0.55"/>
|
||||
<TextBlock Text="{Binding QuickNextExamLabel}" FontSize="13" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4" IsVisible="{Binding QuickHasTasks}">
|
||||
<TextBlock Text="Wichtige Aufgaben" FontSize="11" Opacity="0.55"/>
|
||||
<ItemsControl ItemsSource="{Binding QuickTasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:GroupTaskItem">
|
||||
<Grid ColumnDefinitions="4,Auto,*,Auto" Margin="0,2">
|
||||
<Border Grid.Column="0" Background="{Binding PriorityColorHex}" CornerRadius="2"
|
||||
Margin="0,0,6,0" IsVisible="{Binding IsHighPriority}"/>
|
||||
<TextBlock Grid.Column="1" Text="🔔" FontSize="11" Margin="0,0,4,0"
|
||||
IsVisible="{Binding IsReminder}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding Title}" FontSize="12"
|
||||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="3" Text="{Binding DueDateDisplay}" FontSize="11"
|
||||
VerticalAlignment="Center" Classes.overdue="{Binding IsOverdue}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Separator IsVisible="{Binding QuickHasAnything}"/>
|
||||
|
||||
<!-- Bereichs-Navigation -->
|
||||
<TextBlock Text="BEREICHE" FontSize="10" FontWeight="Bold"
|
||||
Opacity="0.4" Margin="0,0,0,2"/>
|
||||
<StackPanel Spacing="6">
|
||||
<Button Content="📊 Übersicht"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="0"/>
|
||||
<Button Content="👤 Schülerliste"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="1"/>
|
||||
<Button Content="🪑 Sitzpläne"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="2"/>
|
||||
<Button Content="✋ Mitarbeit"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="3"/>
|
||||
<Button Content="📝 Klausuren"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="4"/>
|
||||
<Button Content="🔢 Notenübersicht"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="5"/>
|
||||
<Button Content="📅 Unterrichtsplanung"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="6"/>
|
||||
<Button Content="🎯 Kompetenzübersicht"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="7"/>
|
||||
<Button Content="📋 Dokumentation"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="8"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1" IsVisible="{Binding !HasNoGroups}"
|
||||
HorizontalScrollBarVisibility="Disabled">
|
||||
<ItemsControl ItemsSource="{Binding Groups}" Margin="20,12,20,24">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:GroupListItem">
|
||||
<Border Width="330" MinHeight="116" Margin="6" CornerRadius="9"
|
||||
Background="{DynamicResource AppCardBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource AppCardBorderBrush}" BorderThickness="1">
|
||||
<Grid ColumnDefinitions="4,*,Auto">
|
||||
<Border Grid.Column="0" Background="{DynamicResource SystemAccentColor}"
|
||||
CornerRadius="9,0,0,9"/>
|
||||
<Button Grid.Column="1" Background="Transparent" BorderThickness="0"
|
||||
Padding="16,14" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
Command="{Binding OpenCommand}"
|
||||
AutomationProperties.Name="{Binding OpenAutomationName}">
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Text="{Binding Name}" FontSize="17" FontWeight="SemiBold"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock Text="{Binding Subject}" FontSize="13" Opacity="0.7"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
IsVisible="{Binding Subject, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<StackPanel Orientation="Horizontal" Spacing="7">
|
||||
<Border Background="{DynamicResource AppChipBackgroundBrush}" CornerRadius="8" Padding="7,2">
|
||||
<TextBlock Text="{Binding TypeLabel}" FontSize="10" Opacity="0.75"/>
|
||||
</Border>
|
||||
<TextBlock Text="{Binding GradingLabel}" FontSize="11" Opacity="0.5"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Content="⋯" Width="36" Height="32" Margin="0,10,10,0"
|
||||
Padding="0" VerticalAlignment="Top"
|
||||
ToolTip.Tip="Lerngruppe verwalten"
|
||||
AutomationProperties.Name="{Binding ManageAutomationName}">
|
||||
<Button.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuItem Header="Details bearbeiten" IsEnabled="{Binding IsActive}"
|
||||
Command="{Binding EditCommand}"/>
|
||||
<MenuItem Header="Ins nächste Schuljahr übernehmen …"
|
||||
Command="{Binding RollOverCommand}"/>
|
||||
<MenuItem Header="{Binding ArchiveActionLabel}"
|
||||
Command="{Binding ToggleArchiveCommand}"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="Lerngruppe löschen" IsEnabled="{Binding IsActive}"
|
||||
Command="{Binding DeleteCommand}"/>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user