public
Description: Address Book tool
Homepage: http://addressbooker.appspot.com/
Clone URL: git://github.com/bradfitz/addressbooker.git
addressbooker / google-merge.html
100644 75 lines (64 sloc) 1.775 kb
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{% if preview_mode %}
 
  <form method='POST' style='margin-top: 1em' id='submitform'>
    <center><input type='submit' value='Do it.' style='font-size: 30pt;' /></center>
  </form>
 
{% if working %}
  <b>Updating...</b> {{ n_changes }} remain. Please wait.
<script>
document.getElementById("submitform").submit();
</script>
{% else %}
  <b>Preview mode.</b> See if the <b>{{ n_changes }}</b> changes below look good. If so, press the button:</p>
{% endif %}
 
<center>
<table cellpadding='5' border='3' style='margin-top: 2em'>
<tr>
<td colspan='2'><b>Submitted Contact</b></td>
<td><b>Action</b></td>
<td><b>
   {% if preview_mode %}Proposed {% endif %}Changes
</b></td>
</tr>
{% for change in changes %}
  <tr>
  <td>
    {% if change.contact.img %}
      {% ifnotequal change.action "none" %}
        <div class='image'><img src="{{ change.contact.img|escape }}" /></div>
      {% endifnotequal %}
    {% endif %}
  </td>
  <td>
    <div class='name'>{{ change.contact.name|escape }}</div>
    {% for number in change.contact.numbers %}
       <div class='number'>
           <i>{{ number.type|escape }}</i> {{ number.number|escape }}
       </div>
    {% endfor %}
  </td>
 
  <td>{{ change.action }}
   {% if change.merge_target %}
      into <i>{{ change.merge_target|escape }}</i>
   {% endif %}
  </td>
 
  <td>
    <ul>
     {% for change in change.changes %}
       <li>{{ change|escape }}</li>
     {% endfor %}
    </ul>
  </td>
 
  </tr>
{% endfor %}
</table>
</center>
 
{% else %}
 
<p>All done! You can <a href='gcontacts?key={{ key|urlencode }}'>go
back</a> and verify the delta is now zero. Or go check out <a
href="http://www.google.com/contacts">your Google Contacts</a>.</p>
 
  {% endif %}
 
{% if body %}
<hr>
<h1>Misc output:</h1>
{{ body }}
{% endif %}