Kapitel 7 abgeschlossen.
This commit is contained in:
@@ -17,9 +17,10 @@
|
||||
<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}}"/>
|
||||
<Button Content="+ Sammelnote" Command="{Binding CollectiveGradeCommand}"/>
|
||||
<Button Content="Zeugnisnoten" Command="{Binding ReportGradesCommand}"/>
|
||||
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"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
x:Class="LehrerApp.Desktop.Views.Groups.GroupDetailView"
|
||||
x:DataType="vm:GroupDetailViewModel">
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Grid RowDefinitions="Auto,Auto,*">
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Padding="20,16"
|
||||
@@ -22,18 +22,32 @@
|
||||
</TextBlock>
|
||||
<CheckBox Content="Ausgetretene anzeigen" IsChecked="{Binding ShowFormerStudents}"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Content="+ Schüler" Command="{Binding AddStudentCommand}"/>
|
||||
<Button Content="+ Schüler" Command="{Binding AddStudentCommand}" IsEnabled="{Binding IsEditable}"/>
|
||||
<Button Content="{Binding SelectedStudent.WithdrawActionLabel}"
|
||||
Command="{Binding WithdrawStudentCommand}"
|
||||
IsVisible="{Binding SelectedStudent, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
<Button Content="Austragung zurücknehmen" Command="{Binding ReinstateStudentCommand}"
|
||||
IsVisible="{Binding SelectedStudent.HasExitDate}"/>
|
||||
<Button Content="+ Klausur" Command="{Binding AddExamCommand}"/>
|
||||
<Button Content="+ Klausur" Command="{Binding AddExamCommand}" IsEnabled="{Binding IsEditable}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<TabbedPage Grid.Row="1" TabPlacement="Top" SelectedIndex="{Binding ActiveTabIndex}">
|
||||
<Border Grid.Row="1" Background="#FFF3CD" BorderBrush="#D97706" BorderThickness="0,0,0,1"
|
||||
Padding="20,10" IsVisible="{Binding IsReadOnly}">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" Spacing="2">
|
||||
<TextBlock Text="Archivierte Lerngruppe · schreibgeschützt" FontWeight="SemiBold"
|
||||
Foreground="#92400E"/>
|
||||
<TextBlock Text="Alle historischen Daten bleiben sichtbar. Für Korrekturen muss die Gruppe ausdrücklich wieder aktiviert werden."
|
||||
FontSize="12" Foreground="#92400E" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="1" Content="Gruppe wieder aktivieren"
|
||||
Command="{Binding ReactivateGroupCommand}" Margin="16,0,0,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<TabbedPage Grid.Row="2" TabPlacement="Top" SelectedIndex="{Binding ActiveTabIndex}">
|
||||
|
||||
<!-- Tab: Übersicht -->
|
||||
<ContentPage Header="Übersicht">
|
||||
@@ -57,6 +71,18 @@
|
||||
CanUserResizeColumns="True"
|
||||
Margin="0">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Header="" Width="48">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="vm:StudentSummary">
|
||||
<Border Width="30" Height="30" CornerRadius="15" Background="{Binding AvatarColor}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
ToolTip.Tip="{Binding AvatarTooltip}">
|
||||
<TextBlock Text="{Binding AvatarLabel}" Foreground="White" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="Name" Binding="{Binding FullName}" Width="*"/>
|
||||
<DataGridTextColumn Header="Zeitraum" Binding="{Binding PeriodLabel}" Width="190"/>
|
||||
<DataGridTextColumn Header="Status" Binding="{Binding MembershipStatus}" Width="170"/>
|
||||
@@ -66,6 +92,7 @@
|
||||
<DataTemplate x:DataType="vm:StudentSummary">
|
||||
<ComboBox ItemsSource="{x:Static vm:StudentSummary.NiveauOptions}"
|
||||
SelectedItem="{Binding NiveauName}"
|
||||
IsEnabled="{Binding CanEdit}"
|
||||
HorizontalAlignment="Stretch" Margin="2"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
@@ -83,7 +110,8 @@
|
||||
<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}}">
|
||||
IsVisible="{Binding SelectedExam, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
IsEnabled="{Binding IsEditable}">
|
||||
<Button Content="Punkte eingeben" Command="{Binding GradeExamCommand}"/>
|
||||
<Button Content="Auswertung" Command="{Binding EvaluateExamCommand}"/>
|
||||
<Button Content="Bearbeiten" Command="{Binding EditExamCommand}"/>
|
||||
|
||||
@@ -3,6 +3,7 @@ using LehrerApp.Core.Interfaces;
|
||||
using LehrerApp.Core.Models;
|
||||
using LehrerApp.Core.Services;
|
||||
using LehrerApp.Desktop.ViewModels.Groups;
|
||||
using LehrerApp.Desktop.Views.Shared;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace LehrerApp.Desktop.Views.Groups;
|
||||
@@ -24,9 +25,25 @@ public partial class GroupDetailView : UserControl
|
||||
vm.OnConfirmDeleteExam = ShowDeleteExamDialog;
|
||||
vm.OnGradeExam = ShowGradeExamDialog;
|
||||
vm.OnEvaluateExam = ShowEvaluateExamDialog;
|
||||
vm.OnConfirmReactivate = ShowReactivateConfirmDialog;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<bool> ShowReactivateConfirmDialog()
|
||||
{
|
||||
var dialog = new ConfirmDialog
|
||||
{
|
||||
DataContext = new ConfirmDialogInfo
|
||||
{
|
||||
Title = "Archivierte Gruppe wieder aktivieren?",
|
||||
Message = "Nach der Wiederaktivierung können historische Daten dieser Gruppe wieder verändert werden.",
|
||||
ConfirmText = "Wieder aktivieren",
|
||||
},
|
||||
};
|
||||
var owner = TopLevel.GetTopLevel(this) as Window;
|
||||
return owner is not null && await dialog.ShowDialog<bool>(owner);
|
||||
}
|
||||
|
||||
private async Task<bool> ShowAddStudentDialog()
|
||||
{
|
||||
if (DataContext is not GroupDetailViewModel vm || vm.Group is null) return false;
|
||||
|
||||
@@ -91,6 +91,8 @@
|
||||
<MenuFlyout>
|
||||
<MenuItem Header="Details bearbeiten"
|
||||
Command="{Binding EditGroupCommand}"/>
|
||||
<MenuItem Header="Ins nächste Schuljahr übernehmen …"
|
||||
Command="{Binding RollOverGroupCommand}"/>
|
||||
<MenuItem Header="{Binding SelectedGroup.ArchiveActionLabel}"
|
||||
Command="{Binding ToggleArchiveCommand}"/>
|
||||
<Separator/>
|
||||
|
||||
@@ -15,6 +15,7 @@ public partial class GroupListView : UserControl
|
||||
{
|
||||
vm.OnAddGroup = ShowAddGroupDialog;
|
||||
vm.OnEditGroup = ShowEditGroupDialog;
|
||||
vm.OnRollOverGroup = ShowGroupRolloverDialog;
|
||||
vm.OnConfirmDelete = ShowDeleteGroupDialog;
|
||||
}
|
||||
}
|
||||
@@ -42,6 +43,23 @@ public partial class GroupListView : UserControl
|
||||
await dialog.ShowDialog<bool>(owner);
|
||||
}
|
||||
|
||||
private async Task<Guid?> ShowGroupRolloverDialog(Guid groupId)
|
||||
{
|
||||
var group = App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IGroupRepository>()
|
||||
.GetById(groupId);
|
||||
var owner = TopLevel.GetTopLevel(this) as Window;
|
||||
if (group is null || owner is null) return null;
|
||||
|
||||
var dialogVm = new GroupRolloverDialogViewModel(group,
|
||||
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IStudentRepository>(),
|
||||
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IGroupMembershipRepository>(),
|
||||
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IGradingSchemeRepository>(),
|
||||
App.Services.GetRequiredService<LehrerApp.Core.Services.SchoolYearService>(),
|
||||
App.Services.GetRequiredService<LehrerApp.Core.Services.GroupRolloverService>());
|
||||
var dialog = new GroupRolloverDialog { DataContext = dialogVm };
|
||||
return await dialog.ShowDialog<Guid?>(owner);
|
||||
}
|
||||
|
||||
private async Task<bool> ShowDeleteGroupDialog(GroupListItem group)
|
||||
{
|
||||
var dialog = new DeleteGroupDialog { DataContext = group.DisplayName };
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<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.GroupRolloverDialog"
|
||||
x:DataType="vm:GroupRolloverDialogViewModel"
|
||||
Title="Ins nächste Schuljahr übernehmen"
|
||||
Width="650" Height="720" MinWidth="560" MinHeight="600"
|
||||
CanResize="True" WindowStartupLocation="CenterOwner">
|
||||
<Grid RowDefinitions="Auto,*,Auto" Margin="24,20">
|
||||
<StackPanel Grid.Row="0" Spacing="12">
|
||||
<TextBlock Text="Ins nächste Schuljahr übernehmen" Classes="dialogtitle"/>
|
||||
<TextBlock Text="{Binding SourceSummary}" FontSize="12" Opacity="0.65"/>
|
||||
<TextBlock Text="Es werden nur Gruppeneinstellungen und ausgewählte Mitgliedschaften kopiert. Noten, Klausuren, Mitarbeit, Planung und Stundenplan bleiben im alten Schuljahr."
|
||||
FontSize="12" Opacity="0.65" TextWrapping="Wrap"/>
|
||||
|
||||
<Grid ColumnDefinitions="*,12,130,12,100">
|
||||
<StackPanel Grid.Column="0" Spacing="4">
|
||||
<TextBlock Text="Neuer Gruppenname *" FontSize="12" Opacity="0.7"/>
|
||||
<TextBox Text="{Binding Name}"/>
|
||||
<TextBlock Text="{Binding NameError}" Foreground="Red" FontSize="11"
|
||||
IsVisible="{Binding NameError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Spacing="4">
|
||||
<TextBlock Text="Zielschuljahr *" FontSize="12" Opacity="0.7"/>
|
||||
<TextBox Text="{Binding TargetSchoolYear}" PlaceholderText="2027/28"/>
|
||||
<TextBlock Text="{Binding SchoolYearError}" Foreground="Red" FontSize="11"
|
||||
IsVisible="{Binding SchoolYearError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="4" Spacing="4">
|
||||
<TextBlock Text="Klassenstufe" FontSize="12" Opacity="0.7"/>
|
||||
<NumericUpDown Value="{Binding GradeLevel}" Minimum="1" Maximum="13" FormatString="0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="Schülerauswahl" FontSize="14" FontWeight="SemiBold"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding SelectedCountText}" FontSize="12" Opacity="0.6"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" RowDefinitions="*,Auto" Margin="0,10,0,0">
|
||||
<ListBox Grid.Row="0" ItemsSource="{Binding Students}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:GroupRolloverStudentItem">
|
||||
<Grid ColumnDefinitions="Auto,*,70" Margin="4,5">
|
||||
<CheckBox Grid.Column="0" IsChecked="{Binding IsSelected}" IsEnabled="{Binding CanSelect}"
|
||||
VerticalAlignment="Center" Margin="0,0,10,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{Binding FullName}" FontSize="13" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding MembershipStatus}" FontSize="11" Opacity="0.55"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="2" Text="{Binding NiveauText}" FontSize="12" Opacity="0.65"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<TextBlock Grid.Row="1" Text="{Binding SelectionError}" Foreground="Red" FontSize="11" Margin="0,5,0,0"
|
||||
IsVisible="{Binding SelectionError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Row="2" Spacing="10" Margin="0,14,0,0">
|
||||
<CheckBox Content="Gruppenspezifisches Notenschema übernehmen"
|
||||
IsChecked="{Binding CopyGradingScheme}" IsVisible="{Binding HasGradingScheme}"/>
|
||||
<CheckBox Content="Alte Gruppe nach erfolgreicher Übernahme archivieren"
|
||||
IsChecked="{Binding ArchiveSource}"/>
|
||||
<TextBlock Text="{Binding GeneralError}" Foreground="Red" FontSize="12" TextWrapping="Wrap"
|
||||
IsVisible="{Binding GeneralError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<Grid ColumnDefinitions="*,10,*">
|
||||
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
||||
<Button Grid.Column="2" Content="Gruppe übernehmen" HorizontalAlignment="Stretch" Click="OnSave"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,19 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using LehrerApp.Desktop.ViewModels.Groups;
|
||||
|
||||
namespace LehrerApp.Desktop.Views.Groups;
|
||||
|
||||
public partial class GroupRolloverDialog : Window
|
||||
{
|
||||
public GroupRolloverDialog() => InitializeComponent();
|
||||
|
||||
private void OnSave(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is not GroupRolloverDialogViewModel vm) return;
|
||||
vm.SaveCommand.Execute(null);
|
||||
if (vm.Result is not null) Close(vm.Result.Id);
|
||||
}
|
||||
|
||||
private void OnCancel(object? sender, RoutedEventArgs e) => Close(null);
|
||||
}
|
||||
@@ -13,19 +13,19 @@
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*">
|
||||
|
||||
<Button Grid.Row="0" Content="+ Sitzung" Command="{Binding AddSessionCommand}"
|
||||
HorizontalAlignment="Stretch" Margin="10,10,10,6"/>
|
||||
HorizontalAlignment="Stretch" Margin="10,10,10,6" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Spacing="6" Margin="10,0,10,6">
|
||||
<Button Content="Schnell Mitarbeit" Command="{Binding QuickInputCommand}"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
<Button Content="Anw./HA" Command="{Binding StatusQuickInputCommand}"/>
|
||||
HorizontalAlignment="Stretch" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Anw./HA" Command="{Binding StatusQuickInputCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Row="2" Content="Ø Mitarbeitsnote" Command="{Binding ComputeGradeCommand}"
|
||||
HorizontalAlignment="Stretch" Margin="10,0,10,6"/>
|
||||
HorizontalAlignment="Stretch" Margin="10,0,10,6" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
|
||||
<Button Grid.Row="3" Content="Mitarbeits-Assistent" Command="{Binding OpenWizardCommand}"
|
||||
HorizontalAlignment="Stretch" Margin="10,0,10,6"/>
|
||||
HorizontalAlignment="Stretch" Margin="10,0,10,6" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
|
||||
<ListBox Grid.Row="4"
|
||||
ItemsSource="{Binding Sessions}"
|
||||
@@ -68,7 +68,7 @@
|
||||
BorderThickness="0,0,0,1"
|
||||
Padding="12,8">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" MaxHeight="200">
|
||||
<ItemsControl ItemsSource="{Binding CompetencyTagGroups}">
|
||||
<ItemsControl ItemsSource="{Binding CompetencyTagGroups}" IsEnabled="{Binding !IsReadOnly}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:CompetencyTagGroup">
|
||||
<StackPanel Spacing="4" Margin="0,0,0,10">
|
||||
|
||||
@@ -58,7 +58,7 @@ public partial class ParticipationTabView : UserControl
|
||||
{
|
||||
Header = $"{aspect.Label} [{AspectShortcut(i)}]",
|
||||
Width = new DataGridLength(1, DataGridLengthUnitType.Star),
|
||||
CellTemplate = BuildCellTemplate(idx, forCompetency: false),
|
||||
CellTemplate = BuildCellTemplate(idx, forCompetency: false, _vm.IsReadOnly),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,13 +66,13 @@ public partial class ParticipationTabView : UserControl
|
||||
{
|
||||
Header = "HA",
|
||||
Width = new DataGridLength(50, DataGridLengthUnitType.Pixel),
|
||||
CellTemplate = BuildHomeworkCellTemplate(),
|
||||
CellTemplate = BuildHomeworkCellTemplate(_vm.IsReadOnly),
|
||||
});
|
||||
grid.Columns.Add(new DataGridTemplateColumn
|
||||
{
|
||||
Header = "Anwesenheit",
|
||||
Width = new DataGridLength(80, DataGridLengthUnitType.Pixel),
|
||||
CellTemplate = BuildAttendanceCellTemplate(),
|
||||
CellTemplate = BuildAttendanceCellTemplate(_vm.IsReadOnly),
|
||||
});
|
||||
|
||||
// Kompetenz-Spalten (opt-in)
|
||||
@@ -85,13 +85,13 @@ public partial class ParticipationTabView : UserControl
|
||||
{
|
||||
Header = code,
|
||||
Width = new DataGridLength(80, DataGridLengthUnitType.Pixel),
|
||||
CellTemplate = BuildCellTemplate(idx, forCompetency: true),
|
||||
CellTemplate = BuildCellTemplate(idx, forCompetency: true, _vm.IsReadOnly),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static IDataTemplate BuildCellTemplate(int cellIndex, bool forCompetency)
|
||||
private static IDataTemplate BuildCellTemplate(int cellIndex, bool forCompetency, bool isReadOnly)
|
||||
{
|
||||
return new FuncDataTemplate<ParticipationStudentRow>((row, _) =>
|
||||
{
|
||||
@@ -119,6 +119,7 @@ public partial class ParticipationTabView : UserControl
|
||||
Padding = new Avalonia.Thickness(5, 1),
|
||||
FontSize = 11,
|
||||
Opacity = cell.Value == val ? 1.0 : 0.3,
|
||||
IsEnabled = !isReadOnly,
|
||||
};
|
||||
var capturedVal = val;
|
||||
btn.Click += (_, _) => cell.SetValue(capturedVal);
|
||||
@@ -134,7 +135,7 @@ public partial class ParticipationTabView : UserControl
|
||||
});
|
||||
}
|
||||
|
||||
private static IDataTemplate BuildHomeworkCellTemplate()
|
||||
private static IDataTemplate BuildHomeworkCellTemplate(bool isReadOnly)
|
||||
{
|
||||
return new FuncDataTemplate<ParticipationStudentRow>((row, _) =>
|
||||
{
|
||||
@@ -147,6 +148,7 @@ public partial class ParticipationTabView : UserControl
|
||||
Height = 26,
|
||||
Padding = new Avalonia.Thickness(3, 1),
|
||||
Command = row.ToggleHomeworkCommand,
|
||||
IsEnabled = !isReadOnly,
|
||||
};
|
||||
void RefreshHomework()
|
||||
{
|
||||
@@ -180,7 +182,7 @@ public partial class ParticipationTabView : UserControl
|
||||
});
|
||||
}
|
||||
|
||||
private static IDataTemplate BuildAttendanceCellTemplate()
|
||||
private static IDataTemplate BuildAttendanceCellTemplate(bool isReadOnly)
|
||||
{
|
||||
return new FuncDataTemplate<ParticipationStudentRow>((row, _) =>
|
||||
{
|
||||
@@ -193,6 +195,7 @@ public partial class ParticipationTabView : UserControl
|
||||
Height = 26,
|
||||
Padding = new Avalonia.Thickness(3, 1),
|
||||
Command = row.CycleAttendanceCommand,
|
||||
IsEnabled = !isReadOnly,
|
||||
};
|
||||
void RefreshAttendance()
|
||||
{
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<TextBlock Grid.Column="0" Text="Unterrichtseinheiten" FontSize="14" FontWeight="SemiBold"
|
||||
VerticalAlignment="Center"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8">
|
||||
<Button Content="+ Einheit" Command="{Binding AddUnitCommand}"/>
|
||||
<Button Content="Bearbeiten" Command="{Binding EditUnitCommand}"/>
|
||||
<Button Content="+ Einheit" Command="{Binding AddUnitCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Bearbeiten" Command="{Binding EditUnitCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Als Vorlage kopieren" Command="{Binding CopyUnitCommand}"/>
|
||||
<Button Content="Löschen" Command="{Binding DeleteUnitCommand}"/>
|
||||
<Button Content="Löschen" Command="{Binding DeleteUnitCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -62,15 +62,16 @@
|
||||
<TextBlock Text="{Binding SelectedUnitTitleSuffix}" FontSize="14" FontWeight="SemiBold"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8">
|
||||
<Button Content="+ Stunde" Command="{Binding AddLessonCommand}"/>
|
||||
<Button Content="+ Stunde" Command="{Binding AddLessonCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Serie erzeugen" Command="{Binding GenerateLessonSeriesCommand}"
|
||||
IsEnabled="{Binding !IsReadOnly}"
|
||||
ToolTip.Tip="Stunden für alle Termine aus dem Stundenplan im gewählten Zeitraum anlegen."/>
|
||||
<Button Content="Anzeigen" Command="{Binding ShowLessonCommand}"
|
||||
ToolTip.Tip="Verlaufsplan schreibgeschützt und größer anzeigen — zum Mitnehmen in den Unterricht."/>
|
||||
<Button Content="Bearbeiten" Command="{Binding EditLessonCommand}"/>
|
||||
<Button Content="Verschieben" Command="{Binding MoveLessonCommand}"/>
|
||||
<Button Content="Status → Durchgeführt" Command="{Binding AdvanceLessonStatusCommand}"/>
|
||||
<Button Content="Löschen" Command="{Binding DeleteLessonCommand}"/>
|
||||
<Button Content="Bearbeiten" Command="{Binding EditLessonCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Verschieben" Command="{Binding MoveLessonCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Status → Durchgeführt" Command="{Binding AdvanceLessonStatusCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
<Button Content="Löschen" Command="{Binding DeleteLessonCommand}" IsEnabled="{Binding !IsReadOnly}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user