Source

ytl / templates / base.html

Full commit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>{{ title }}</title>
  <link rel="stylesheet" href="/static/css/bootstrap.css" />
  <link rel="stylesheet" href="/static/css/base.css" />
  <script type="text/javascript" src="/static/js/jquery.min.js"></script>
  <script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="/static/js/knockout.min.js"></script>
  <script type="text/javascript" src="/static/js/base.js"></script>
  <script type="text/javascript">
  window.ytl = {'apiURL': '{{ uri_for('api', _full=True)[0:-1] }}' };
  </script>
</head>
<body>
<h2>Yhteystietolista</h2>
<div class="alert">
  <a class="btn btn-primary" href="{{ uri_for('test') }}">Generate test data</a>
</div>
<h3>Keski-Suomen keskussairaala</h3>

<form action="{{ uri_for('api-contact-add') }}" method="post">
<table class="table table-striped">
  <thead>
    <tr>
      <th>#</th>
      <th>Etunimi2</th>
      <th>Sukunimi</th>
      <th>Sukunimi</th>
    </tr>
  </thead>
  <tbody data-bind="foreach: contacts">
    <tr class="view" data-bind="visible: $data != $root.currentContact()">
      <td data-bind="text: $index"></td>
      <td data-bind="text: firstName"></td>
      <td data-bind="text: lastName"></td>
      <td><button class="btn btn-primary" data-bind="click: $parent.editContact, attr: {name: id}">Muokkaa</button></td>
    </tr>
    <tr class="edit" data-bind="visible: $data == $root.currentContact()">
      <td data-bind="text: $index"></td>
      <td>
        <input data-bind="value: firstName" />
      </td>
      <td>
        <input data-bind="value: lastName" />
      </td>
      <td>
          <!--textarea name="contact" data-bind="value: ko.toJSON($data)"></textarea-->
          <button class="btn btn-danger" name="save" data-bind="click: $root.saveContact">Tallenna</button>
          <button class="btn btn-inverse" name="cancel" data-bind="click: $root.cancelContactEdit">Peruuta</button>
      </td>
    </tr>
  </tbody>
</table>
</form>
</body>
</html>