aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/address-book.html
blob: 1e4c4416293b4cf1ced86a92c510265e7a22c3e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{{template "head.html" .}}
{{template "nav.html" .}}

<div class="page-wrap">
  <aside>
    <a href="/contacts/create" class="new">New contact</a>
    <!-- TODO: fetch list of address books -->
    <a href="#" class="active">{{.AddressBook.Name}}</a>
    <a href="#">Personal</a>
  </aside>

  <div class="container">
    <form id="address-book-form" method="post"></form>
    <main class="contact-list">
      <section class="actions">
        {{ template "contacts-header.html" . }}
      </section>

      <section class="contacts">
        <div class="contact-grid">
          {{range .AddressObjects}}
          <div class="contact-list-checkbox">
            <input type="checkbox" name="paths" value="{{.Path}}" form="address-book-form">
          </div>
          <div class="contact-list-name">
            <a href="{{.URL}}">
              {{.Card.Value "FN"}}
            </a>
          </div>
          <div class="contact-list-email">
            {{$email := .Card.PreferredValue "EMAIL"}}
            {{if $email}}
              <a href="/compose?to={{$email}}">{{$email}}</a>
            {{end}}
          </div>
          {{end}}
          {{if not .AddressObjects}}
          <p class="empty-list">Nothing here yet.</p>
          {{end}}
        </div>
      </section>

      <section class="actions">
        {{ template "contacts-header.html" . }}
      </section>
    </main>
  </div>
</div>

{{template "foot.html"}}