<!--
  ~ Copyright 2015 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<div ng-app="my_app">

    <div class="container-fluid" ng-controller="TodoCtrl">
        <div class="row">
            <div class="col-md-12">
                <p class="pull-right" style="margin-top: 10px;">{{remaining()}} of {{todos.length}} remaining [
                    <a href="" ng-click="archive()">archive</a> ]
                </p>
                <h4>Todos</h4>
                <ul class="list-group">
                    <li class="list-group-item" ng-repeat="todo in todos">
                        <span class="done-{{todo.done}}">{{todo.text}}</span>
                        <input class="pull-right" type="checkbox" ng-model="todo.done">
                    </li>
                </ul>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <form class="form-inline" ng-submit="goto()">
                    <div class="form-group">
                        <input type="text" ng-model="placeText" size="30" class="form-control"
                               placeholder="place to go">
                        <input class="btn btn-primary" type="submit" value="GoTo">
                    </div>
                </form>
            </div>
            <div class="col-md-6">
                <form class="form-inline pull-right" ng-submit="addTodo()">
                    <div class="form-group">
                        <input type="text" ng-model="todoText" size="30" class="form-control"
                               placeholder="add new todo here">
                        <input class="btn btn-primary" type="submit" value="Add">
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
