mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
UX: show pending invites tab by default
This commit is contained in:
parent
df8d47bdb6
commit
d2867aa138
@ -1,5 +1,5 @@
|
||||
export default Discourse.Route.extend({
|
||||
beforeModel: function() {
|
||||
this.replaceWith('userInvited.show', 'redeemed');
|
||||
this.replaceWith('userInvited.show', 'pending');
|
||||
}
|
||||
});
|
||||
|
@ -8,6 +8,12 @@ export default Discourse.Route.extend(ShowFooter, {
|
||||
return Discourse.Invite.findInvitedBy(this.modelFor('user'), params.filter);
|
||||
},
|
||||
|
||||
afterModel: function(model) {
|
||||
if (!model.can_see_invite_details) {
|
||||
this.replaceWith('userInvited.show', 'redeemed');
|
||||
}
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
controller.setProperties({
|
||||
model: model,
|
||||
|
@ -6,8 +6,8 @@
|
||||
<div class='user-invite-controls'>
|
||||
<div class='span15'>
|
||||
<ul class="nav nav-pills">
|
||||
{{nav-item route='userInvited.show' routeParam='redeemed' label='user.invited.redeemed_tab'}}
|
||||
{{nav-item route='userInvited.show' routeParam='pending' label='user.invited.pending_tab'}}
|
||||
{{nav-item route='userInvited.show' routeParam='redeemed' label='user.invited.redeemed_tab'}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user