Files
LehrerApp/LehrerApp.Desktop/Views/Groups/GroupDetailView.axaml
T
adminandClaude Sonnet 5 629b8d1bf0 Codepflege: CLAUDE.md und UI-Konsolidierung (Kapitel 13.4)
CLAUDE.md mit Projektkonventionen für künftige Claude-Code-Sitzungen.
Wiederkehrende UI-Muster konsolidiert: neue PageHeader-Control für
Titel/Untertitel in den Listen- und Detailansichten, globale Styles für
Dialog-Titel und Leerlisten-Hinweise statt inline wiederholter Werte.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 16:14:40 +02:00

178 lines
9.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
xmlns:views="clr-namespace:LehrerApp.Desktop.Views.Groups"
xmlns:models="clr-namespace:LehrerApp.Core.Models;assembly=LehrerApp.Core"
xmlns:shared="clr-namespace:LehrerApp.Desktop.Views.Shared"
x:Class="LehrerApp.Desktop.Views.Groups.GroupDetailView"
x:DataType="vm:GroupDetailViewModel">
<Grid RowDefinitions="Auto,*">
<!-- Header -->
<Border Grid.Row="0" Padding="20,16"
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="0,0,0,1">
<Grid ColumnDefinitions="*,Auto">
<shared:PageHeader Grid.Column="0" Title="{Binding GroupTitle}" Subtitle="{Binding GroupSubtitle}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8">
<TextBlock VerticalAlignment="Center" Opacity="0.6" FontSize="13">
<Run Text="{Binding StudentCount}"/>
<Run Text=" Schüler"/>
</TextBlock>
<Button Content=" Schüler" Command="{Binding AddStudentCommand}"/>
<Button Content=" Austragen" Command="{Binding RemoveStudentCommand}"
IsVisible="{Binding SelectedStudent, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Button Content=" Klausur" Command="{Binding AddExamCommand}"/>
</StackPanel>
</Grid>
</Border>
<TabbedPage Grid.Row="1" TabPlacement="Top" SelectedIndex="{Binding ActiveTabIndex}">
<!-- Tab: Übersicht -->
<ContentPage Header="Übersicht">
<ScrollViewer Padding="20">
<StackPanel Spacing="12">
<TextBlock Text="{Binding GroupSubtitle}" Opacity="0.7" FontSize="14"/>
<TextBlock Text="Hier erscheint später eine Zusammenfassung der Lerngruppe."
Opacity="0.4"/>
</StackPanel>
</ScrollViewer>
</ContentPage>
<!-- Tab: Schüler -->
<ContentPage Header="Schüler">
<DataGrid ItemsSource="{Binding Students}"
SelectedItem="{Binding SelectedStudent}"
AutoGenerateColumns="False"
IsReadOnly="True"
GridLinesVisibility="Horizontal"
CanUserReorderColumns="False"
CanUserResizeColumns="True"
Margin="0">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding FullName}" Width="*"/>
<DataGridTextColumn Header="Zeitraum" Binding="{Binding PeriodLabel}" Width="90"/>
<DataGridTemplateColumn Header="Niveau" Width="130"
IsVisible="{Binding IsDifferentiated}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="vm:StudentSummary">
<ComboBox ItemsSource="{x:Static vm:StudentSummary.NiveauOptions}"
SelectedItem="{Binding NiveauName}"
HorizontalAlignment="Stretch" Margin="2"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</ContentPage>
<!-- Tab: Mitarbeit -->
<ContentPage Header="Mitarbeit">
<views:ParticipationTabView DataContext="{Binding ParticipationTab}"/>
</ContentPage>
<!-- Tab: Klausuren -->
<ContentPage Header="Klausuren">
<Grid RowDefinitions="Auto,*">
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,8"
IsVisible="{Binding SelectedExam, Converter={x:Static ObjectConverters.IsNotNull}}">
<Button Content="Punkte eingeben" Command="{Binding GradeExamCommand}"/>
<Button Content="Auswertung" Command="{Binding EvaluateExamCommand}"/>
<Button Content="Bearbeiten" Command="{Binding EditExamCommand}"/>
<Button Content="Duplizieren" Command="{Binding DuplicateExamCommand}"/>
<SplitButton Content="Status ▸" Command="{Binding AdvanceExamStatusCommand}">
<SplitButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedLeft">
<MenuItem Header="Geplant" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Planned}"/>
<MenuItem Header="Durchgeführt" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Conducted}"/>
<MenuItem Header="Korrigiert" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Graded}"/>
<MenuItem Header="Zurückgegeben" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Returned}"/>
</MenuFlyout>
</SplitButton.Flyout>
</SplitButton>
<Button Content="Löschen" Command="{Binding DeleteExamCommand}"/>
</StackPanel>
<DataGrid Grid.Row="1" ItemsSource="{Binding Exams}"
SelectedItem="{Binding SelectedExam}"
AutoGenerateColumns="False"
IsReadOnly="True"
GridLinesVisibility="Horizontal"
CanUserReorderColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Datum" Binding="{Binding Date}" Width="110"/>
<DataGridTextColumn Header="Titel" Binding="{Binding Title}" Width="*"/>
<DataGridTextColumn Header="Niveau" Binding="{Binding NiveauLabel}" Width="80"
IsVisible="{Binding IsDifferentiated}"/>
<DataGridTemplateColumn Header="Status" Width="150">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="vm:ExamSummary">
<Border Background="{Binding StatusColorHex}" CornerRadius="4"
Padding="8,2" HorizontalAlignment="Left">
<TextBlock Text="{Binding StatusLabel}" FontSize="12" Foreground="White"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Rückgabe" Binding="{Binding ReturnedAtDisplay}" Width="100"/>
</DataGrid.Columns>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Punkte eingeben" Command="{Binding GradeExamCommand}"/>
<MenuItem Header="Auswertung" Command="{Binding EvaluateExamCommand}"/>
<MenuItem Header="Bearbeiten" Command="{Binding EditExamCommand}"/>
<MenuItem Header="Duplizieren" Command="{Binding DuplicateExamCommand}"/>
<MenuItem Header="Status">
<MenuItem Header="Weiter" Command="{Binding AdvanceExamStatusCommand}"/>
<Separator/>
<MenuItem Header="Geplant" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Planned}"/>
<MenuItem Header="Durchgeführt" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Conducted}"/>
<MenuItem Header="Korrigiert" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Graded}"/>
<MenuItem Header="Zurückgegeben" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Returned}"/>
</MenuItem>
<Separator/>
<MenuItem Header="Löschen" Command="{Binding DeleteExamCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
</DataGrid>
</Grid>
</ContentPage>
<!-- Tab: Noten -->
<ContentPage Header="Noten">
<views:GradeOverviewTabView DataContext="{Binding GradeOverviewTab}"/>
</ContentPage>
<!-- Tab: Planung -->
<ContentPage Header="Planung">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Unterrichtseinheiten" FontSize="16" Opacity="0.4"
HorizontalAlignment="Center"/>
<TextBlock Text="Wird implementiert." FontSize="12" Opacity="0.3"
HorizontalAlignment="Center"/>
</StackPanel>
</ContentPage>
<!-- Tab: Dokumentation -->
<ContentPage Header="Dokumentation">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Schülerdokumentation" FontSize="16" Opacity="0.4"
HorizontalAlignment="Center"/>
<TextBlock Text="Wird implementiert." FontSize="12" Opacity="0.3"
HorizontalAlignment="Center"/>
</StackPanel>
</ContentPage>
</TabbedPage>
</Grid>
</UserControl>