invitations: Display expiration times in settings > invitations.

Fixes #19680.
This commit is contained in:
Johan Ehinger 2021-10-04 12:47:03 +02:00 committed by Tim Abbott
parent 58b19761b8
commit bac64070c1
3 changed files with 5 additions and 1 deletions

View File

@ -58,11 +58,11 @@ function populate_invites(invites_data) {
add_invited_as_text(invites_data.invites); add_invited_as_text(invites_data.invites);
const invites_table = $("#admin_invites_table").expectOne(); const invites_table = $("#admin_invites_table").expectOne();
ListWidget.create(invites_table, invites_data.invites, { ListWidget.create(invites_table, invites_data.invites, {
name: "admin_invites_list", name: "admin_invites_list",
modifier(item) { modifier(item) {
item.invited_absolute_time = timerender.absolute_time(item.invited * 1000); item.invited_absolute_time = timerender.absolute_time(item.invited * 1000);
item.expiry_date_absolute_time = timerender.absolute_time(item.expiry_date * 1000);
item.is_admin = page_params.is_admin; item.is_admin = page_params.is_admin;
item.disable_buttons = item.disable_buttons =
item.invited_as === settings_config.user_role_values.owner.code && item.invited_as === settings_config.user_role_values.owner.code &&

View File

@ -21,6 +21,9 @@
<td> <td>
<span class="invited_at">{{invited_absolute_time}}</span> <span class="invited_at">{{invited_absolute_time}}</span>
</td> </td>
<td>
<span class="expires_at">{{expiry_date_absolute_time}}</span>
</td>
<td> <td>
<span>{{invited_as_text}}</span> <span>{{invited_as_text}}</span>
</td> </td>

View File

@ -20,6 +20,7 @@
<th data-sort="alphabetic" data-sort-prop="ref">{{t "Invited by" }}</th> <th data-sort="alphabetic" data-sort-prop="ref">{{t "Invited by" }}</th>
{{/if}} {{/if}}
<th data-sort="numeric" data-sort-prop="invited">{{t "Invited at" }}</th> <th data-sort="numeric" data-sort-prop="invited">{{t "Invited at" }}</th>
<th data-sort="numeric" data-sort-prop="expires_at">{{t "Expires at" }}</th>
<th data-sort="numeric" data-sort-prop="invited_as">{{t "Invited as" }}</th> <th data-sort="numeric" data-sort-prop="invited_as">{{t "Invited as" }}</th>
<th class="actions">{{t "Actions" }}</th> <th class="actions">{{t "Actions" }}</th>
</thead> </thead>