|
19 | 19 | <tr> |
20 | 20 | <th>{{t 'User (Email)'}}</th> |
21 | 21 | <th>{{t 'Role'}}</th> |
22 | | - {{#if (and @editable (eq this.roleType 'pending'))}} |
| 22 | + {{#if @editable}} |
23 | 23 | <th>{{t 'Options'}}</th> |
24 | 24 | {{/if}} |
25 | 25 | </tr> |
26 | 26 | </thead> |
27 | 27 | <tbody> |
28 | | - {{#each this.roleInvites as |roleInvite|}} |
29 | | - <tr> |
30 | | - <td>{{roleInvite.email}}</td> |
31 | | - <td>{{t-var roleInvite.role.titleName}}</td> |
32 | | - {{#if (and @editable (eq this.roleType 'pending'))}} |
33 | | - <td> |
34 | | - <div class="ui horizontal compact basic buttons"> |
35 | | - {{#if (eq this.roleType 'accepted')}} |
36 | | - <UiPopup |
37 | | - @content={{t "Delete"}} |
38 | | - @class="ui icon button" |
39 | | - @click={{action (confirm (t "Are you sure you would like to delete this role?") (action "deleteUserRole" roleInvite))}}> |
40 | | - <i class="trash icon"></i> |
41 | | - </UiPopup> |
42 | | - {{else}} |
43 | | - <UiPopup |
44 | | - @content={{t "Delete"}} |
45 | | - @class="ui icon button" |
46 | | - @click={{action (confirm (t "Are you sure you would like to cancel this invite?") (action "deleteUserRole" roleInvite))}}> |
47 | | - <i class="trash icon"></i> |
48 | | - </UiPopup> |
49 | | - {{/if}} |
50 | | - {{#if (eq this.roleType 'pending')}} |
51 | | - <UiPopup |
52 | | - @content={{t "Resend invite"}} |
53 | | - @click={{action "resendInvite" roleInvite}} |
54 | | - @class="ui icon button" |
55 | | - @position="top center"> |
56 | | - <i class="mail outline icon"></i> |
57 | | - </UiPopup> |
58 | | - {{/if}} |
59 | | - </div> |
60 | | - </td> |
61 | | - {{/if}} |
62 | | - </tr> |
| 28 | + {{#if (eq this.roleType 'pending')}} |
| 29 | + {{#each this.roleInvites as |roleInvite|}} |
| 30 | + <tr> |
| 31 | + <td>{{roleInvite.email}}</td> |
| 32 | + <td>{{t-var roleInvite.role.titleName}}</td> |
| 33 | + {{#if (and @editable (eq this.roleType 'pending'))}} |
| 34 | + <td> |
| 35 | + <div class="ui horizontal compact basic buttons"> |
| 36 | + <UiPopup |
| 37 | + @content={{t "Delete"}} |
| 38 | + @class="ui icon button" |
| 39 | + @click={{action (confirm (t "Are you sure you would like to cancel this invite?") (action "deleteUserRole" roleInvite))}}> |
| 40 | + <i class="trash icon"></i> |
| 41 | + </UiPopup> |
| 42 | + <UiPopup |
| 43 | + @content={{t "Resend invite"}} |
| 44 | + @click={{action "resendInvite" roleInvite}} |
| 45 | + @class="ui icon button" |
| 46 | + @position="top center"> |
| 47 | + <i class="mail outline icon"></i> |
| 48 | + </UiPopup> |
| 49 | + </div> |
| 50 | + </td> |
| 51 | + {{/if}} |
| 52 | + </tr> |
| 53 | + {{else}} |
| 54 | + <div class="ui basic segment"> |
| 55 | + {{t 'No records to show'}} |
| 56 | + </div> |
| 57 | + {{/each}} |
63 | 58 | {{else}} |
64 | | - <div class="ui basic segment"> |
65 | | - {{t 'No records to show'}} |
66 | | - </div> |
67 | | - {{/each}} |
| 59 | + {{#each this.data.usersEventsRoles as |eventRole|}} |
| 60 | + <tr> |
| 61 | + <td>{{eventRole.user.email}}</td> |
| 62 | + <td>{{eventRole.role.titleName}}</td> |
| 63 | + {{#if (and @editable (not-eq eventRole.role.name 'owner'))}} |
| 64 | + <td> |
| 65 | + <div class="ui horizontal compact basic buttons"> |
| 66 | + <UiPopup |
| 67 | + @content={{t "Delete"}} |
| 68 | + @class="ui icon button" |
| 69 | + @click={{action (confirm (t "Are you sure you would like to delete this role?") (action "deleteUserRole" eventRole))}}> |
| 70 | + <i class="trash icon"></i> |
| 71 | + </UiPopup> |
| 72 | + </div> |
| 73 | + </td> |
| 74 | + {{/if}} |
| 75 | + </tr> |
| 76 | + {{/each}} |
| 77 | + {{/if}} |
68 | 78 | </tbody> |
69 | 79 | </table> |
70 | 80 | </div> |
|
0 commit comments