Loading...
 
Skip to main content

History: Tracker_as_Calendar_10

Source of version: 15 (current)

Copy to clipboard
            Tracker data can also be displayed through a Calendar layout in Tiki. This profile is a showcase of that feature configuration, which requires "unified search" to be enabled for this feature to work.

This page will be created:
((Profile_Tracker_as_Calendar_page_10))

{CODE(caption=>YAML,wrap=>0)}
preferences:
 calendar_fullcalendar: y
 feature_trackers: y
 feature_user_watches: y 
 feature_search: y
 feature_search_fulltext: n
 feature_wiki_argvariable: y
 unified_incremental_update: y
 wikiplugin_split: y
 wikiplugin_tabs: y
 wikiplugin_trackerlist: y
 wikiplugin_trackerfilter: y
 wikiplugin_trackercalendar: y
 trackerfield_dropdownother: y
 instructions: Profile_Tracker_as_Calendar_page_10
objects:
 -
  type: tracker
  ref: trac_as_cal
  data:
   name: Tracker to show items thorugh a calendar
   description: Tracker Events to be shown through a Tiki Calendar
   default_status: open
   show: [ status, creation_date, modification_date, list_modification_date ]
   allow: [ comments, attachments ]
 -
  type: tracker_field
  ref: trac_as_cal_summary
  data:
   name: Summary
   tracker: $trac_as_cal
   type: text_field
   flags: [ searchable, public, list, mandatory, link ]
   order: 10
 -
  type: tracker_field
  ref: trac_as_cal_location
  data: 
   name: Location
   tracker: $trac_as_cal
   options: Room 1.1 (55 seats),Room 1.2 (15 seats),Room 1.3 (15 seats),Room 2.1 (50 seats),Room 2.2 (15 seats),Room 2.3 (15 seats),Hall,Main Conference Room
   type: dropdown_other
   order: 15
   flags: [ searchable, public, list ]
 -
  type: tracker_field
  ref: trac_as_cal_priority
  data:
   name: Priority
   tracker: $trac_as_cal
   type: dropdown
   options: 5 (high),4,3,2,1 (low)
   flags: [ searchable, public, list ]
   order: 20
 -
  type: tracker_field
  ref: trac_as_cal_description
  data:
   name: Description
   tracker: $trac_as_cal
   type: text_area
   options: 1
   flags: [ public, mandatory ]
   order: 30
 -
  type: tracker_field
  ref: trac_as_cal_start_date
  data:
   name: Start date
   tracker: $trac_as_cal
   type: calendar
   options: dt,1
   flags: [ searchable, public, list ]
   order: 40
 -
  type: tracker_field
  ref: trac_as_cal_end_date
  data:
   name: End date
   tracker: $trac_as_cal
   type: calendar
   options: dt,1
   flags: [ searchable, public, list ]
   order: 50
{CODE}

! Sample data

{CODE(caption=>YAML,wrap=>1)}
objects:
 -
  type: tracker_item
  ref: event_001
  data:
   tracker: $Tracker_as_Calendar_10:trac_as_cal
   status: open
   values:
    - [ $Tracker_as_Calendar_10:trac_as_cal_summary, Sample upcoming event item ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_location, Room 1.1 (55 seats)  ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_start_date, 1453059200 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_end_date, 1453069200 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_priority, 3 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_description, "This item was created as part of the sample data for Tracker_as_Calendar." ]
 -
  type: tracker_item
  ref: event_002
  data:
   tracker: $Tracker_as_Calendar_10:trac_as_cal
   status: pending
   values:
    - [ $Tracker_as_Calendar_10:trac_as_cal_summary, This is another interesting event ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_location, Room 1.2 (15 seats)  ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_start_date, 1343664000 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_end_date, 1343769200 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_priority, 2 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_description, "This will soon happen" ]
 -
  type: tracker_item
  ref: event_003
  data:
   tracker: $Tracker_as_Calendar_10:trac_as_cal
   status: closed
   values:
    - [ $Tracker_as_Calendar_10:trac_as_cal_summary, A really awesome past event ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_location, Room 2.3 (15 seats)  ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_start_date, 1341244800 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_end_date, 1341246800 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_priority, 5 ]
    - [ $Tracker_as_Calendar_10:trac_as_cal_description, "This event already happened and that's why it's closed." ]
{CODE}

! Modules
{CODE(caption=>YAML)}
objects:
 -
  type: module
  ref: module_last_modif_tracker_items
  data:
   name: last_modif_tracker_items
   groups: [ Anonymous, Registered ]
   position: right
   order: 5
   params:
    trackerId: $Tracker_as_Calendar_10:trac_as_cal
    name: Summary
 -
  type: module
  ref: module_last_tracker_comments
  data:
   name: last_tracker_comments
   groups: [ Anonymous, Registered ]
   position: right
   order: 9
{CODE}




!!Add a page to allow adding items and display them in a calendar view

This will include: ((Profile_Tracker_as_Calendar_page_10))

{CODE(caption=>YAML)}
instructions: Tracker_as_Calendar_10
preferences:
  enable: [ feature_wiki ]
objects:
  -
    type: wiki_page
    ref:  trac_as_cal_page
    data:
      name: Tracker_as_Calendar_10
      description: Upcoming events based on a tracker
      lang: en
      content: wikicontent:Profile_Tracker_as_Calendar_page_10
{CODE}

!!Plugin to embed events information (from tracker items) in pages

{CODE(caption=>YAML,wrap=>1)}
objects:
 -
  type: plugin_alias
  data:
   name: event
   implementation: trackerlist
   description:
    name: Event Embed
    description: Displays an event's information inside a wiki page
    prefs: [ feature_trackers ]
    params:
     id:
      name: ID
      description: Event ID matching the tracker item ID
      required: true
      filter: digits
   body:
    input: ignore
   params:
    trackerId: $trac_as_cal
    fields: $profileobject:trac_as_cal_summary$:$profileobject:trac_as_cal_location$:$profileobject:trac_as_cal_description$:$profileobject:trac_as_cal_start_date$:$profileobject:trac_as_cal_priority$
    showlinks: "y"
    showstatus: "y"
    status: opc
    max: 1
    showlastmodif: "n"
    showfieldname: "n"
    itemId:
     pattern: "%id%"
     params:
      id:
       default: 0
{CODE}