1234567891011121314151617181920212223242526272829303132333435363738 |
- {{ define "index.gohtml" }}
- {{block "content" . }}
- <form action="/contacts" method="get" class="tool-bar">
- <label for="search">Search Term</label>
- <input id="search" type="search" name="q" value="{{ .search }}"/>
- <input type="submit" value="Search"/>
- </form>
- <table>
- <thead>
- <tr>
- <th>First</th>
- <th>Last</th>
- <th>Phone</th>
- <th>Email</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- {{ range .contacts }}
- <tr>
- <td>{{ .First }}</td>
- <td>{{ .Last }}</td>
- <td>{{ .Phone }}</td>
- <td>{{ .Email }}</td>
- <td><a href="/contacts/{{ .ID }}/edit">Edit</a>
- <a href="/contacts/{{ .ID }}">View</a></td>
- </tr>
- {{ else }}
- <tr>
- <td>No contacts founds.</td>
- </tr>
- {{ end }}
- </tbody>
- </table>
- <p><a href="/contacts/new">Add Contact</a></p>
- {{ end}}
- {{ end }}
|