Vinay Jose commited on
Commit
7d41d4b
·
unverified ·
1 Parent(s): c6e4af7

Create index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +36 -0
templates/index.html ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends 'layout.html' %}
2
+
3
+ {% block content %}
4
+
5
+ <form action="/contacts" method="get" class="tool-bar">
6
+ <label for="search">Search Term</label>
7
+ <input id="search" type="search" name="q"
8
+ value="{{ request.args.get('q') or '' }}"/>
9
+ <input type="submit" value="Search"/>
10
+ </form>
11
+ <table>
12
+ <thead>
13
+ <tr>
14
+ <th>First name <th>Last name <th>Phone <th>Email </th>
15
+ </tr>
16
+ </thead>
17
+ <tbody>
18
+ {% for contact in contacts %}
19
+ <tr>
20
+ <td>{{ contact.first }}</td>
21
+ <td>{{ contact.last }}</td>
22
+ <td>{{ contact.phone }}</td>
23
+ <td>{{ contact.email }}</td>
24
+ <td>
25
+ <a href="contacts/{{ contact.id }}/edit">Edit</a>
26
+ <a href="contacts/{{ contact.id }}">View</a>
27
+ </td>
28
+ </tr>
29
+ {% endfor %}
30
+ </tbody>
31
+ </table>
32
+ <p>
33
+ <a href="/contacts/new">Add New Contact</a>
34
+ </p>
35
+
36
+ {% endblock %}