89 lines
6.3 KiB
XML
89 lines
6.3 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"
|
|
xmlns:conv="clr-namespace:LehrerApp.Desktop.Converters"
|
|
x:Class="LehrerApp.Desktop.Views.Groups.WebUntisHomeworkComparisonDialog"
|
|
x:DataType="vm:WebUntisHomeworkComparisonViewModel"
|
|
Title="Fehlende Hausaufgaben mit WebUntis abgleichen" Width="1250" Height="760"
|
|
MinWidth="1000" MinHeight="550" WindowStartupLocation="CenterOwner">
|
|
<Grid RowDefinitions="Auto,Auto,Auto,2*,Auto,Auto,1*,Auto" Margin="24" RowSpacing="8">
|
|
<StackPanel Grid.Row="0" Spacing="4">
|
|
<TextBlock Text="Fehlende Hausaufgaben mit WebUntis abgleichen" Classes="dialogtitle"/>
|
|
<TextBlock TextWrapping="Wrap" FontSize="12" Opacity="0.65"
|
|
Text="Eigene negative Klassenbucheinträge mit der Kategorie „Hausaufgabe“ oder „HA“. Der Zielstatus ist vor der Übernahme änderbar. Bereits lokal erfasste Stati bleiben unmarkiert; unten stehen lokale fehlende Hausaufgaben ohne zugeordneten WebUntis-Eintrag."/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Spacing="8">
|
|
<CalendarDatePicker SelectedDate="{Binding StartDate, Converter={x:Static conv:DateTimeOffsetToDateTimeConverter.Instance}}"/>
|
|
<TextBlock Text="bis" VerticalAlignment="Center"/>
|
|
<CalendarDatePicker SelectedDate="{Binding EndDate, Converter={x:Static conv:DateTimeOffsetToDateTimeConverter.Instance}}"/>
|
|
<Button Content="Klassenbucheinträge laden" Command="{Binding LoadCommand}" IsEnabled="{Binding !Busy}"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="2" ColumnDefinitions="Auto,70,60,60,1*,1*,1.5*,1.1*,1.1*" ColumnSpacing="8" Margin="4,0">
|
|
<TextBlock Grid.Column="1" Text="Datum" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="2" Text="Klasse" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="3" Text="Fach" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="4" Text="Name (WebUntis)" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="5" Text="Zuordnung" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="6" Text="WebUntis-Eintrag" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="7" Text="Übernahme als" FontSize="11" Opacity="0.6"/>
|
|
<TextBlock Grid.Column="8" Text="Lokaler Status" FontSize="11" Opacity="0.6"/>
|
|
</Grid>
|
|
<ScrollViewer Grid.Row="3">
|
|
<ItemsControl ItemsSource="{Binding Rows}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:WebUntisHomeworkRow">
|
|
<Grid ColumnDefinitions="Auto,70,60,60,1*,1*,1.5*,1.1*,1.1*" ColumnSpacing="8" Margin="0,3">
|
|
<CheckBox Grid.Column="0" IsChecked="{Binding Selected}" IsEnabled="{Binding CanApply}"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding DateLabel}" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="2" Text="{Binding ClassName}" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="3" Text="{Binding SubjectLabel}" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="4" Text="{Binding UntisStudentName}" VerticalAlignment="Center" TextWrapping="Wrap"/>
|
|
<ComboBox Grid.Column="5" ItemsSource="{Binding Candidates}" SelectedItem="{Binding AssignedStudent}"
|
|
DisplayMemberBinding="{Binding FullName}" PlaceholderText="Schüler*in wählen…"
|
|
HorizontalAlignment="Stretch"/>
|
|
<StackPanel Grid.Column="6" Spacing="2" VerticalAlignment="Center">
|
|
<TextBlock Text="{Binding CategoryName}" FontWeight="SemiBold" TextWrapping="Wrap"/>
|
|
<TextBlock Text="{Binding Text}" TextWrapping="Wrap" FontSize="12"/>
|
|
</StackPanel>
|
|
<ComboBox Grid.Column="7" ItemsSource="{Binding StatusOptions}" SelectedItem="{Binding SelectedStatusName}"
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
|
ToolTip.Tip="{Binding SelectedStatusName}"/>
|
|
<TextBlock Grid.Column="8" Text="{Binding LocalStatus}" TextWrapping="Wrap" VerticalAlignment="Center"
|
|
ToolTip.Tip="{Binding LocalStatus}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<Grid Grid.Row="4" ColumnDefinitions="*,Auto" ColumnSpacing="8">
|
|
<TextBlock Grid.Column="0" Text="{Binding Status}" FontSize="12" TextWrapping="Wrap" VerticalAlignment="Center"/>
|
|
<Button Grid.Column="1" Content="Markierte übernehmen" Command="{Binding ApplyCommand}" IsEnabled="{Binding !Busy}"/>
|
|
</Grid>
|
|
<StackPanel Grid.Row="5" Spacing="2">
|
|
<TextBlock Text="Lokal erfasste fehlende Hausaufgaben ohne WebUntis-Gegenstück" FontWeight="SemiBold" FontSize="13"/>
|
|
<TextBlock Text="Zum manuellen Nachtragen im Klassenbuch. Bei ungeklärter Fachzuordnung bitte den WebUntis-Eintrag am selben Tag prüfen."
|
|
FontSize="12" Opacity="0.65" TextWrapping="Wrap"/>
|
|
</StackPanel>
|
|
<ScrollViewer Grid.Row="6">
|
|
<ItemsControl ItemsSource="{Binding LocalOnlyRows}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:LocalOnlyHomeworkRow">
|
|
<Grid ColumnDefinitions="80,1.3*,1.2*,0.7*,1.6*,1.6*,Auto" ColumnSpacing="8" Margin="0,3">
|
|
<TextBlock Grid.Column="0" Text="{Binding DateLabel}" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding StudentName}" TextWrapping="Wrap" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="2" Text="{Binding GroupName}" TextWrapping="Wrap" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="3" Text="{Binding SubjectName}" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="4" Text="{Binding StatusLabel}" TextWrapping="Wrap" VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="5" Text="{Binding Warning}" TextWrapping="Wrap" Foreground="DarkOrange" VerticalAlignment="Center"/>
|
|
<Button Grid.Column="6" Content="In Zwischenablage" Click="OnCopyToClipboardClick"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
<Button Grid.Row="7" Content="Schließen" Click="OnClose" HorizontalAlignment="Right"/>
|
|
</Grid>
|
|
</Window>
|