<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="/style.css">
  <title>{{user.name}}</title>
</head>
<body>
<h1>{{user.name}} <a href="/user/{{user.id}}/edit">edit</a></h1>

{{#if hasMessages}}
  <ul>
    {{#each messages}}
      <li>{{this}}</li>
    {{/each}}
  </ul>
{{/if}}

{{#if user.pets.length}}
  <p>View {{user.name}}'s pets:</p>
  <ul>
    {{#each user.pets}}
      <li><a href="/pet/{{id}}">{{name}}</a></li>
    {{/each}}
  </ul>
{{else}}
  <p>No pets!</p>
{{/if}}
</body>
</html>
