See also Front-ends to Tracker data
Plugin Tracker Calendar
This wiki plugin allows to manage tracker items as resources while displaying them in calendar views, or calendar event lists since Tiki19.
Requirements
- TrackerCalendar wiki-plugin requires "Format to use for tracker field keys" on Admin > Search panel to be set to "Permanent Name", otherwise it will not show the tracker items in the calendar.
- Beware to set the threshold for the tracker item listing to a value that suits your needs (higher than the number of items that you want to display in the TrackerCalendar). You can increase that threshold (it's 25 items by default) at Control Panels > Look and Feel > Pagination > Maximum number of records in listings. See #Listing_threshold
- Since Tiki19, you need to install an extra package: fullcalendar-scheduler, which you can easily add through the web interface to add extra Packages in Tiki.
History
This wiki plugin was added in Tiki10 to allow managing tracker items as resources in a calendar view: i.e. using "Resource View" fork by Jarno Kurlin of FullCalendar jQuery plugin (original by Adam Shaw) to render the content of a tracker. There is a profile called "Tracker_as_Calendar_12" (included in the Profiles Wizard since Tiki12 ) to let users learn by playing with a working instance of it properly set up with demo data. In Tiki19, the underlying library (and related profile) were updated to the original which has been modernized and now offers Resource View:
- https://packagist.org/packages/fullcalendar/fullcalendar built-in
- https://packagist.org/packages/fullcalendar/fullcalendar-scheduler available as one of the Packages, for Resource View
In Tiki there is:
Fullcalendar 3.9 & Fullcalendar-scheduler 1.10
Fullcalendar-resoruceviews, version 1.6.1.6 (12/3/13). Latest released version of Jarno Kurlin's FullCalendar fork is v1.6.4.1 (2014-01-12).
v1.5.3 of (original) FullCalendar by Adam Shaw
Parameters
Create and display a calendar using tracker dataIntroduced in Tiki 10. Required parameters are in
bold
.Go to the source code
Preferences required: wikiplugin_trackercalendar
Parameters | Accepted Values | Description | Default | Since |
---|---|---|---|---|
(body of plugin) | Add list plugin style {filter} and {format} blocks | |||
begin |
word | Permanent name of the field to use for event beginning | 10.0 | |
end |
word | Permanent name of the field to use for event ending | 10.0 | |
coloring |
word | Permanent name of the field to use to segment the information into color schemes. | 10.0 | |
colormap |
text | Colormap to be used when segmenting the information using the coloring field.
Each map is composed of value and color separated with a comma, use pipes to separate multiple colormaps: 1,#6cf|2,#6fc |
18.0 | |
resource |
word | Permanent name of the field to use as the resource indicator | 10.0 | |
maxHourOfDay |
text | Last time slot that will be displayed for each day, e.g. 24:00:00 | 24:00:00 | 19.1 |
minHourOfDay |
text | First time slot that will be displayed for each day, e.g. 07:00:00 | 07:00:00 | 19.1 |
dDay |
int | Choose the default day (dd) to use for the display | 0 | 12.1 |
dMonth |
int | Choose the default month (mm, as numeric value) to use for the display. Numeric values here are 1-based, meaning January=1, February=2, etc | 0 | 12.1 |
dYear |
int | Choose the default year (yyyy) to use for the display | 0 | 12.1 |
fDayofWeek |
int | Choose the day that each week begins with, for the tracker calendar display.
The value must be a number that represents the day of the week: Sunday=0, Monday=1, Tuesday=2,
etc. Default: 0 (Sunday) |
0 | 12.1 |
weekends |
(blank) y n |
Display Saturdays and Sundays (shown by default) | y | |
slotDuration |
text | Frequency for displayting time slots, e.g. 00:30:00 (defaults to the calendar_timespan preference) | 00:30:00 | 19.1 |
maxEvents |
int | Adjust the maximum number of events to display in calendar views | 200 | 22 |
aday |
(blank) y n |
Display the option to change the view to agenda by days | y | 12.1 |
amonth |
(blank) y n |
Display the option to change the view to agenda by months | y | 12.1 |
aweek |
(blank) y n |
Display the option to change the view to agenda by weeks | y | 12.1 |
dView |
(blank)| month| agendaWeek| agendaDay| list| listMonth| listWeek| listDay| timelineYear| timelineMonth| timelineWeek| timelineDay | Choose the default view for the Tracker Calendar | month | 12.1 |
external |
(blank) y n |
Follow external link when event item is clicked. Useful for supporting links to pretty tracker supported pages. | n | 12.4 |
lday |
(blank) y n |
Display the option to change the view to list by days | n | 20.1 |
lmonth |
(blank) y n |
Display the option to change the view to list by months | n | 20.1 |
lweek |
(blank) y n |
Display the option to change the view to list by weeks | n | 20.1 |
lyear |
(blank) y n |
Display the option to change the view to list by years | n | 20.1 |
eventOverlap |
(blank) y n |
Allow resources to overlap in time. | y | 20.1 |
rday |
(blank) y n |
Display the option to change the view to resources by days | y | 12.1 |
rmonth |
(blank) y n |
Display the option to change the view to resources by months | y | 12.1 |
rweek |
(blank) y n |
Display the option to change the view to resources by weeks | y | 12.1 |
ryear |
(blank) y n |
Display the option to change the view to resources by years | n | 20.1 |
trackerId |
int | Tracker to search from | 0 | 10.0 |
url |
url | Complete URL, internal or external. | 12.4 | |
addAllFields |
(blank) y n |
If Yes (y ) all fields in the tracker will be added to the URL, not just the
itemId |
y | 12.4 |
trkitemid |
(blank) y n |
If Yes (y ) the item id will be passed as itemId , which can be used
by Tracker plugins. Will be passed as itemid if No (n ) |
n | 12.4 |
useSessionStorage |
(blank) y n |
If Yes (y ) copy all the field values into window.sessionStorage so it can be
accessed via JavaScript. |
y | 12.4 |
Parameters: Extended
When clicking a calendar item the default action is to open an edit window to change the data values. Setting the "Extended" parameter to "yes" indicates that the standard data entry window should be bypassed and navigation should move to the page specified in the "url" parameter. The URL parameter becomes visible when Extended is set to "yes."
Passing Values
Several values are passed to the page indicated by the "url" parameter. These values are passed both as Wiki Argument Variables for use in the Wiki page and JQuery "session
Variable | Description |
---|---|
trackerid | The id number of the tracker that was used to create the calendar |
itemid | The id of the data item that was selected to trigger invocation of the called page |
title | The value used as the title for the scheduled item selected on the calendar |
start | The start time of the item selected on the calendar |
end | The end time of the item selected on the calendar |
Parameter: Tracker item id
It is the default action of the trackercalendar plugin to pass "itemId" in mixed case (camel case) that is meaningful to tracker plugins on the page being opened. Setting this value to "no" gives more control of the tracker plugins to the developer by passing itemid in all lower case which is not meaningful to tracker plugins.
An example for when this would be handy is if the tracker on the page being opened is not the same as the one used to generate the calendar. If the intent were to search a related track by the title of the selected calendar item then "Tracker item id" would need to be "no" to prevent the tracker plugin from trying to automatically present the passed ItemId rather than the result of the title search. If the tracker plugin of the page being opened is the same tracker as was used to create the calendar, the page is just intended to present a greater amount of info from the tracker, setting "Tracker item id" to yes would automatically bring up the correct reference.
Colormap
Since Tiki18, if you want to ensure a consistent color map, you can pin priorities to values using the parameter colormap, with value and color separated with a comma and using pipes to separate multiple colors.
{trackercalendar trackerId="3" begin="trac_as_cal_start_date" end="trac_as_cal_end_date" resource="trac_as_cal_summary" coloring="trac_as_cal_priority" colormap="1,#6cf|2,#6fc|3,#c6f|4,#cf6|5,#f6c|6,#fc6"}
This way you can pin values of priorities to given colors. If the value is not in the colormap, then it falls back to the next color from the default list.
Example 1
This feature can be tested easily when you apply the corresponding profile that is a simple showcase for it:
- http://profiles.tiki.org/Tracker_as_Calendar_10
- http://profiles.tiki.org/Tracker_as_Calendar_11
- http://profiles.tiki.org/Tracker_as_Calendar_12
You can edit a wiki page, and look for the Plugin TrackerCalendar through the help icon, and enter the permanent names of the fields that you want to use for the display. In this example, they come from the installation of Profile "Tracker as Calendar" (http://profiles.tiki.org/Tracker_as_Calendar_10). It would look like this:
This is a test for the feature TrackerCalendar: http://doc.tiki.org/PluginTrackerCalendar {trackercalendar trackerId="3" begin="trac_as_cal_start_date" end="trac_as_cal_end_date" resource="trac_as_cal_summary" coloring="trac_as_cal_priority"}
Once you populate the tracker with some more data for the appropriate dates for your case, then they would display in a way similar to the following. Once selected Month view, they will display like:
Week view
Day view
Resource Day view
Resource Week view
Resource Month view
Resource Year view
List views
Example 2
{TRACKERCALENDAR(trackerId="1" begin="begin" end="end" resource="resource" coloring="project")} {filter content=test me} {filter content="{ {user}}" field=tracker_field_author} {TRACKERCALENDAR}
This previous example will list all items from all trackers in the same tiki site (beyond just tracker 1 defined in the params) that have the same fields with permanent names as "begin" and "end", and with field author
matching the user viewing the page.
- The permanent name for the user field in this example above is
author
(nottracker_field_author
), but for the content filter to work you have to prepend the field permanent name withtracker_field_
, thus resulting in this case infield=tracker_field_author
.
Example 3
{TRACKERCALENDAR(trackerId="1" begin="begin" end="end" resource="resource" coloring="project" aweek="y" aday="n" rweek="y" rmonth="y" rday="n" fDayofWeek="1" dView="resourceMonth")} {filter field="tracker_field_author" editable="content"} {filter field="tracker_field_status" editable="content"} {TRACKERCALENDAR}
Since Tiki 16.3: This previous example looks initially very similar to the Example 2, but some more default parameters are set to choose which options are shown in the calendar navigation top bar, as well as exposing to filter fields on top of the calendar, which will allow the user to select values and filter in real time based.
Please note that you can use the parameters editable="content"
or editable="exact"
depending on whether you want to allow partial matches with many words, or looking for an match of a full sentence, for instance.
Listing threshold
Beware to set the threshold for the tracker item listing to a value that suits your needs (higher than the number of items that you want to display in the TrackerCalendar). You can increase that threshold (it's 25 items by default) at Control Panels > Look and Feel > Pagination > Maximum number of records in listings:
Related
- Profiles:
- PluginTracker
- Trackers
- FullCalendar (original)
http://arshaw.com/fullcalendar/ - FullCalendar with Resource views (the fork Tiki used between Tiki12 and Tiki18
https://github.com/jarnokurlin/fullcalendar - FullCalendar Scheduler (what Tiki will change to for Tiki19+)
https://github.com/fullcalendar/fullcalendar-scheduler