summaryrefslogtreecommitdiff
path: root/ui/list.html
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-03-19 22:45:31 +0100
committerKevin Chabowski <kevin@kch42.de>2014-03-19 22:45:31 +0100
commitefbdc3bbd6cba8691391ec2192ea96adbfb8c029 (patch)
treebe6a69fab84d15d9fc1f8a50a02e8d57e9388c3b /ui/list.html
downloadtodo-efbdc3bbd6cba8691391ec2192ea96adbfb8c029.tar.gz
todo-efbdc3bbd6cba8691391ec2192ea96adbfb8c029.tar.bz2
todo-efbdc3bbd6cba8691391ec2192ea96adbfb8c029.zip
Initial commit
Diffstat (limited to 'ui/list.html')
-rw-r--r--ui/list.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/ui/list.html b/ui/list.html
new file mode 100644
index 0000000..ce998dd
--- /dev/null
+++ b/ui/list.html
@@ -0,0 +1,46 @@
+<set myurl="{{ @BASE . '/list/' . @listid }}" />
+<form action="{{ @myurl }}" method="post">
+ <h1>
+ <input type="hidden" name="action" value="setname" />
+ <input type="text" name="name" value="{{ @listname }}" class="listname" />
+ <button type="submit" title="Set name">✓</button>
+ </h1>
+</form>
+
+<check if="{{ empty(@listdata) }}">
+ <true><div class="empty">List is empty</div></true>
+ <false>
+ <ul class="todolist">
+ <repeat group="{{ @listdata }}" value="{{ @it }}">
+ <li{{ @it.checked ? ' class="checked"' : '' }}>
+ <form action="{{ @myurl }}" method="post">
+ <input type="hidden" name="checked" value="{{ @it.checked ? 'n' : 'y' }}" />
+ <button type="submit" name="action" value="setchecked" class="chkbtn {{ @it.checked ? 'checked' : '' }}"><input type="checkbox" name="checked_now" disabled="disabled" {{ @it.checked ? 'checked="checked"' : '' }} value="y" /></button>
+
+ <span class="txt">{{ @it.text }}</span>
+
+ <input type="hidden" name="id" value="{{ @it.id }}" />
+ <span class="btncluster">
+ <button type="submit" name="action" value="moveup" title="Move up">↑</button>
+ <button type="submit" name="action" value="movedown" title="Move down">↓</button>
+ <button type="submit" name="action" value="delitem" title="Delete">X</button>
+ </span>
+ </form>
+ </li>
+ </repeat>
+ </ul>
+ <div class="delchecked">
+ <form action="{{ @myurl }}" method="post">
+ <button type="submit" name="action" value="delchecked">Delete checked items</button>
+ </form>
+ </div>
+ </false>
+</check>
+
+<div class="additem">
+ <form action="{{ @myurl }}/" method="post">
+ <input type="hidden" name="action" value="additem" />
+ <input type="text" name="itemtext" />
+ <button type="submit" title="Add item">+</button>
+ </form>
+</div> \ No newline at end of file