7b824b6f0c
- Layout und Kalender angepasst - Push status meldung angepasst für Android
140 lines
8.3 KiB
XML
140 lines
8.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage x:Class="cfs_tracker.Views.YearPage"
|
|
x:Name="RootPage"
|
|
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:viewModels="clr-namespace:cfs_tracker.ViewModels"
|
|
x:DataType="viewModels:YearViewModel"
|
|
Title="Jahr"
|
|
BackgroundColor="{DynamicResource AppBackground}">
|
|
|
|
<Grid Padding="16"
|
|
RowSpacing="16"
|
|
RowDefinitions="Auto,Auto,*">
|
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto"
|
|
VerticalOptions="Center">
|
|
<Button Text="←"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding PreviousYearCommand}" />
|
|
<Label Grid.Column="1"
|
|
Text="{Binding HeaderText}"
|
|
HorizontalTextAlignment="Center"
|
|
VerticalTextAlignment="Center"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<Button Grid.Column="2"
|
|
Text="→"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding NextYearCommand}" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1"
|
|
ColumnDefinitions="*,*"
|
|
ColumnSpacing="12">
|
|
<Button Text="Heute"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding TodayCommand}" />
|
|
<Button Grid.Column="1"
|
|
Text="Export"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding ExportPdfCommand}" />
|
|
</Grid>
|
|
|
|
<CollectionView Grid.Row="2"
|
|
ItemsSource="{Binding Months}"
|
|
SelectionMode="None"
|
|
VerticalOptions="Fill"
|
|
HorizontalOptions="Fill"
|
|
ItemSizingStrategy="MeasureAllItems">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate x:DataType="viewModels:MonthSectionViewModel">
|
|
<Border Padding="12"
|
|
Margin="0,0,0,12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}"
|
|
StrokeShape="RoundRectangle 14">
|
|
<VerticalStackLayout Spacing="10">
|
|
<Label Text="{Binding Title}"
|
|
FontSize="18"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
|
|
ColumnSpacing="4">
|
|
<Label Text="Mo" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
|
</Grid>
|
|
|
|
<CollectionView ItemsSource="{Binding Cells}"
|
|
SelectionMode="None"
|
|
ItemSizingStrategy="MeasureFirstItem">
|
|
<CollectionView.ItemsLayout>
|
|
<GridItemsLayout Orientation="Vertical"
|
|
Span="7" />
|
|
</CollectionView.ItemsLayout>
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
|
|
<Border Margin="2"
|
|
Padding="4"
|
|
WidthRequest="46"
|
|
HeightRequest="46"
|
|
Stroke="{Binding BorderColor}"
|
|
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}"
|
|
StrokeShape="RoundRectangle 8">
|
|
<Border.Triggers>
|
|
<DataTrigger TargetType="Border"
|
|
Binding="{Binding IsPlaceholder}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
<Setter Property="StrokeThickness" Value="0" />
|
|
</DataTrigger>
|
|
</Border.Triggers>
|
|
|
|
<Border.GestureRecognizers>
|
|
<TapGestureRecognizer
|
|
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:YearViewModel}}, Path=OpenDayCommand, x:DataType='viewModels:YearViewModel'}"
|
|
CommandParameter="{Binding .}" />
|
|
</Border.GestureRecognizers>
|
|
|
|
<Grid RowDefinitions="Auto,*">
|
|
<Label Text="{Binding DayNumberText}"
|
|
IsVisible="{Binding ShowDayNumber}"
|
|
FontSize="11"
|
|
FontAttributes="Bold"
|
|
HorizontalTextAlignment="Center"
|
|
TextColor="{Binding TextColor}" />
|
|
|
|
<Border Grid.Row="1"
|
|
IsVisible="{Binding ShowAverage}"
|
|
Margin="0,4,0,0"
|
|
Padding="2"
|
|
StrokeThickness="0"
|
|
StrokeShape="RoundRectangle 5"
|
|
BackgroundColor="{Binding StateColor}">
|
|
<Label Text="{Binding AverageStateText}"
|
|
FontSize="9"
|
|
LineBreakMode="TailTruncation"
|
|
MaxLines="1"
|
|
HorizontalTextAlignment="Center"
|
|
TextColor="White" />
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
</Grid>
|
|
</ContentPage>
|