TodoListPlugin

simple todo lists

Description

This plugin implements a simple todo list editor stored in Foswiki meta data.

Syntax

TODOLIST

%TODOLIST{<params>..."}%

Parameter Description Default
"..." or list="..." name of the list default
topic="..." name of the topic to render the list for current topic
rev="..." topic revision top revision
editmode="on,off,check,acl" specifies the level of editing:
"on" - fully editable (given user is allowed to change the topic),
"off" - not editable,
"check" - only allow ticking todo items, but not adding new items nor reordering them (given user has change rights on the topic) "acl" - edit mode controlled by acl lists (see below)
off if topic cannot be changed, on otherwise
ternary="on/off" if enabled items can be toggled between three instead of two states off
icon="..." or icon1="..." icon to be displayed on a todo item fa-circle-o
icon2="..." icon for ticked off items fa-check
icon3="..." icon displayed for the third value if ternary is enabled fa-times
size="..." size of the input element to edit a todo item 80

If editmode is set to acl then the following access control lists will control the edit mode.

  • ALLOWTOPICTODOLISTCHANGE: if user has change acces to the list, the todo list may be changed, i.e. new items may be added, deleted, checked and reordered: edit mode is on
  • ALLOWTOPICTODOLISTCHECK: if is not allowed to change the list but is allowed to check items of a todo list, edit mode is check

If none of the above lists apply, then the normal topic change rights control t he list's edit mode:

  • ALLOWTOPICCHANGE: if user has change access to the topic, the edit mode is on
  • DENYTOPICCHANGE: if user does not have change access to the topic, edit mode is off

STARTTODOLIST, ENDTODOLIST

An already existing bullet list can be converted into a %TODOLIST by surrounding it with %STARTTODOLIST ... %ENDTODOLIST The included bullets will be moved into the meta data of the current topic and replaced with a %TODOLIST macro.

%STARTTODOLIST%
   * first item
   * second item
   * third item        
%ENDTODOLIST%

When saving a topic above code will be converted into:

%TODOLIST{"id1712338093"}%

... with all three todo items converted to %META:TODO records.

The id is a randomly generated number.

Examples

default appearance:

%TODOLIST%

ternary check list:

%TODOLIST{ternary="on"}%

custom icons:

%TODOLIST{icon1="fa-square-o" icon2="fa-check-square-o"}%

%TODOLIST{icon1="fa-toggle-off" icon2="fa-toggle-on"}%

custom icons on a non-default todo list:

%TODOLIST{"bbq" icon1="fa-heart-o" icon2="fa-heart"}%

Querying todo items

Using %QUERY:

%QUERY{"todo"}%

Using %DBQUERY of DBCachePlugin:

%DBQUERY{
   topic="%TOPIC%"
   context="todo"
   header="| *#* | *Text* | *Author* | *Changed* |$n"
   format="| $index | $displayValue(text) | $displayValue(author) | $displayValue(date) |"
}%

Using %RENDERMETADATA of MetaDataPlugin. Note that todo items are rendered based on their TodoListForm definition.

%RENDERMETADATA{"todo"}%

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

NameVersionDescription
Foswiki::Plugins::MoreFormfieldsPlugin>=0Required
Foswiki::Plugins::MetaDataPlugin>=0Optional

Change History

11 Mar 2025 improved interaction with store backend
31 Jan 2025 initial release

PackageForm edit

Author Michael Daum
Version 1.10
Release 11 Mar 2025
Description simple todo lists
Repository https://github.com/foswiki/TodoListPlugin
Copyright 2024-2025, Michael Daum, All Rights Reserved
License GPL (GNU General Public License)
Home http://foswiki.org/Extensions/TodoListPlugin
Support http://foswiki.org/Support/TodoListPlugin
Topic revision: r1 - 11 Mar 2025, ProjectContributor

© 2025 D.Soost & D.Marxsen - All rights reserved
© Of all articles by authors
Trademarks are the property of their respective owners
© Logo by Wikipedia, modified by Administrator
Impressum
Disclaimer
Datenschutzerklärung