79 lines
4.7 KiB
XML
79 lines
4.7 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.ExamCoverSheetDialog"
|
|
x:DataType="vm:ExamCoverSheetDialogViewModel"
|
|
Title="Deckblätter drucken"
|
|
Width="460" Height="740" MinWidth="440" MinHeight="500"
|
|
CanResize="True" WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid RowDefinitions="Auto,Auto,*,Auto,Auto" Margin="24">
|
|
|
|
<StackPanel Grid.Row="0" Spacing="4" Margin="0,0,0,14">
|
|
<TextBlock Text="Deckblätter drucken" Classes="dialogtitle"/>
|
|
<TextBlock Text="{Binding ExamLabel}" FontSize="12" Opacity="0.65" TextWrapping="Wrap"/>
|
|
</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 Deckblatt-Vorlage importiert — in den Einstellungen unter „Briefvorlagen“ eine .lavorlage-Datei mit dem Metadatum report-type=exam-cover hinzufügen."
|
|
Classes="emptyhint" TextWrapping="Wrap"
|
|
IsVisible="{Binding HasNoTemplates}"/>
|
|
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto" ColumnSpacing="12" RowSpacing="10">
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Titel" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding CoverTitle}" PlaceholderText="{Binding ExamTitle}"
|
|
ToolTip.Tip="Vorbelegt mit dem Titel der Klausur. Änderungen gelten nur für diesen Druck; leer gelassen steht der Klausurtitel auf dem Deckblatt."/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="Kürzel" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding TeacherAbbreviation}" PlaceholderText="z. B. MON HED"
|
|
ToolTip.Tip="Vorbelegt mit dem eigenen Kürzel aus den Einstellungen. Änderungen gelten nur für diesen Druck."/>
|
|
</Grid>
|
|
<StackPanel Spacing="4" IsVisible="{Binding UsesInterimGrades}">
|
|
<TextBlock Text="Gespeicherter Notenzwischenstand" FontWeight="SemiBold"/>
|
|
<ComboBox ItemsSource="{Binding InterimRuns}" SelectedItem="{Binding SelectedInterimRun}"
|
|
DisplayMemberBinding="{Binding Label}" HorizontalAlignment="Stretch"
|
|
PlaceholderText="Datum und Anlass auswählen"/>
|
|
<TextBlock Text="Für alle ausgewählten Schüler muss in diesem Durchgang ein Zwischenstand vorliegen."
|
|
TextWrapping="Wrap" FontSize="12" Opacity="0.65"/>
|
|
</StackPanel>
|
|
<CheckBox Content="Punkte und Note eintragen" IsChecked="{Binding FillResults}"
|
|
ToolTip.Tip="Aus: Blanko-Deckblatt mit Namen und leerer Punktetabelle zum Ausfüllen von Hand."/>
|
|
</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:ExamCoverStudentChoice">
|
|
<Grid ColumnDefinitions="*,Auto" Margin="0,3">
|
|
<CheckBox Grid.Column="0" Content="{Binding FullName}" IsChecked="{Binding IsIncluded}"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding Hint}" FontSize="11" Opacity="0.6" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<StackPanel Grid.Row="3">
|
|
<StackPanel Spacing="6" Margin="0,10,0,0" IsVisible="{Binding IsGenerating}">
|
|
<ProgressBar Minimum="0" Maximum="{Binding ProgressMaximum}" Value="{Binding ProgressValue}"
|
|
IsIndeterminate="{Binding IsMerging}" Height="6"/>
|
|
<TextBlock Text="{Binding ProgressText}" FontSize="12" Opacity="0.65"/>
|
|
</StackPanel>
|
|
<TextBlock Text="{Binding StatusMessage}" FontSize="12" Margin="0,10,0,0" TextWrapping="Wrap"
|
|
IsVisible="{Binding StatusMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="4" ColumnDefinitions="*,8,*" Margin="0,16,0,0">
|
|
<Button Grid.Column="0" Content="Schließen" HorizontalAlignment="Stretch" Click="OnClose"
|
|
IsEnabled="{Binding !IsGenerating}"/>
|
|
<Button Grid.Column="2" Content="PDF erzeugen…" HorizontalAlignment="Stretch" Click="OnGenerate"
|
|
IsEnabled="{Binding CanGenerate}"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Window>
|