/samples/todo/items.op

http://github.com/keplerproject/orbit · Unknown · 9 lines · 9 code · 0 blank · 0 comment · 0 complexity · 245bc840ad157f72fe78b3ff3be1189e MD5 · raw file

  1. $lua{[[
  2. items = todo_list:find_all{ order = "created_at desc" }
  3. ]]}
  4. $if{$items|1}[==[
  5. $items[[
  6. <li item_id="$id"><input class="item" type="checkbox" $if{$done}[=[checked]=] item_id="$id"/> $title
  7. <a href = "#" class = "remove" item_id = "$id">Remove</a></li>
  8. ]]
  9. ]==],[==[Nothing to do!]==]