<section id="todoapp">
    <header id="header">
        <h1>todos</h1>
        {{input id="new-todo" type="text" value=newTitle action="createTodo" placeholder="What needs to be done?"}}
    </header>
    {{#if length}}
        <section id="main">
            <ul id="todo-list">
                {{#each filteredTodos itemController="todo"}}
                    <li {{bind-attr class="isCompleted:completed isEditing:editing"}}>
                        {{#if isEditing}}
                            {{edit-todo class="edit" value=bufferedTitle focus-out="doneEditing" insert-newline="doneEditing" escape-press="cancelEditing"}}
                        {{else}}
                            {{input type="checkbox" class="toggle" checked=isCompleted}}
                            <label {{action "editTodo" on="doubleClick"}}>{{title}}</label>
                            <button {{action "removeTodo"}} class="destroy"></button>
                        {{/if}}
                    </li>
                {{/each}}
            </ul>
            {{input type="checkbox" id="toggle-all" checked=allAreDone}}
        </section>
        <footer id="footer">
            <span id="todo-count"><strong>{{remaining.length}}</strong> {{pluralize 'item' remaining.length}} left</span>
            <ul id="filters">
                <li>
                    {{#link-to "todos.index" activeClass="selected"}}All{{/link-to}}
                </li>
                <li>
                    {{#link-to "todos.active" activeClass="selected"}}Active{{/link-to}}
                </li>
                <li>
                    {{#link-to "todos.completed" activeClass="selected"}}Completed{{/link-to}}
                </li>
            </ul>
            {{#if completed.length}}
                <button id="clear-completed" {{action "clearCompleted"}}>
                    Clear completed ({{completed.length}})
                </button>
            {{/if}}
        </footer>
    {{/if}}
</section>
<footer id="info">
    <p>Double-click to edit a todo</p>
    <p>
        Created by
        <a href="http://github.com/tomdale">Tom Dale</a>,
        <a href="http://github.com/addyosmani">Addy Osmani</a>
    </p>
    <p>
        Updated by
        <a href="http://github.com/bantic">Cory Forsyth</a>,
        <a href="http://github.com/azproduction">Mikhail Davydov</a>
    </p>
    <p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>