Holidaylist Comment Template

%{ Show a configured %HOLIDAYLIST% with legend }%
%TMPL:DEF{"holidaylist" topic="%TOPIC%" days="60" startdate="-14" currentusercolor="DarkSeaGreen" border="0"}%
%TRANSLATE{"Legend: 8-) = Vacation, :ok: = Day off in lieu, :-I = Business trip, :home: = Home office,  ;) = Errand, :-( = Sick, :-D = Parental leave"
  de="Legende: 8-) = Urlaub, :ok: = Gleittag, :-I = Dienstreise, :home: = Heimarbeit, ;) = Besorgung, :-( = Krank, :-D = Elternzeit"}%
%HOLIDAYLIST{topic="%topic%" startdate="%startdate%" todaybgcolor="lightblue"
  namecolors="%WIKIUSERNAME%:%currentusercolor%"
  days="%days%" daynames="%TRANSLATE{"Mon|Tue|Wed|Thu|Fri|Sat|Sun" de="Mo|Di|Mi|Do|Fr|Sa|So"}%"
  lang="English,Deutsch" compatmode="1"
  monthnames="%TRANSLATE{"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec" de="Jan|Feb|März|Apr|Mai|Jun|Jul|Aug|Sept|Okt|Nov|Dez"}%"
  showweekends="1" weekendbgcolor="lightgray"
  enablepubholidays="1" showpubholidays="0" priopubholidays="0" pubholidayicon="color(lightgrey)"
  showstatrow="on" statheader="@Homeoffice" statformat="%{ll:Heimarbeit}%"}%
<!-- Show border lines: --><style type="text/css">.hlpTable td, .hlpTable th{ border:%border%px solid lightgray; }</style>
%TMPL:END%

%{ Add all members of a group so that they get listed in %HOLIDAYLIST% }%
%TMPL:DEF{"holidaylist_group" group="%USERSWEB%.BaseGroup"}%
<!-- All members of group %group%:
%GROUPINFO{"%group%" format="   * 1 Jan 1970 - $wikiusername" separator="$n"}%
-->
%TMPL:END%

%{ Create a select tag with all members of a group and select the current %WIKINAME% }%
%TMPL:DEF{"holidaylist_member_select" group="%USERSWEB%.BaseGroup" name="member" id="holidaylist_member_select" tabindex="8"}%\
<select name="%name%" id="%id%" tabindex="%tabindex%" size="1" class="foswikiSelect valid" %DISABLED%>
%GROUPINFO{"%group%" format="  <option value=\"$wikiusername\" $percentIF{\"'$percentWIKINAME$percent'='$wikiname'\" then=\"selected\"}$percent>$wikiname</option>" separator="$n"}%
</select>
%TMPL:END%

Comment type "holidaylist"

