CI / build-and-test (push) Canceled after 0s
Neue Menü-Kategorie "Formulare" in der Menüleiste: "Elternbrief erzeugen..." öffnet jetzt einen Schüler-Picker statt nur aus der Schülerdetailansicht erreichbar zu sein, "Arbeitsblatt personalisieren..." ist aktiv, sobald eine einzelne Lerngruppe geöffnet ist, und erzeugt aus einer in TemplateDesigner gebauten .lavorlage-Vorlage ein PDF je aktivem Gruppenmitglied - über eine von den Elternbrief-Vorlagen getrennte WorksheetTemplateStore-Bibliothek. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
63 lines
3.2 KiB
XML
63 lines
3.2 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.PersonalizeWorksheetDialog"
|
|
x:DataType="vm:PersonalizeWorksheetDialogViewModel"
|
|
Title="Arbeitsblatt personalisieren"
|
|
Width="460" Height="620"
|
|
CanResize="False" WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid RowDefinitions="Auto,Auto,*,Auto,Auto" Margin="24">
|
|
|
|
<StackPanel Grid.Row="0" Spacing="4" Margin="0,0,0,14">
|
|
<TextBlock Text="Arbeitsblatt personalisieren" Classes="dialogtitle"/>
|
|
<TextBlock Text="{Binding GroupName}" FontSize="12" Opacity="0.65"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="1" Spacing="10" Margin="0,0,0,14">
|
|
<TextBlock Text="Vorlage" FontSize="12" FontWeight="SemiBold" Opacity="0.7"/>
|
|
<ComboBox ItemsSource="{Binding Templates}" SelectedItem="{Binding SelectedTemplate}"
|
|
HorizontalAlignment="Stretch" DisplayMemberBinding="{Binding Name}"/>
|
|
<TextBlock Text="Noch keine Arbeitsblatt-Vorlage importiert — in den Einstellungen unter „Briefvorlagen“ eine .lavorlage-Datei aus dem Vorlagen-Designer hinzufügen."
|
|
Classes="emptyhint" TextWrapping="Wrap"
|
|
IsVisible="{Binding HasNoTemplates}"/>
|
|
</StackPanel>
|
|
|
|
<ScrollViewer Grid.Row="2">
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Text="Für diese Schüler erzeugen" FontSize="12" FontWeight="SemiBold" Opacity="0.7" Margin="0,0,0,4"/>
|
|
<ItemsControl ItemsSource="{Binding Students}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:WorksheetStudentChoice">
|
|
<CheckBox Content="{Binding FullName}" IsChecked="{Binding IsIncluded}" Margin="0,3"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<ItemsControl ItemsSource="{Binding Results}" Margin="0,10,0,0" IsVisible="{Binding HasResults}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:WorksheetGenerationResult">
|
|
<Grid ColumnDefinitions="20,*" Margin="0,2">
|
|
<TextBlock Grid.Column="0" Text="{Binding Icon}" Foreground="{Binding Color}"/>
|
|
<TextBlock Grid.Column="1" FontSize="12">
|
|
<Run Text="{Binding StudentName}"/><Run Text=" "/><Run Text="{Binding ErrorMessage}" Foreground="#D97706"/>
|
|
</TextBlock>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<TextBlock Grid.Row="3" Text="{Binding StatusMessage}" FontSize="12" Margin="0,10,0,0" TextWrapping="Wrap"
|
|
IsVisible="{Binding StatusMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
|
|
<Grid Grid.Row="4" ColumnDefinitions="*,8,*" Margin="0,16,0,0">
|
|
<Button Grid.Column="0" Content="Schließen" HorizontalAlignment="Stretch" Click="OnClose"/>
|
|
<Button Grid.Column="2" Content="Erzeugen…" HorizontalAlignment="Stretch" Click="OnGenerate"
|
|
IsEnabled="{Binding !HasNoTemplates}"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Window>
|