Share via


CPAO: Editing a Daily Template - Part 2

 

In the previous section showing a 3x5 daily calendar printout using CPAO, I did not include a timeline. In this final example for a daily template I will show what that looks like:

 

 

So the big difference here is the timeline for the day on the left side of the view. The appointments are placed where they occur during the day instead of just being listed in order as in the previous example.

 

Now - if you have a particularly busy schedule - the previous example with just a listing of appointments may be the best solution. But if you have a schedule where appointments don't overlap a lot, or is not extremely busy most of the time - then this might be a good solution.

 

Here is the listing of the Content.xml for this template:

 

<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright (c) 2007, Microsoft Corporation. All rights reserved. -->

<!-- Daily 3x5 with Timescale -->

<Template xmlns="https://schemas.microsoft.com/2005/xcal" Version="1.0.0">

  <Display>

    <Page RowSetting="0.15in,0.30in,0.0in,*,0.30in"

          ColumnSetting="0.20in,*,0.20in" Style="StandardText">

      <!-- Background -->

      <Rectangle Row="0" Column="0" RowSpan="5" ColumnSpan="3"

                 Style="PageBackground"/>

      <!-- Day Header A-->

      <Grid Row="1" Column="1" RowSetting="Auto" ColumnSetting="*,*,*"

            Style="LevelOneTitle" Padding=".04in">

         <!-- Day/Date -->

         <CalendarText Row="0" Column="0" Text="#[@TemplateDate_MonthName]

                       #[@TemplateDate_DayNumber], #[@TemplateDate_YearNumber]"

                       Margin="2" FontSize="8pt" Style="AccentText"/>

         <CalendarText Row="0" Column="2" Text="#[@TemplateDate_DayName]"

                       FontSize="7pt" HorizontalAlignment="Right"/>

      </Grid>

      <!--Day Slot-->

      <DayCalendar Row="3" Column="1">

        <DayFormat>

          <DockPanel Style="LevelOneParent">

            <Grid Orientation="Fill" Style="LevelOneBody" RowSetting="*,Auto"

                  ColumnSetting="*">

              <DockPanel Row="0" Column="0">

                <SingleAllDayArea Orientation="Top" MinSize="8" MaxSize="80"

                                  Padding="1">

                  <AllDayAppointment Height="12" Margin="5,0,5,1"

                                     Style="SingleAppointment" Background="White">

                    <Bar Visibility="Collapsed" Orientation="Left" Width="5"

                         BorderThickness="0,0,1,0">

                      <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarFree"/>

                      <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarTentative"/>

                      <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarOOF"/>

                    </Bar>

                    <Content Orientation="Fill" Margin="2,0,2,0"

                             HorizontalAlignment="Center" Separator="116"

                             SeparatorFontFamily="WingDings" FontSize="4pt"

                             TextWrapping="NoWrap">

                      <ContentElement Source="CategorySymbols"/>

                      <ContentElement Source="Subject" FontSize="6pt"

                                      FontWeight="Bold"/>

                      <ContentElement Source="Location" FontSize="6pt"/>

                      <ContentElement Source="CategorySymbols"/>

                    </Content>

                  </AllDayAppointment>

                </SingleAllDayArea>

                <TimeScale Orientation="Left" Width=".25in" StartHour="7"

                           EndHour="19" MajorFontWeight="Bold"

                           MinorUnitShow="true" MinorUnit="15"

                           Style="TimeScale" />

                <TimeSlot Orientation="Fill" StartHour="7" EndHour="19"

                          MinorUnit="30" Style="SingleBody">

                  <Appointment Style="SingleAppointment" Background="White">

                    <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                         BorderThickness="0,0,1,0">

                      <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarFree"/>

                      <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarTentative"/>

                      <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarOOF"/>

                    </Bar>

                    <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                             FontSize="6pt" SeparatorFontFamily="Wingdings"

                             TextWrapping="WrapWithOverflow">

                      <ContentElement Source="CategorySymbols"/>

                      <ContentElement Source="OddTimes" FontSize="6pt"/>

                      <ContentElement Source="Subject" FontSize="6pt"

                                      FontWeight="Bold"/>

                      <ContentElement Source="Location" FontSize="6pt"/>

                      <ContentElement Source="CategorySymbols"/>

                    </Content>

                  </Appointment>

                </TimeSlot>

              </DockPanel>

            </Grid>

          </DockPanel>

        </DayFormat>

      </DayCalendar>

      <!-- Standard Footer -->

      <Grid Row="4" Column="1" VerticalAlignment="Top" Margin="0,4,0,0"

            RowSetting="Auto" ColumnSetting="*,*,*">

        <CalendarText Row="0" Column="0" Date="#[Now]"

                      Text="#[@TemplateDocInfo_PrintTime]"

                      HorizontalAlignment="Left" FontSize="6pt"/>

        <CalendarText Row="0" Column="1" Text="#[@TemplateDocInfo_Page]"

                      HorizontalAlignment="Center" FontSize="6pt"/>

        <CalendarText Row="0" Column="2" Text="#[@TemplateDocInfo_UserName]"

                      HorizontalAlignment="Right" FontSize="6pt"/>

      </Grid>

    </Page>

  </Display>

