Context: By default when a booking is made in Calpendo the booking block will show the colour defined for that resource.  This booking block has two areas: one for the booking heading and one for the booking body.  Although they use this default colour based on the resource it is possible to define an alternate colour.  This could be useful for making all bookings across different resources have the same colour based on a common piece of data.


For this KB we will use a scenario where we would like just the booking heading to show the same colour across multiple bookings where those bookings are part of the same project.



    

Suitable for: Admins with an understanding of working with Bakery

    

Step 1: Making changes to the Bakery

  1. Click on Admin > Bakery
  2. Under the list of Biskit Definitions on the left find the Biskit called Base Project and then select the Project biskit under
  3. Edit the Project Biskit and select Add New in Properties
  4. Set the name for the new property to be "colour"
  5. Set its type to be "string"
  6. In Attributes uncheck the “Visible in Biskit List” option
  7. Change the String Property type to “Colour”
  8. Save the Biskit
  9. Click Update DB Schema 
  10. Click Reload DB Configuration and then refresh the web browser page
 
Step 2: Updates to Global Preferences
  1. Click on Admin > Global Preferences
  2. Go to the Bookings tab
  3. The fourth group of properties is titled Format for Bookings on the Calendar
  4. Change Booking day/week title format from “Use default format” to “Specify the format”
  5. Add the following HTML into the text box which appears
    <div class="ftrgwtdate-eventHeader.titleBar" style="background-color:%project.colour?ss:#000000%;height:100%;font-size:75%">%project.projectCode?ss - :%%booker%</div>
  6. Save the Global Preferences


Step 3: Adding a colour for the project

  1. In the Projects menu select Project Search
  2. Choose a project to edit
  3. In the project find the colour property and choose a colour
  4. Now all bookings for that project will have the same colour for the booking block heading