summaryrefslogtreecommitdiffstats
path: root/core/src/OC/contactsmenu/contact.handlebars
blob: 483cb3e93d59f545c8e6dd95ed01d1b9f87b4a0b (plain)
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
{{#if contact.avatar}}
	{{#if contact.profileUrl}}
		{{#if contact.profileTitle}}
			<a class="profile-link--avatar" href="{{contact.profileUrl}}">
				<img src="{{contact.avatar}}&size=32" class="avatar" srcset="{{contact.avatar}}&size=32 1x, {{contact.avatar}}&size=64 2x, {{contact.avatar}}&size=128 4x" alt="{{contact.avatarLabel}}">
			</a>
		{{/if}}
	{{else}}
		<img src="{{contact.avatar}}&size=32" class="avatar" srcset="{{contact.avatar}}&size=32 1x, {{contact.avatar}}&size=64 2x, {{contact.avatar}}&size=128 4x" alt="{{contact.avatarLabel}}">
	{{/if}}
{{else}}
	{{#if contact.profileUrl}}
		{{#if contact.profileTitle}}
			<a class="profile-link--avatar" href="{{contact.profileUrl}}">
				<div class="avatar"></div>
			</a>
		{{/if}}
	{{else}}
		<div class="avatar"></div>
	{{/if}}
{{/if}}
{{#if contact.profileUrl}}
	{{#if contact.profileTitle}}
		<a class="body profile-link--full-name" href="{{contact.profileUrl}}">
			<div class="full-name">{{contact.fullName}}</div>
			<div class="last-message">{{contact.lastMessage}}</div>
			<div class="email-address">{{contact.emailAddresses}}</div>
		</a>
	{{/if}}
	{{#if contact.topAction}}
		<a class="top-action" href="{{contact.topAction.hyperlink}}" title="{{contact.topAction.title}}">
			<img src="{{contact.topAction.icon}}" alt="{{contact.topAction.title}}">
		</a>
	{{/if}}
{{else if contact.topAction}}
	<a class="body" href="{{contact.topAction.hyperlink}}">
		<div class="full-name">{{contact.fullName}}</div>
		<div class="last-message">{{contact.lastMessage}}</div>
		<div class="email-address">{{contact.emailAddresses}}</div>
	</a>
  	<a class="top-action" href="{{contact.topAction.hyperlink}}" title="{{contact.topAction.title}}">
  		<img src="{{contact.topAction.icon}}" alt="{{contact.topAction.title}}">
	</a>
{{else}}
	<div class="body">
		<div class="full-name">{{contact.fullName}}</div>
		<div class="last-message">{{contact.lastMessage}}</div>
		<div class="email-address">{{contact.emailAddresses}}</div>
	</div>
{{/if}}
{{#if contact.hasTwoActions}}
<a class="second-action" href="{{contact.secondAction.hyperlink}}" title="{{contact.secondAction.title}}">
	<img src="{{contact.secondAction.icon}}" alt="{{contact.secondAction.title}}">
</a>
{{/if}}
{{#if contact.hasManyActions}}
	<button class="other-actions icon-more"></button>
	<div class="menu popovermenu">
		<ul>
			{{#each contact.actions}}
			<li>
				<a href="{{hyperlink}}">
					<img src="{{icon}}" alt="">
					<span>{{title}}</span>
				</a>
			</li>
			{{/each}}
		</ul>
	</div>
{{/if}}