Skip to content

Commit b92063c

Browse files
docs(Scheduler):revamp resource grouping header template docs (#2404)
* docs(Scheduler):revamp resource grouping header template docs * Update components/scheduler/templates/resource-grouping-header.md Co-authored-by: Nadezhda Tacheva <[email protected]> --------- Co-authored-by: Nadezhda Tacheva <[email protected]>
1 parent acaac10 commit b92063c

File tree

4 files changed

+30
-16
lines changed

4 files changed

+30
-16
lines changed

components/scheduler/templates/appointment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ You can also style the entire appointments by adding a class to their wrapping e
137137

138138
## See Also
139139

140-
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/appointment-templates)
140+
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/templates)
141141

components/scheduler/templates/dateheader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@ The `DateHeaderTemplate` can be defined for the [day and week Scheduler views]({
100100

101101
## See Also
102102

103-
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/dateheader-templates)
103+
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/templates)
104104

components/scheduler/templates/resource-grouping-header.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can use the `SchedulerResourceGroupHeaderTemplate` to customize the renderin
1515
The `SchedulerResourceGroupHeaderTemplate`:
1616
* Is invoked for each resource when the Scheduler is configured to have resources and grouping.
1717
* Applies in both horizontal and vertical grouping.
18-
* Can be defined at the root level of the Scheduler and individually for each [Scheduler views]({%slug scheduler-views-overview%}). When configured at the root, the template applies to all views. If a `SchedulerResourceGroupHeaderTemplate` is defined at the view level, it will override the root-level template for that specific view.
18+
* Can be defined individually for each [Scheduler view]({%slug scheduler-views-overview%}).
1919

2020
The `context` of the template is a `SchedulerResourceGroupHeaderTemplateContext` object that contains:
2121

@@ -32,14 +32,6 @@ The `context` of the template is a `SchedulerResourceGroupHeaderTemplateContext`
3232
@bind-Date="@StartDate"
3333
Height="600px"
3434
Width="900px">
35-
<SchedulerResourceGroupHeaderTemplate>
36-
Text: @context.Text
37-
<br />
38-
Value: @context.Value
39-
<br />
40-
Field: @context.Field
41-
<br />
42-
</SchedulerResourceGroupHeaderTemplate>
4335
<SchedulerViews>
4436
<SchedulerDayView StartTime="@DayStart">
4537
<SchedulerResourceGroupHeaderTemplate>
@@ -62,9 +54,23 @@ The `context` of the template is a `SchedulerResourceGroupHeaderTemplateContext`
6254
</p>
6355
</SchedulerResourceGroupHeaderTemplate>
6456
</SchedulerDayView>
65-
<SchedulerWeekView StartTime="@DayStart" />
66-
<SchedulerMultiDayView StartTime="@DayStart" />
67-
<SchedulerMonthView></SchedulerMonthView>
57+
<SchedulerWeekView StartTime="@DayStart">
58+
<SchedulerResourceGroupHeaderTemplate>
59+
<div>
60+
<span class="meeting-title">@context.Text</span>
61+
</div>
62+
</SchedulerResourceGroupHeaderTemplate>
63+
</SchedulerWeekView>
64+
<SchedulerMonthView>
65+
<SchedulerResourceGroupHeaderTemplate>
66+
Text: @context.Text
67+
<br />
68+
Value: @context.Value
69+
<br />
70+
Field: @context.Field
71+
<br />
72+
</SchedulerResourceGroupHeaderTemplate>
73+
</SchedulerMonthView>
6874
</SchedulerViews>
6975
<SchedulerResources>
7076
<SchedulerResource Field="@nameof(AppointmentModel.RoomId)" TextField="Name" ValueField="Id" Data="@Rooms"></SchedulerResource>
@@ -76,6 +82,14 @@ The `context` of the template is a `SchedulerResourceGroupHeaderTemplateContext`
7682
7783
<TelerikTooltip TargetSelector=".tooltip-target" />
7884
85+
<style>
86+
.meeting-title {
87+
text-transform: uppercase;
88+
font-style: italic;
89+
color: red;
90+
}
91+
</style>
92+
7993
@code {
8094
private List<string> GroupingResources = new List<string> { "RoomId" };
8195
private DateTime today { get; set; }
@@ -172,5 +186,5 @@ The `context` of the template is a `SchedulerResourceGroupHeaderTemplateContext`
172186

173187
## See Also
174188

175-
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/resourcegroupheader-templates)
189+
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/templates)
176190

components/scheduler/templates/slot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,5 +310,5 @@ The `context` of the template is a `SchedulerSlotTemplateContext` object that co
310310

311311
## See Also
312312

313-
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/slot-templates)
313+
* [Live Demo: Scheduler Templates](https://demos.telerik.com/blazor-ui/scheduler/templates)
314314

0 commit comments

Comments
 (0)