42 lines
2.0 KiB
XML
42 lines
2.0 KiB
XML
<UserControl 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.GradeOverviewTabView"
|
||
x:DataType="vm:GradeOverviewTabViewModel">
|
||
|
||
<Grid RowDefinitions="Auto,*">
|
||
|
||
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,8">
|
||
<TextBlock Text="Zeitraum:" VerticalAlignment="Center"/>
|
||
<ComboBox ItemsSource="{Binding PeriodOptions}" SelectedItem="{Binding SelectedPeriod}" MinWidth="170"/>
|
||
|
||
<ToggleButton Content="Punkte anzeigen" IsChecked="{Binding ShowAsPoints}"
|
||
IsVisible="{Binding CanTogglePointsView}" Margin="12,0,0,0"/>
|
||
|
||
<Button Content="Sortierung: Name" Command="{Binding SortByNameCommand}" Margin="12,0,0,0"/>
|
||
<Button Content="Sortierung: Gesamt" Command="{Binding SortByTotalCommand}"/>
|
||
|
||
<Button Content="Noten verwalten" Command="{Binding ManageStudentGradesCommand}" Margin="12,0,0,0"
|
||
IsVisible="{Binding SelectedRow, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||
IsEnabled="{Binding !IsReadOnly}"/>
|
||
<Button Content="+ Sammelnote" Command="{Binding CollectiveGradeCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||
<Button Content="Zeugnisnoten" Command="{Binding ReportGradesCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||
</StackPanel>
|
||
|
||
<DataGrid Grid.Row="1"
|
||
x:Name="GradesGrid"
|
||
ItemsSource="{Binding Rows}"
|
||
SelectedItem="{Binding SelectedRow}"
|
||
AutoGenerateColumns="False"
|
||
IsReadOnly="True"
|
||
GridLinesVisibility="All"
|
||
CanUserReorderColumns="False"
|
||
CanUserResizeColumns="True"/>
|
||
|
||
<TextBlock Grid.Row="1" Text="Keine Schüler in dieser Gruppe."
|
||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||
Opacity="0.35" FontSize="14"
|
||
IsVisible="{Binding !Rows.Count}"/>
|
||
</Grid>
|
||
</UserControl>
|