[#1829] sort challenge-box by creation date

This commit is contained in:
Tyler Renelle 2013-11-15 21:32:25 -08:00
parent b9d3b3a1a7
commit 4fa4519b34
2 changed files with 9 additions and 3 deletions

View file

@ -33,7 +33,11 @@ var populateQuery = function(type, q){
else
q.populate(guildPopulate);
q.populate('invites', nameFields);
q.populate('challenges', challengeFields);
q.populate({
path: 'challenges',
select: challengeFields,
options: {sort: [['timestamp',-1]]}
});
return q;
}

View file

@ -113,8 +113,10 @@ script(type='text/ng-template', id='partials/options.social.challenges.html')
.accordion-group(ng-repeat='challenge in challenges|filter:filterChallenges')
.accordion-heading
ul.pull-right.challenge-accordion-header-specs
li.
{{challenge.group.name}} (by <span class='badge'>{{challenge.leader.profile.name}}</span>)
li {{challenge.group.name}}
li
| by&nbsp;
strong {{challenge.leader.profile.name}}
li {{challenge.memberCount}} Participants
li(ng-show='challenge.prize')
// prize