mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-02 07:49:39 +00:00
[#1829] sort by timestamp, show group & creator in challenge header
This commit is contained in:
parent
9d18e9efd0
commit
460afb7763
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue