mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1829] sort by timestamp, show group & creator in challenge header
This commit is contained in:
@@ -35,8 +35,10 @@ api.list = function(req, res) {
|
||||
{group: 'habitrpg'} // public group
|
||||
]
|
||||
})
|
||||
.select('name description group members prize')
|
||||
.select('name leader description group members prize')
|
||||
.populate('group', '_id name')
|
||||
.populate('leader', 'profile.name')
|
||||
.sort('-timestamp')
|
||||
.exec(cb);
|
||||
}
|
||||
], function(err, challenges){
|
||||
|
||||
@@ -113,6 +113,8 @@ 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.memberCount}} Participants
|
||||
li(ng-show='challenge.prize')
|
||||
// prize
|
||||
|
||||
Reference in New Issue
Block a user