History: PluginTrackerCalendar
Source of version: 48 (current)
Copy to clipboard
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)). {img src="display1648" link="display1648" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} !! 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. {REMARKSBOX(type="information" title="Please note")}The wiki-plugin is not using the Tiki feature ((Calendar)), so you don't need to have Tiki's "Calendar" feature enabled for this plugin to display data in a calendar view.{REMARKSBOX} !! History This ((wiki plugin)) was added in ((Tiki10)) to allow managing tracker items as resources in a calendar view: i.e. using "Resource View" [https://github.com/jarnokurlin/fullcalendar|fork by Jarno Kurlin] of [http://fullcalendar.io/|FullCalendar jQuery plugin] (original by Adam Shaw) to render the content of a tracker. There is [https://profiles.tiki.org/Tracker_as_Calendar_12|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 [https://fullcalendar.io/blog/2019/05/fullcalendar-turns-10|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: {TABS(tabs="Tiki 19+|Tiki 12.x to 14.x|Tiki 10.x" toggle="y" inside_pretty="n")} Fullcalendar 3.9 & Fullcalendar-scheduler 1.10 ///// Fullcalendar-resoruceviews, version 1.6.1.6 (12/3/13). Latest [https://github.com/jarnokurlin/fullcalendar/releases|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 {TABS} !! Parameters {PLUGINMANAGER(plugin=trackercalendar) /} !! 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 "[http://www.javascriptkit.com/javatutors/domstorage.shtml|sessionstorage]" values for easy retrieval via Javascript embedded in the Wiki page. In addition to the values listed in the below table, tracker values for the ItemIds listed in the "List Detail Popup" field will also be passed with the "Item Name" acting as the variable name for the passed value. All spaces in item names are replaced with underscores when used as variable names. {FANCYTABLE(head="__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{FANCYTABLE} !! 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. {CODE(colors="tiki")} {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"} {CODE} 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: {img src="display715" url="display715" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} {CODE(colors="tiki")} 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"} {CODE} 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: {img src="display714" url="display714" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} !!! Week view {img src="display719" url="display719" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} !!! Day view {img src="display720" url="display720" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} !!! Resource Day view {img src="display721" url="display721" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} !!! Resource Week view {img src="display722" url="display722" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} !!! Resource Month view {img src="display723" url="display723" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" thumb="zoombox"} !!! Resource Year view {img src="display1646" link="display1646" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} !!! List views {img src="display1647" link="display1647" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} !! Example 2 {CODE(colors="tiki")} {TRACKERCALENDAR(trackerId="1" begin="begin" end="end" resource="resource" coloring="project")} {filter content=test me} {filter content="{ {user}}" field=tracker_field_author} {TRACKERCALENDAR} {CODE} 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. ^__Please note__: * The permanent name for the user field in this example above is -+author+- (not -+tracker_field_author+- ), but for the content filter to work you have to prepend the field permanent name with -+tracker_field_+- , thus resulting in this case in -+field=tracker_field_author +- . ^ !! Example 3 {CODE(colors="tiki")} {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} {CODE} Since ((Tiki16|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. {img src="display1329" link="display1329" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} 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__: {img src="display1598" link="display1598" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} !! Related * Profiles: ** ((pr:Tracker_as_calendar_19)) ** ((pr:Tracker_as_calendar_12)) * ((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