CI / build-and-test (push) Canceled after 0s
Dashboard warnings (attendance, homework, lateness) get a "Details" flyout with key figures, a list of dates and the compact month calendar from the class teacher overview, now extracted as a shared control. The calendar now aligns days under their weekday (Mo-So header, blank leading cells). Creating Vorgänge and documentation is supported by quick blocks with the current figures, dated standard phrases (e.g. "Klassenleitung informiert") and documentation templates (status snapshot, conversation, informing the class/subject teachers, parent call, parent letter). The class teacher Vorgänge tab uses WebUntis figures (absences across all subjects, class register) for the same blocks and templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
3.3 KiB
XML
68 lines
3.3 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:LehrerApp.Desktop.Views.Shared"
|
|
x:Class="LehrerApp.Desktop.Views.Shared.CompactMonthCalendar"
|
|
x:Name="Root">
|
|
|
|
<!-- Verdichtete Monatsansicht: exakt eine Zelle je Kalendertag, nach Wochentag ausgerichtet
|
|
(Leerzellen vor dem 1., siehe CompactMonthCalendar.BuildCells). Ohne Ereignis bleibt nur die
|
|
Tageszahl sichtbar; bei Auffälligkeiten ersetzt das stärkste Statuskürzel die Zahl. Alle
|
|
Details bleiben per Tooltip erhalten. Aus ClassTeacherOverviewView herausgelöst, damit das
|
|
Detail-Popup der Dashboard-Warnungen dasselbe Widget wiederverwendet. -->
|
|
<UserControl.Styles>
|
|
<Style Selector="Border.compactDay">
|
|
<Setter Property="Width" Value="28"/>
|
|
<Setter Property="Height" Value="28"/>
|
|
<Setter Property="CornerRadius" Value="6"/>
|
|
<Setter Property="Background" Value="{DynamicResource AppChipBackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource AppCardBorderBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Margin" Value="2"/>
|
|
</Style>
|
|
<Style Selector="Border.compactDay.today">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource AppAccentTextBrush}"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
</Style>
|
|
</UserControl.Styles>
|
|
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<ItemsControl ItemsSource="{x:Static local:CompactMonthCalendar.WeekdayHeaders}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate><UniformGrid Columns="7"/></ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" FontSize="9" FontWeight="Bold" Opacity="0.5"
|
|
Width="32" TextAlignment="Center"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<ItemsControl ItemsSource="{Binding #Root.Cells}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate><UniformGrid Columns="7"/></ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="local:CompactMonthCell">
|
|
<Panel Width="32" Height="32">
|
|
<Border Classes="compactDay" Classes.today="{Binding Day.IsToday, FallbackValue=False}"
|
|
IsVisible="{Binding IsDay}" ToolTip.Tip="{Binding Day.Tooltip}">
|
|
<Grid>
|
|
<TextBlock Text="{Binding Day.DayNumber}" FontSize="11" Opacity="0.7"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
IsVisible="{Binding !Day.HasSignal, FallbackValue=False}"/>
|
|
<Border Background="{Binding Day.SignalColorHex}" CornerRadius="5"
|
|
IsVisible="{Binding Day.HasSignal, FallbackValue=False}">
|
|
<TextBlock Text="{Binding Day.SignalCode}" Foreground="White" FontSize="11"
|
|
FontWeight="Bold" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Panel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</UserControl>
|