183 lines
13 KiB
XML
183 lines
13 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:models="clr-namespace:LehrerApp.Core.Models;assembly=LehrerApp.Core"
|
||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
||
xmlns:views="clr-namespace:LehrerApp.Desktop.Views.Groups"
|
||
x:Class="LehrerApp.Desktop.Views.Groups.TeachingModeWindow"
|
||
x:DataType="vm:TeachingModeViewModel"
|
||
Title="{Binding LessonInfo.Topic, StringFormat='Unterrichtsmodus · {0}'}"
|
||
Width="1400" Height="850" MinWidth="1000" MinHeight="600"
|
||
WindowState="Maximized" CanResize="True" WindowStartupLocation="CenterScreen">
|
||
|
||
<Window.Styles>
|
||
<Style Selector="Border.phase">
|
||
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
|
||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||
<Setter Property="BorderThickness" Value="2"/>
|
||
</Style>
|
||
<Style Selector="Border.phase.overflow">
|
||
<Setter Property="Background" Value="#22E57373"/>
|
||
<Setter Property="BorderBrush" Value="#99E57373"/>
|
||
</Style>
|
||
<Style Selector="Border.phase.active">
|
||
<Setter Property="Background" Value="#223BA6C8"/>
|
||
<Setter Property="BorderBrush" Value="#3BA6C8"/>
|
||
</Style>
|
||
</Window.Styles>
|
||
<Grid RowDefinitions="Auto,*" Margin="20">
|
||
<Grid Grid.Row="0" RowDefinitions="Auto,Auto" Margin="0,0,0,14">
|
||
<StackPanel Grid.Column="0" Spacing="3">
|
||
<TextBlock FontSize="20" FontWeight="SemiBold">
|
||
<Run Text="{Binding GroupName}"/><Run Text=" · "/><Run Text="{Binding LessonInfo.Topic}"/>
|
||
</TextBlock>
|
||
<StackPanel Orientation="Horizontal" Spacing="16">
|
||
<TextBlock FontSize="12" Opacity="0.65">
|
||
<Run Text="Datum: "/><Run Text="{Binding LessonInfo.DateDisplay}"/>
|
||
</TextBlock>
|
||
<TextBlock FontSize="12" Opacity="0.65">
|
||
<Run Text="Beginn: "/><Run Text="{Binding LessonInfo.StartTimeDisplay}"/>
|
||
</TextBlock>
|
||
<TextBlock FontSize="12" Opacity="0.65">
|
||
<Run Text="Status: "/><Run Text="{Binding LessonInfo.StatusLabel}"/>
|
||
</TextBlock>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
<WrapPanel Grid.Row="1" ItemSpacing="8" LineSpacing="6" Margin="0,10,0,0">
|
||
<!-- Nutzer-Feedback: die Schnellbewertungs-Dialoge gab es bisher nur über den
|
||
Mitarbeit-Tab der Gruppe — hier direkt auf die Sitzung dieser Stunde vorselektiert
|
||
(siehe TeachingModeViewModel), kein Umweg mehr über "Zur Mitarbeit". -->
|
||
<Button Content="⚡ Mitarbeit" Command="{Binding Participation.QuickInputCommand}"
|
||
ToolTip.Tip="Mitarbeit dieser Stunde schnell bewerten."/>
|
||
<Button Content="Anwesenheit kontrollieren" Command="{Binding SeatingPlan.CheckAttendanceCommand}" IsEnabled="{Binding SeatingPlan.IsEditable}"/>
|
||
<Button Content="Hausaufgaben kontrollieren" Command="{Binding SeatingPlan.CheckHomeworkCommand}" IsEnabled="{Binding SeatingPlan.IsEditable}"/>
|
||
<Button Content="Kontrolle beenden" Command="{Binding SeatingPlan.EndQuickCheckCommand}" IsVisible="{Binding SeatingPlan.IsQuickMode}"/>
|
||
<Button Content="Listenansicht …" Command="{Binding Participation.StatusQuickInputCommand}" ToolTip.Tip="Auch Schüler ohne Sitzplatz erfassen."/>
|
||
<Button Content="Vollbild ↔" Click="OnFullScreen" ToolTip.Tip="Vollbild umschalten (F11); mit Escape verlassen."/>
|
||
<Button Content="Zur Mitarbeit" Command="{Binding LessonInfo.NavigateToParticipationCommand}"
|
||
ToolTip.Tip="Schließt den Unterrichtsmodus und springt zum Tab 'Mitarbeit' der Lerngruppe."/>
|
||
<Button Content="Zu den Noten" Command="{Binding LessonInfo.NavigateToGradesCommand}"/>
|
||
<Button Content="Unterrichtsmodus beenden" Click="OnClose" Margin="16,0,0,0"/>
|
||
</WrapPanel>
|
||
</Grid>
|
||
|
||
<Grid Grid.Row="1" ColumnDefinitions="360,16,*">
|
||
<Border Grid.Column="0" BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||
BorderThickness="0,0,1,0" Padding="0,0,16,0">
|
||
<ScrollViewer>
|
||
<StackPanel Spacing="14">
|
||
<TextBlock Text="Verlaufsplan" FontSize="14" FontWeight="SemiBold"/>
|
||
|
||
<TextBlock Text="Hauptweg · Live-Verlauf" FontSize="12" Opacity="0.65"/>
|
||
<TextBlock Text="Noch keine Phasen geplant." IsVisible="{Binding !Timeline.HasPhases}"/>
|
||
<Button Content="Zeitmessung jetzt starten" Command="{Binding Timeline.StartNowCommand}" IsVisible="{Binding Timeline.NeedsStart}" IsEnabled="{Binding Timeline.IsEditable}"/>
|
||
<ItemsControl ItemsSource="{Binding Timeline.Phases}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:TeachingPhaseViewModel">
|
||
<Border Classes="phase" Classes.active="{Binding IsActive}" Classes.overflow="{Binding IsOverflow}" CornerRadius="6" Padding="10,8" Margin="0,0,0,8">
|
||
<StackPanel Spacing="5">
|
||
<TextBlock Text="{Binding Source.Name}" FontWeight="SemiBold" TextWrapping="Wrap"/>
|
||
<TextBlock Text="{Binding TimeDisplay}" FontSize="12"/>
|
||
<TextBlock Text="{Binding Source.DurationMinutes, StringFormat='Geplant: {0} Min.'}" FontSize="11" Opacity="0.7"/>
|
||
<TextBlock Text="{Binding Source.Activity}" TextWrapping="Wrap" FontSize="12"
|
||
IsVisible="{Binding Source.Activity, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||
<TextBlock Text="{Binding Source.Material}" TextWrapping="Wrap" FontSize="11" Opacity="0.7"
|
||
IsVisible="{Binding Source.Material, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||
<TextBlock Text="{Binding Source.Shorthand}" FontSize="11" Opacity="0.7"
|
||
IsVisible="{Binding Source.Shorthand, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||
<ProgressBar Minimum="0" Maximum="100" Value="{Binding Progress}" Height="3" IsVisible="{Binding IsActive}"/>
|
||
<TextBlock Text="Über dem geplanten Stundenende" FontSize="11" IsVisible="{Binding IsOverflow}"/>
|
||
<TextBlock Text="Erledigt" FontSize="11" Opacity="0.6" IsVisible="{Binding IsCompleted}"/>
|
||
<TextBlock Text="In Folgestunde kopiert" FontSize="11" IsVisible="{Binding IsTransferred}"/>
|
||
<StackPanel IsVisible="{Binding IsActive}" IsEnabled="{Binding IsEditable}" Spacing="4">
|
||
<WrapPanel ItemSpacing="4" LineSpacing="4">
|
||
<Button Content="Weiter" Command="{Binding FinishCommand}" FontSize="11" Padding="6,4"/>
|
||
<Button Content="+5 Min." Command="{Binding ExtendFiveCommand}" FontSize="11" Padding="6,4"/>
|
||
<Button Content="+10 Min." Command="{Binding ExtendTenCommand}" FontSize="11" Padding="6,4"/>
|
||
<Button Content="Halten bis Weiter" Command="{Binding HoldCommand}" FontSize="11" Padding="6,4" IsEnabled="{Binding !IsHeld}"/>
|
||
</WrapPanel>
|
||
<TextBlock Text="Gehalten – mit Weiter nächste Phase starten" FontSize="11" TextWrapping="Wrap" IsVisible="{Binding IsHeld}"/>
|
||
</StackPanel>
|
||
<Button Content="Jetzt vorziehen" Command="{Binding BringForwardCommand}" IsVisible="{Binding CanStartNow}" FontSize="11"/>
|
||
</StackPanel>
|
||
</Border>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
<StackPanel Spacing="6" IsVisible="{Binding Timeline.HasRemainder}" IsEnabled="{Binding Timeline.IsEditable}">
|
||
<TextBlock Text="Rest für eine Folgestunde" FontWeight="SemiBold"/>
|
||
<ComboBox ItemsSource="{Binding Timeline.TransferTargets}" SelectedItem="{Binding Timeline.TransferTarget}" HorizontalAlignment="Stretch">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate x:DataType="models:Lesson">
|
||
<TextBlock><Run Text="{Binding Date, StringFormat='{}{0:dd.MM.yyyy}'}"/><Run Text=" · "/><Run Text="{Binding Topic}"/></TextBlock>
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
<Button Content="Rötlich markierte Phasen kopieren" Command="{Binding Timeline.TransferRemainderCommand}" IsEnabled="{Binding Timeline.HasTransferTargets}"/>
|
||
<TextBlock Text="Zuerst eine Folgestunde in der Planung anlegen." IsVisible="{Binding !Timeline.HasTransferTargets}" TextWrapping="Wrap"/>
|
||
</StackPanel>
|
||
<TextBlock Text="{Binding Timeline.Status}" TextWrapping="Wrap" FontSize="11"/>
|
||
<Expander Header="Alternative Abläufe" IsVisible="{Binding LessonInfo.HasAlternatives}">
|
||
<ItemsControl ItemsSource="{Binding LessonInfo.PhaseGroups}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:PhaseGroupViewItem">
|
||
<StackPanel IsVisible="{Binding !IsMainPath}" Spacing="4" Margin="0,4">
|
||
<TextBlock Text="{Binding Label}" FontWeight="SemiBold"/>
|
||
<TextBlock Text="{Binding Description}" TextWrapping="Wrap"/>
|
||
<ItemsControl ItemsSource="{Binding Phases}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:PhaseViewItem">
|
||
<StackPanel Margin="0,4">
|
||
<TextBlock><Run Text="{Binding Name}"/><Run Text="{Binding DurationMinutes, StringFormat=' · {0} Min.'}"/></TextBlock>
|
||
<TextBlock Text="{Binding Activity}" TextWrapping="Wrap" FontSize="12"/>
|
||
<TextBlock Text="{Binding Material}" TextWrapping="Wrap" FontSize="11"/>
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</Expander>
|
||
|
||
<!-- Nutzer-Feedback: Hausaufgabe der letzten Stunde ansehen/als kontrolliert abhaken
|
||
und die Hausaufgabe DIESER Stunde einsehen/ändern, ohne den vollen
|
||
Verlaufsplan-Editor öffnen zu müssen — manchmal ergibt sich die Hausaufgabe erst
|
||
während des Unterrichts. Ersetzt die bisherige rein lesbare Anzeige
|
||
(LessonInfo.Homework), die dasselbe Feld doppelt und nur lesend gezeigt hätte. -->
|
||
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||
CornerRadius="6" Padding="10,8" IsVisible="{Binding Homework.HasPreviousHomework}">
|
||
<StackPanel Spacing="4">
|
||
<TextBlock FontSize="12" FontWeight="SemiBold" Opacity="0.6">
|
||
<Run Text="Hausaufgabe letzte Stunde"/><Run Text=" · "/>
|
||
<Run Text="{Binding Homework.PreviousLessonLabel}"/>
|
||
</TextBlock>
|
||
<TextBlock Text="{Binding Homework.PreviousHomeworkText}" FontSize="13" TextWrapping="Wrap"/>
|
||
<CheckBox Content="Kontrolliert" IsChecked="{Binding Homework.PreviousHomeworkChecked}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="Hausaufgabe (diese Stunde)" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
||
<TextBox Text="{Binding Homework.CurrentHomework, Mode=TwoWay}" AcceptsReturn="True"
|
||
TextWrapping="Wrap" MinHeight="52" PlaceholderText="Noch keine Hausaufgabe eingetragen…"/>
|
||
<Grid ColumnDefinitions="Auto,*">
|
||
<Button Grid.Column="0" Content="Speichern" Command="{Binding Homework.SaveCurrentHomeworkCommand}"/>
|
||
<TextBlock Grid.Column="1" Text="{Binding Homework.SaveStatus}" FontSize="11" Opacity="0.55"
|
||
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||
</Grid>
|
||
</StackPanel>
|
||
|
||
<StackPanel Spacing="4" IsVisible="{Binding LessonInfo.Reflection, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||
<TextBlock Text="Reflexion" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
|
||
<TextBlock Text="{Binding LessonInfo.Reflection}" FontSize="13" TextWrapping="Wrap"/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</Border>
|
||
|
||
<views:SeatingPlanTabView Grid.Column="2" DataContext="{Binding SeatingPlan}"/>
|
||
</Grid>
|
||
</Grid>
|
||
</Window>
|