-
Notifications
You must be signed in to change notification settings - Fork 642
/
Copy pathpending-owner-invite-row.hbs
34 lines (34 loc) · 1.32 KB
/
pending-owner-invite-row.hbs
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
{{#if this.isAccepted }}
<p data-test-accepted-message ...attributes>
Success! You've been added as an owner of crate
<LinkTo @route="crate" @model={{@invite.crate_name}}>{{@invite.crate_name}}</LinkTo>.
</p>
{{else if this.isDeclined}}
<p data-test-declined-message ...attributes>
Declined. You have not been added as an owner of crate
<LinkTo @route="crate" @model={{@invite.crate_name}}>{{@invite.crate_name}}</LinkTo>.
</p>
{{else}}
<div local-class="row" ...attributes>
<div local-class="crate-column">
<h3>
<LinkTo @route="crate" @model={{@invite.crate_name}} data-test-crate-link>
{{@invite.crate_name}}
</LinkTo>
</h3>
</div>
<div>
Invited by:
<LinkTo @route="user" @model={{@invite.inviter.username}} data-test-inviter-link>
{{@invite.inviter.username}}
</LinkTo>
</div>
<div local-class="date-column" data-test-date>
{{date-format-distance-to-now @invite.created_at addSuffix=true}}
</div>
<div>
<button type="button" local-class="accept-button" data-test-accept-button {{on "click" (perform this.acceptInvitationTask)}}>Accept</button>
<button type="button" local-class="decline-button" data-test-decline-button {{on "click" (perform this.declineInvitationTask)}}>Decline</button>
</div>
</div>
{{/if}}