</Template>

 

This listing is very similar to the previous daily example except for the entries in green and red. I should reiterate here that if you have not gone through the Standard Monthly Legal template series , it will be very good to do so - as it explains a lot more about the settings seen in the CPAO templates, as well as how to edit them and save them.

 

Okay - that out of the way, the green settings above are for the time scale and for describing what to fill in and where for each time slot.

 

                <TimeScale Orientation="Left" Width=".25in" StartHour="7"

                           EndHour="19" MajorFontWeight="Bold"

                           MinorUnitShow="true" MinorUnit="15"

                           Style="TimeScale" />

                <TimeSlot Orientation="Fill" StartHour="7" EndHour="19"

                          MinorUnit="30" Style="SingleBody">

 

In the TimeScale section, the start and end hours tell how much of a time scale to use on the paper. For this example the calendar starts at 7am and ends at 7pm. The MinorUnitShow and MinorUnit settings describe what kind of time scale to show. Here it is set to "true" and "15". That means it will show 15 minute increments in the timescale :

 

 

The TimeSlot section has similar Start and End hour settings. The MinorUnit setting of "30" will force a 15 minute meeting (or anything shorter than 30 minutes) to show in a 30 minute appointment space. I do this here for the small 3x5 daily template so you can really read the text. Otherwise the text gets cut off on the bottom. Here is a comparison:

 

MinorUnit="30":

 

MinorUnit="15":

 

 

Okay - the settings in red above are left - and they describe how the appointments will look.

 

                  <Appointment Style="SingleAppointment" Background="White">

                    <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                         BorderThickness="0,0,1,0">

                      <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarFree"/>

                      <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarTentative"/>

                      <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarOOF"/>

                    </Bar>

                    <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                             FontSize="6pt" SeparatorFontFamily="Wingdings"

                             TextWrapping="WrapWithOverflow">

                      <ContentElement Source="CategorySymbols"/>

                      <ContentElement Source="OddTimes" FontSize="6pt"/>

                      <ContentElement Source="Subject" FontSize="6pt"

                                      FontWeight="Bold"/>

                      <ContentElement Source="Location" FontSize="6pt"/>

                      <ContentElement Source="CategorySymbols"/>

                    </Content>

                  </Appointment>

 

The Style of "SingleAppointment" means that the appointments will show in a bordered box like the All Day Events (it has the same Style…). The free busy status bar will show on the left just like the All Day Events. If the time is "busy", then no bar will show, and it is assumed that the time is "busy".

 

You can show a bar here for busy by doing something like the following:

 

                    <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                         BorderThickness="0,0,1,0">

                      <ConditionalFormat Condition="BusyStatus eq 'Busy'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarBusy"

                                         Background="Blue"/>

                      <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarFree"/>

                      <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarTentative"/>

                      <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                         Visibility="Visible"

                                         Style="SingleAppointmentBarOOF"/>

                    </Bar>

 

The text I added is in green. It checks to se if the time is marked as Busy, and if so then it will do the "Busy" style - which is the default (no bar and it's assumed the time is busy in that case). So I added a different background color and that allows the time to be seen specifically as busy:

 

 

So that's a neat trick you can add here or in other templates where you want to see the time marked as busy when it is busy along with the other states for the status.

 

Okay - for the rest of the appointment data to show, it is very similar to the "List" statement in the previous daily example:

 

                    <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                             FontSize="6pt" SeparatorFontFamily="Wingdings"

                             TextWrapping="WrapWithOverflow">

                      <ContentElement Source="CategorySymbols"/>

                      <ContentElement Source="OddTimes" FontSize="6pt"/>

                      <ContentElement Source="Subject" FontSize="6pt"

                                      FontWeight="Bold"/>

                      <ContentElement Source="Location" FontSize="6pt"/>

                      <ContentElement Source="CategorySymbols"/>

                    </Content>

 

It will show Category Symbols (dots) on the front and back of the other appointment data. It will show the Subject and Location, and it will also show "odd times" if the times do not align with the TimeSlot MinorUnit setting. In this template it is set to 30, so any appointment not starting or ending on the hour or half hour will have the times for the appointment displayed - like:

 

 

Since the above is a 15 minute meeting - it ends at an "odd time" and so the start and end times show on it.

 

That is it for this template. If there is something you want in your customized template that might not be shown here - you can always expand out a template that has what you are wanting, and incorporate it.

 

I have attached the Content.xml that has these modifications to this post - I hope it will help with a similar template for you. 

Content.xml

Comments

  • Anonymous
    December 09, 2011
    Good work. I have some questions... 1) How can I to show the Organizer in all appointments? Only show Organizer when I make a meeting with participants.
  1. How can I to write a free text together with the tags <contentelement>? Thanks.