4.5.1: Terminvorschlag für neue Stunden schlägt jetzt auch die Stundennummer
vor (bei Doppelstunden die erste Periode), nicht nur den Wochentag —
zieht über den bestehenden LessonNumber-Changed-Hook automatisch auch den
Stundenbeginn nach.
4.5.2 (teilweise): Klick auf eine Stunde im Stundenplan ("Heute"-Liste und
read-only Wochenraster) springt bei bereits vorhandener Lesson direkt in
den Verlaufsplan-Viewer statt nur grob zum Planung-Tab. Das Anlegen einer
neuen Lesson direkt aus dem Stundenplan bleibt bewusst offen (ungeklärte
Unit-Zuordnung, siehe TODO.md).
4.5.3: Der Lesson-Viewer hat jetzt Buttons "Zur Mitarbeit"/"Zu den Noten"
zum Weiterverzweigen in die Lerngruppe.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
98 lines
5.6 KiB
XML
98 lines
5.6 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
|
x:Class="LehrerApp.Desktop.Views.Groups.LessonViewerDialog"
|
|
x:DataType="vm:LessonViewerViewModel"
|
|
Title="{Binding Topic}"
|
|
Width="900" Height="700" MinWidth="600" MinHeight="420"
|
|
CanResize="True" WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid RowDefinitions="Auto,*,Auto" Margin="24">
|
|
<StackPanel Grid.Row="0" Spacing="4" Margin="0,0,0,16">
|
|
<TextBlock Text="{Binding Topic}" FontSize="20" FontWeight="SemiBold"/>
|
|
<StackPanel Orientation="Horizontal" Spacing="16">
|
|
<TextBlock FontSize="13" Opacity="0.7">
|
|
<Run Text="Datum: "/><Run Text="{Binding DateDisplay}"/>
|
|
</TextBlock>
|
|
<TextBlock FontSize="13" Opacity="0.7">
|
|
<Run Text="Beginn: "/><Run Text="{Binding StartTimeDisplay}"/>
|
|
</TextBlock>
|
|
<TextBlock FontSize="13" Opacity="0.7">
|
|
<Run Text="Status: "/><Run Text="{Binding StatusLabel}"/>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<ScrollViewer Grid.Row="1">
|
|
<StackPanel Spacing="0">
|
|
<Grid ColumnDefinitions="140,80,*,140,130" Margin="4,0,0,6">
|
|
<TextBlock Grid.Column="0" Text="Phase" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="1" Text="Dauer/Zeit" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="2" Text="Tätigkeit" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="3" Text="Material" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="4" Text="Kurzsymbol" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
</Grid>
|
|
<Separator/>
|
|
|
|
<ItemsControl ItemsSource="{Binding PhaseGroups}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:PhaseGroupViewItem">
|
|
<StackPanel Margin="0,0,0,14">
|
|
<StackPanel IsVisible="{Binding $parent[ItemsControl].((vm:LessonViewerViewModel)DataContext).HasAlternatives}">
|
|
<TextBlock Text="{Binding Label}" FontSize="13" FontWeight="SemiBold" Opacity="0.75"
|
|
Margin="4,10,0,2"/>
|
|
<TextBlock Text="{Binding Description}" FontSize="12" Opacity="0.55" TextWrapping="Wrap"
|
|
Margin="4,0,0,6"
|
|
IsVisible="{Binding Description, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
</StackPanel>
|
|
<ItemsControl ItemsSource="{Binding Phases}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:PhaseViewItem">
|
|
<Border BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
|
BorderThickness="0,0,0,1" Padding="4,10">
|
|
<Grid ColumnDefinitions="140,80,*,140,130">
|
|
<TextBlock Grid.Column="0" Text="{Binding Name}" FontSize="15" FontWeight="SemiBold"
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,0,8,0"/>
|
|
<StackPanel Grid.Column="1" VerticalAlignment="Top">
|
|
<TextBlock Text="{Binding DurationMinutes, StringFormat='{}{0} Min.'}" FontSize="14"/>
|
|
<TextBlock Text="{Binding TimeDisplay}" FontSize="12" Opacity="0.6"/>
|
|
</StackPanel>
|
|
<TextBlock Grid.Column="2" Text="{Binding Activity}" FontSize="14"
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,0,8,0"/>
|
|
<TextBlock Grid.Column="3" Text="{Binding Material}" FontSize="14"
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,0,8,0"/>
|
|
<TextBlock Grid.Column="4" Text="{Binding Shorthand}" FontSize="14"
|
|
TextWrapping="Wrap" VerticalAlignment="Top"/>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<StackPanel Spacing="4" Margin="4,16,0,0" IsVisible="{Binding Homework, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
|
<TextBlock Text="Hausaufgabe" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
<TextBlock Text="{Binding Homework}" FontSize="14" TextWrapping="Wrap"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="4" Margin="4,16,0,0" IsVisible="{Binding Reflection, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
|
<TextBlock Text="Reflexion" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
|
<TextBlock Text="{Binding Reflection}" FontSize="14" TextWrapping="Wrap"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<Grid Grid.Row="2" ColumnDefinitions="*,Auto" Margin="0,16,0,0">
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="8">
|
|
<Button Content="Zur Mitarbeit" Command="{Binding NavigateToParticipationCommand}"
|
|
ToolTip.Tip="Springt zum Tab 'Mitarbeit' der Lerngruppe — dort auch Anwesenheit/Hausaufgaben."/>
|
|
<Button Content="Zu den Noten" Command="{Binding NavigateToGradesCommand}"/>
|
|
</StackPanel>
|
|
<Button Grid.Column="1" Content="Schließen" Click="OnClose"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|