%{ Show a legend, a configured %HOLIDAYLIST% and a form to add a new entry }%
%{ currentusercolor: Define the background color of the current user }%
%{ tableborder: 0|1, Draw borders around cells in %HOLIDAYLIST% }% %{ days: The number of days to show in the calender }% %{ duties: A comma seperated list of available duties (gfos, network, phone and windows) }%
%TMPL:DEF{PROMPT:holidaylist}%
%TMPL:P{"holidaylist" topic="%TOPIC%" currentusercolor="%currentusercolor|DarkSeaGreen%" border="%tableborder|0%" days="%days|60%"}%
<div class="foswikiFormSteps">
  <div class="foswikiFormStep">
    <label for="holiday_from" style="display:inline-block;width:90px">%TRANSLATE{"From" de="Von"}%:</label>
    <input type="text" name="from" tabindex="1" size="9" class="foswikiInputField" id="holiday_from" required="true" %DISABLED% style="padding:3px 5px"/>
    <input type="image" src="/pub/System/JSCalendarContrib/img.gif" style="vertical-align:middle" alt="Calendar" class="editTableCalendarButton" onclick="return showCalendar('holiday_from','%d %b %Y')" />
  </div>
  <div class="foswikiFormStep">
    <label for="holiday_until" style="display:inline-block;width:90px">%TRANSLATE{"Until" de="Bis"}%:</label>
    <input type="text" name="until" tabindex="2" size="9" class="foswikiInputField" id="holiday_until" required="true" %DISABLED% style="padding:3px 5px"/>
    <input type="image" src="/pub/System/JSCalendarContrib/img.gif" style="vertical-align:middle" alt="Calendar" class="editTableCalendarButton" onclick="return showCalendar('holiday_until','%d %b %Y')" />
  </div>
  <div class="foswikiFormStep">
    <label for="holiday_reason" style="display:inline-block;width:90px">%TRANSLATE{"Reason" de="Grund"}%:</label>
    <select name="reason" id="holiday_reason" tabindex="8" size="1" class="foswikiSelect valid" %DISABLED%>
      <option value="Urlaub - 8-)">%TRANSLATE{"Vacation" de="Urlaub"}%</option>
      <option value="Krank - :-(">%TRANSLATE{"Sick" de="Krank"}%</option>
      <option value="Gleittag - :ok:">%TRANSLATE{"Day off in lieu" de="Gleittag"}%</option>
      <option value="Dienstreise - :-I">%TRANSLATE{"Business trip" de="Dienstreise"}%</option>
      <option value="Besorgung - ;)">%TRANSLATE{"Errand" de="Besorgung"}%</option>
      <option value="Heimarbeit - :home:">%TRANSLATE{"Home office" de="Heimarbeit"}%</option>
      %SET{"duties_list" value="%FORMAT{"%duties|%" type="string" format="'$item'" separator="$comma "}%"}%
      %IF{"'datacenter' in (%duties_list%)" then="<option value=\"Rufbereitschaft Data-Center - color(red)\">$percentTRANSLATE{\"On-call Data Center\" de=\"RB Data-Center\"}$percent</option>"}%
      %IF{"'gfos' in (%duties_list%)" then="<option value=\"Rufbereitschaft GFOS - color(green)\">$percentTRANSLATE{\"On-call GFOS\" de=\"RB GFOS\"}$percent</option>"}%
      %IF{"'network' in (%duties_list%)" then="<option value=\"Rufbereitschaft Netzwerk - color(aquamarine)\">$percentTRANSLATE{\"On-call network\" de=\"RB Netzwerk\"}$percent</option>"}%
      %IF{"'phone' in (%duties_list%)" then="<option value=\"Rufbereitschaft Telefon - color(lightgreen)\">$percentTRANSLATE{\"On-call phone\" de=\"RB Telefon\"}$percent</option>"}%
      %IF{"'storage' in (%duties_list%)" then="<option value=\"Rufbereitschaft Storage - color(gold)\">$percentTRANSLATE{\"On-call Storage\" de=\"RB Storage\"}$percent</option>"}%
      %IF{"'windows' in (%duties_list%)" then="<option value=\"Rufbereitschaft Windows - color(coral)\">$percentTRANSLATE{\"On-call Windows\" de=\"RB Windows\"}$percent</option>"}%
    </select>
  </div>
  <div class="foswikiFormStep">
    <label for="holiday_note" style="display:inline-block;width:90px">%TRANSLATE{"Note" de="Notiz"}%:</label>
    <input type="text" name="note" id="holiday_note" size="9" class="foswikiInputField" %DISABLED%/></label>
  </div>
  <div class="foswikiFormStep">
    <label for="holiday_colleague" style="display:inline-block;width:90px">Name:</label>
    %TMPL:P{"holidaylist_member_select" group="%group|Main.BaseGroup%" name="colleague" id="holiday_colleague"}%
  </div>
  <div class="foswikiFormStep">
    <input type="submit" value="%TRANSLATE{"Add" de="Hinzufügen"}%" class="foswikiButton foswikiSubmit %DISABLED% %TMPL:P{ajax}%" /><small>%TRANSLATE{"After adding reload page (F5) to see the entry in the table" de="Nach dem Hinzufügen die Seite neuladen (F5), um den Eintrag in der Tabelle zu sehen"}%</small>
  </div>
</div>
<script>$(function() { // Set "until" if "from" changed and "until" is not set
  $('#holiday_from')[0].onchange = function() { if (!$('#holiday_until')[0].value) $('#holiday_until')[0].value = $('#holiday_from')[0].value; };
});</script>
%TMPL:END%

%{ Print an input line for %HOLIDAYLIST% }%
%TMPL:DEF{OUTPUT:holidaylist}%%POS:AFTER%   * %URLPARAM{"from" encode="$encodeguest"}% - %URLPARAM{"until" encode="$encodeguest"}% - %URLPARAM{"colleague" encode="$encodeguest"}% - %URLPARAM{"note" encode="$encodeguest"}% %URLPARAM{"reason" encode="$encodeguest"}%
%TMPL:END%
Topic revision: r13 - 2021-03-22, AndreKerkhoff - This page was cached on 2021-06-17 - 04:22.

<!-- With LdapContrib WikiUsers becomes irrelevant -->
%IF{"'%WIKINAME%'!='WikiGuest'" then="$n   * [[$percentUSERSWEB$percent.$percentWIKIUSERSTOPIC$percent][ $percentICON{\"person\"}$percent $percentMAKETEXT{\"Users\"}$percent]]"}% \

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Imprint (german) | Privacy Policy (german)