%META:TOPICINFO{author="rohdedan" date="1118419852" format="1.0" version="1.1"}%
---+!! <nop>HolidaylistPlugin</nop>

%TOC%

The !HolidaylistPlugin handles the tag %<nop>HOLIDAYLIST</nop>% that inserts a vacation list on the current page. Smilies are used to indicate if a person is in work or on holiday. 

The plugin creates a table filled with Smilies and today's date will always be the first column. There is a row in the table for each person and each day is flagged as either: :mad: (in work), :ok: ( a day off) or 8-) (absent for some time).

---++ Syntax Rules
The sytax follows that of the !CalendarPlugin. Note adding the %<nop>CALENDAR</nop>% tag to the page will also create a Calendar with the listed vacations. See TWiki:Plugins.CalendarPlugin for more details.

To insert vacations into the table, create a bullet list. Three spaces and then a *.

Example1: To list that John will be away on 1-July-2005

	!* 01 Jul 2005 - John
	 
Example2: To list that Mary will be away from 3-Sep - 9-Sep 2005

	!* 03 Sep 2005 - 09 Sep 2005 - Mary 


There are 2 possible arguments =days= (defaults to 30days) and =tablecaption= (defaults to null).

Example3 :

=%<nop>HOLIDAYLIST{days="90" tablecaption="Planned Holidays"}</nop>%=

---++ Table Attributes

| *Attribute* | *Comment* | *Default / Example* |
| adayofficon |a day off icon | adayofficon="&lt;img src="%<nop>PUBURL%/TWiki/SmiliesPlugin/thumbs.gif"/&gt;" |
| border | table border | border="1" |
| cellpadding | table cell padding | cellpadding="1" |
| cellspacing | tabel cell spacing | cellspacing="0" |
| days | Number of days to show |days="30" |
| holidayicon | holiday icon | holiday="&lt;img src="%<nop>PUBURL%/TWiki/SmiliesPlugin/cool.gif"/&gt;" |
| lang | Language | lang="English" |
| name | header content of the first cell header |name="Name" |
| showweekends | show weekends if set to 1 | showweekends="0" |
| tablebgcolor | table background color | tablebgcolor="white" |
| tablecaption | table caption | tablecaption="&nbsp;" |
| tableheadercolor | color of the table header | tableheadercolor="%<nop>WEBBGCOLOR%" |
| topic | A comma separated list of source topics. | topic="%<nop>TOPIC%" |
| workicon | in work icon | workicon="&nbsp;" |

---++ Example

%HOLIDAYLIST%

	* 02 Jan 2005 - 30 Feb 2005 - Bill
	* 27 Mar 2005 - 20 Apr 2005 - Bob
	* 10 May 2005 - 01 Jun 2005 - Mary
	* 08 Jun 2005 - Bill
	* 10 Jun 2005 - 15 Jun 2005 - Bob
	* 10 Jul 2005 - Mary
	* 20 Jul 2005 - 02 Sep 2005 - Bob
	* 15 Sep 2005 - 15 Oct 2005 - Mary
	* 30 Oct 2005 - Jane
	* 19 Nov 2005 - Bob
	* 29 Nov 2005 - 20 Dec 2005 - Bill
	* 25 Dec 2005 - Bob

---++ Plugin Settings

	* One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic:
		* Set SHORTDESCRIPTION = Create a table with a list of people on holidays


	* Language (*see manuale page of Date::Calc module). 
		* # Set LANG = English

	* Name of the first cell:
		* # Set NAME = Name
  
*Note:* Every table attribute of %<nop>HOLIDAYLIST% can be used as plugin setting. You only have to use captial letters.

---++ Plugin Installation Instructions

	* Download the ZIP file from the Plugin web (see below)
	* Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
	  | *File:* | *Description:* |
	  | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
	  | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
	* Test if the plugin is correctly installed: Copy the example above into a new topic and change
	  the year number to the current year.


---++ Plugin Info

|  Plugin Author: | Main.PeterJones |
|  Plugin Version: | 10 Jun 2005 |
|  Change History: | <!-- versions below in reverse order -->&nbsp; |
|  10 Jun 2005: | A complete reimplementation with many bug fixes and some new features. (TWiki:Main.DanielRohde) |
|  01 Jun 2005: | Initial version (TWiki:Main.PeterJones) |
|  CPAN Dependencies: | CPAN:Date::Calc |
|  Other Dependencies: | %TWIKIWEB%.SmiliesPlugin, TWiki:Plugins.CalendarPlugin |
|  Perl Version: | 5.0 and up|
|  TWiki:Plugins/Benchmark: |  |
|  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
|  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |
|  Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |

__Related Topics:__ %TWIKIWEB%.SmiliesPlugin, %TWIKIWEB%.TWikiPlugins, TWiki:Plugins.CalendarPlugin
 
-- TWiki:Main.PeterJones - 01 Jun 2005
%BR% -- TWiki:Main.DanielRohde - 10 Jun 2005

