<% @title = "ToDo" %> <%= sub_template "top" %> <% num_items = @todo_items.inject(0) { |n, (p,i)| n += i.size } num_items += @bliki_todo_items.inject(0) { |n, (p,i)| n += i.size } %>

There <%= num_items == 1 ? 'is' : 'are' %> <%= num_items.zero? ? "no" : num_items %> ToDo item<%= num_items != 1 ? 's' : '' %>.

<% if @bliki_todo_items.size > 0 %>

ToDo items from Bliki:

<% end %> <% if num_items == 0 %>

To make ToDo items appear here insert a 'todo' item in any page. Simply write at the start of any line 'todo' followed by a colon (':'), followed by a space and some text. For example:

todo: some text

This text will be rendered in red on the page itself, and will also appear here in a list of todo items from all the pages.

This module also uses ParseDate, which is a fairly smart module. If you write a date anywhere in the todo item's text, it will be picked up. If that date is today or in the past, the item will be colored bright red!

<% end %> <%= sub_template "bottom" %>