ChecklistPlugin creates simple checklists.
It handles the tags %CLI% (CheckList Item), %CHECKLIST%, %CHECKLISTSTART%, %CHECKLISTEND%
and depends on the TWiki:Plugins.SmiliesPlugin (see Plugin Info).
A %CLI% tag creates a image button and a simple click on it changes the state of the image button.
The default states are 'todo' (represented by a image button) and 'done' (represented by a
image button).
If you put a bullet list or a ordered list between %CHECKLISTSTART% and %CHECKLISTEND% every bullet/ordered list item gets a checklist item.
Every state change will be saved to a topic with name <YourTopicName>ChecklistItemState. It is possible to define states (default: todo and done) and matching icons. You can also put more than one checklist into a topic.
Just type a %CLI% (CheckList Item) into a topic to create a single checklist item. A simple mouse click on it will change the state of this item. If the last state is reached the item state falls back to the first state.
If you put a bullet or ordered list between %CHECKLISTSTART% and %CHECKLISTEND% every bullet/ordered list item gets a checklist item.
To modify the states or state icons you can set it with %CHECKLISTSTART% or %CHECKLIST% tag. This tags can also be used to create "reset" buttons and state legends.
All tags can be used with attributes documented in the Attributes section.
To create a link to the checklist item state topic you can put the following forced link on your checklist topic:
[[%TOPIC%ChecklistItemState]]If you have installed the TWiki:Plugins.SpreadSheetPlugin
To change the state of a checklist item just click on it.
You type: | You get: (simulated) | ||||||
Example 1: Create a simple checklist:
| |||||||
%CHECKLISTSTART% 1 first step 1 second step 1 last step %CHECKLISTEND% |
|
||||||
Example 2: Create a simple freehand checklist:
| |||||||
1 first step %CLI% 1 second step %CLI% 1 last step %CLI% |
|
||||||
Example 3: Create a checklist with three states and own icons:
| |||||||
%CHECKLISTSTART{states="todo|doing|done" stateicons=":no:|:-I|8-)"}% 1 first step 1 second step 1 third step %CHECKLISTEND% |
|
||||||
Example 4: Create two checklists on a topic:
( ![]() %CHECKLIST% and every %CLI% tag needs a name attribute) | |||||||
%CHECKLISTSTART{name="first checklist"}% 1 first step 1 second step %CHECKLISTEND% %CHECKLIST{name="second checklist"}% 1 first step %CLI{name="second checklist"}% 1 next step %CLI{name="second checklist"}% |
|
||||||
Example 5: Create a checklist in a table: | |||||||
| *state* | *todo* | | %CLI% | first step | | %CLI% | second step | |
|
||||||
Example 6: Create multiple lists with tables and hard linked item states to allow add/insert/remove items:
![]() %EDITTABLE% and %CHECKLISTSTART% tag have to stay in the same line.
| |||||||
%EDITTABLE{changerows="on" format="|label,0,#%SERVERTIME{$year$month$day$hour$min$sec}%|text,50|"}%%CHECKLISTSTART{name="list1"}% | *STATUS<br/>(click to change)* | *Item* | | #2007Feb07093710 | testitem | %CHECKLISTEND% %EDITTABLE{changerows="on" format="|label,0,#%SERVERTIME{$year$month$day$hour$min$sec}%|text,50|"}%%CHECKLISTSTART{name="list2"}% | *STATUS<br/>(click to change)* | *Item* | | #2007Feb07093712 | second | %CHECKLISTEND% |
|
||||||
Example 7: Create a legend and a reset button:
| |||||||
%CHECKLISTSTART{showlegend="on" reset=":-I Reset"}% 1 first step 1 next step %CHECKLISTEND% |
(
|
||||||
Example 8: Create a button to set all states in a checklist to done :
| |||||||
1 first step %CLI% 1 next step %CLI% %CHECKLIST{reset=":ok: set all done @done"}% |
|
||||||
Example 9: Insert new items in an existing checklist without state lost:
| |||||||
%CHECKLISTSTART% 1 first step 1 first new inserted item #MyFirstInsertedItem 1 second step 1 second new inserted item %CLI{id="MySecondInsertedItem"}% %CHECKLISTEND% |
|
Examples:
%CHECKLIST{showlegend="on" reset=":-I Reset checklist"}% %CLI{id="i1"}%
Attribute | Usable in Tag(s) | Comment | Example |
---|---|---|---|
anchors | %CLI% %CHECKLIST% %CHECKLISTSTART% |
enables/disables link anchors (default: yes ); if enabled a state change will scroll your topic to the clicked checklist item; useful for long checklists (useless if useajax is on ) |
anchors="yes" |
clipos | %CLI% %CHECKLISTSTART% |
determines the position of the checklist item icon (default: right ); if you use another value than "left" the checklist item icon will be appended to a ordered or bullet list item |
clipos="left" |
descr | %CLI% | a description for a checklist item used in the [[%TOPIC%ChecklistItemState]] topic; you can use it as a default option (without descr ), e.g: %CLI{"my description"}% |
descr="" |
descrcharlimit | %CLI% %CHECKLIST% %CHECKLISTSTART% |
character limit for a description (useful if no description was given and therefore it is stripped from the text before and after a checklist item) | descrcharlimit="100" |
hide | %CHECKLIST% %CHECKLISTSTART% |
shows a button to show or hide checklist items; if you put a @<state> into the hide value, you can hide/show only items with the given state; ![]() |
hide="Hide/Show 'done' items @done |
id | %CLI% | unique id of a checklist item (default: autogenerated); useful and recommended if you insert new checklist items in an existing checklist with states | id="myfirstownid" |
log | %CHECKLIST% %CHECKLISTSTART% |
enables/disables logging | log="off" |
logformat | %CHECKLIST% %CHECKLISTSTART% |
format of a log entry | logformat=" * %SERVERTIME% - %WIKIUSERNAME% - Item %CLIID%: from %STATE% to %NEXTSTATE%" |
logtopic | %CHECKLIST% %CHECKLISTSTART% |
log topic | logtopic="%TOPIC%ChecklistLog" |
logpos | %CHECKLIST% %CHECKLISTSTART% |
log entry position; allowed values: append, prepend | logpos="append" |
name | %CLI% %CHECKLIST% %CHECKLISTSTART% |
a naming context (default: _default ) - useful and recommended if you define more than one checklist on a topic (![]() %CHECKLIST% you must use it in all related %CLI% tags too) |
name="mychecklist1" |
notify | %CLI% %CHECKLIST% %CHECKLISTSTART% |
enables/disables mail notification if a item state was changed | notify="off" |
pos | %CHECKLISTSTART% | defines the reset button and legend position (default: bottom ); if you use another value than "top" the button position falls back to default |
pos="bottom" |
reset | %CHECKLIST% %CHECKLISTSTART% |
it enables a reset image button with a given text or icon (default: undefined); if you put a @<state> into the reset value, you can reset a checklist to the given <state> , e.g: reset="@done :ok: set all done" ; if you put a @STATESEL into the reset value you get a state selection popup with all states |
reset="Reset all @STATESEL |
showlegend | %CHECKLIST% %CHECKLISTSTART% |
if you set it to "on" a states legend with icons will be displayed (default: off ),e.g: ( ![]() ![]() |
showlegend="off" |
states | %CLI% %CHECKLIST% %CHECKLISTSTART% |
all known states (default: todo¦done ; a list separated by a '¦' ) |
states="todo¦done" |
stateicons | %CLI% %CHECKLIST% %CHECKLISTSTART% |
icons for all states separated by a '¦' (default: :-I¦:ok: ); if you use common variables like %Y% in stateicons you have to use the <nop> tag after the first % , e.g: %<nop>Y% |
stateicons=":-I¦:ok:" |
statesel | %CLI% %CHECKLIST% %CHECKLISTSTART% |
enables/disables state selection popup (default: off) | statesel="on" |
statetopic | %CLI% %CHECKLIST% %CHECKLISTSTART% |
set the checklist item state topic (default: <YourTopicName>ChecklistItemState ) |
statetopic="MyItemStateTopic" |
static | %CLI% %CHECKLIST% %CHECKLISTSTART% |
allow/disallow state changes of checklist items (useful if you create summary pages of some items of different checklists) | static="off" |
template | %CLI% %CHECKLIST% %CHECKLISTSTART% |
template name (see Plugin settings / Templates ) | template="patchday" |
text | %CLI% | text will be attached to the item and will be clickable | text="my first step" |
timestamp | %CLI% %CHECKLIST% %CHECKLISTSTART% |
timestamp format used for statictopic or tooltip substition (%TIMESTAMP%) |
timestamp="%SERVERTIME% - %TWIKIUSERNAME%, last state: %STATE%" |
tooltip | %CLI% %CHECKLIST% %CHECKLISTSTART% |
sets the tooltip of the state icons (substituted variables: %STATE% - current state; %NEXTSTATE% - next state; %STATEICON% - state icon; %NEXTSTATEICON% - next state icon; %STATES% - comma separated list of all states; %STATECOUNT% - number of states; %LEGEND% - a legend of all states and state icons; %TIMESTAMP% - the timestamp formated with timestamp attribute) |
tooltip="%STATE%" |
tooltipbgcolor | %CLI% %CHECKLIST% %CHECKLISTSTART% |
tooltip background color (statesel popup background color is also effected) |
tooltipbgcolor="%WEBBGCOLOR%" |
tooltipfixleft | %CLI% %CHECKLIST% %CHECKLISTSTART% |
offset to fix horizontal tooltip position | tooltipfixleft="-163" |
tooltipfixtop | %CLI% %CHECKLIST% %CHECKLISTSTART% |
offset to fix vertical tooltip position | tooltipfixtop="0" |
useajax | %CLI% %CHECKLIST% %CHECKLISTSTART% |
enables/disables JavaScript/AJAX based item state changes (default: on ) |
useajax="1" |
State | TODO |
---|---|
Click me to change my state from 'done' to 'todo' t: 2024-03-28 - 01:45 - Main.TWikiGuest, last state: todo ![]() |
first step |
Click me to change my state from 'todo' to 'done' t: 2024-03-28 - 01:45 - Main.TWikiGuest, last state: todo ![]() |
next step |
ChecklistPluginChecklistItemState
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%
, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%
data/debug.txt
)
todo¦done
and :-I¦:ok:
; remove # for setup):
off
)
on
)
%RED% Sorry, some parameters are unknown: %UNKNOWNPARAMSLIST% %ENDCOLOR% <br/> Allowed parameters are (see TWiki.ChecklistPlugin topic for more details): %KNOWNPARAMSLIST%
)
off
; old bevavior: on
)
off
):
Syntax: Set TEMPLATE_template name_attribute name = attribute value
Template Usage: %CLI{template="template name"}%
(the same for %CHECKLISTSTART%
, %CHECKLIST%
).
Examples:
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
cp data/TWiki/ChecklistPlugin.txt data/TWiki/ChecklistPluginOld.txt
ChecklistPlugin.zip
in your twiki installation directory. Content: File: | Description: |
---|---|
data/TWiki/ChecklistPlugin.txt | Plugin topic |
data/TWiki/VarCHECKLIST.txt | documentation |
data/TWiki/VarCHECKLISTSTART.txt | documentation |
data/TWiki/VarCHECKLISTEND.txt | documentation |
data/TWiki/VarCLI.txt | documentation |
lib/TWiki/Plugins/ChecklistPlugin.pm | Plugin Perl module |
pub/TWiki/ChecklistPlugin/itemstatechange.js | JavaScript/AJAX module |
Plugin Author: | TWiki:Main.DanielRohde![]() |
Plugin Version: | v1.028 (30 Aug 2010) |
Change History: | |
v1.028 (30 Aug 2010) | TWiki:Main.DanielRohde![]() |
v1.027 (19 Aug 2010) | TWiki:Main.DanielRohde![]() |
v1.026 (21 Oct 2009) | TWiki:Main.DanielRohde![]() ![]() |
v1.025 (15 Oct 2009) | TWiki:Main.DanielRohde![]() ![]() ![]() |
v1.024 (20 Apr 2007) | TWiki:Main.DanielRohde![]() |
v1.023 (1 Mar 2007) | TWiki:Main.DanielRohde![]() ![]() |
v1.022 (12 Feb 2007) | TWiki:Main.DanielRohde![]() ![]() static feature, 'text' icons); removed useforms feature |
v1.021 (31 Jan 2007) | TWiki:Main.DanielRohde![]() ![]() ![]() |
v1.020 (15 Jan 2007) | TWiki:Main.DanielRohde![]() useajax attribute) requested by TWiki:Main.ShayPierce![]() ![]() |
v1.019 (14 Dec 2006) | TWiki:Main.DanielRohde![]() ![]() |
v1.018 (30 Aug 2006) | TWiki:Main.DanielRohde![]() ![]() |
v1.017 (9 Aug 2006) | TWiki:Main.DanielRohde![]() |
v1.016 (18 Apr 2006) | TWiki:Main.DanielRohde![]() ![]() |
v1.015 (9 Feb 2006) | TWiki:Main.DanielRohde![]() use warnings; ) reported by TWiki:Main.KennethLavrsen![]() |
v1.014 (6 Feb 2006) | TWiki:Main.DanielRohde![]() |
v1.013 (3 Feb 2006) | TWiki:Main.DanielRohde![]() |
v1.012 (2 Feb 2006) | TWiki:Main.DanielRohde![]() |
v1.011 (23 Jan 2006) | TWiki:Main.DanielRohde![]() |
v1.010 (28 Nov 2005) | TWiki:Main.DanielRohde![]() |
v1.009 (25 Nov 2005) | TWiki:Main.DanielRohde![]() ![]() |
v1.008 (9 Nov 2005) | TWiki:Main.DanielRohde![]() |
v1.007 (7 Nov 2005) | TWiki:Main.DanielRohde![]() |
v1.006 (4 Nov 2005) | TWiki:Main.DanielRohde![]() |
v1.005 (2 Nov 2005) | TWiki:Main.DanielRohde![]() |
v1.004 (1 Nov 2005) | TWiki:Main.DanielRohde![]() |
v1.003 (1 Nov 2005) | TWiki:Main.DanielRohde![]() ![]() |
v1.002 (31 Oct 2005) | TWiki:Main.DanielRohde![]() |
v1.001 (27 Oct 2005) | TWiki:Main.DanielRohde![]() |
v1.000 (27 Oct 2005): | TWiki:Main.DanielRohde![]() |
TWiki Dependency: | $TWiki::Plugins::VERSION 1.024 |
CPAN Dependencies: | none |
Other Dependencies: | TWiki:Plugins.SmiliesPlugin![]() |
Perl Version: | 5.005 |
License: | GPL (GNU General Public License![]() |
TWiki:Plugins/Benchmark![]() |
GoodStyle 97%, FormattedSearch 99%, ChecklistPlugin 92% |
Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/ChecklistPlugin![]() |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/ChecklistPluginDev![]() |
Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/ChecklistPluginAppraisal![]() |
Related Topics: TWikiPreferences, TWikiPlugins
-- TWiki:Main.DanielRohde - 27 Oct 2005