2014-07-06 15:10:28 -04:00
|
|
|
extends /templates/kinds/user
|
2014-07-07 09:03:28 -04:00
|
|
|
|
|
|
|
block append content
|
2014-07-30 16:23:43 -04:00
|
|
|
.btn-group.pull-right
|
2014-08-12 12:26:54 -04:00
|
|
|
button#grid-layout-button.btn.btn-default(data-layout='grid', class=activeLayout==='grid' ? 'active' : '')
|
|
|
|
i.glyphicon.glyphicon-th
|
|
|
|
button#table-layout-button.btn.btn-default(data-layout='table', class=activeLayout==='table' ? 'active' : '')
|
|
|
|
i.glyphicon.glyphicon-th-list
|
2014-07-30 16:23:43 -04:00
|
|
|
if achievementsByCategory
|
|
|
|
if activeLayout === 'grid'
|
|
|
|
.grid-layout
|
|
|
|
each achievements, category in achievementsByCategory
|
|
|
|
.row
|
2014-11-13 12:02:32 -05:00
|
|
|
h2.achievement-category-title(data-i18n="achievements.category_#{category}")=category
|
2014-07-30 16:23:43 -04:00
|
|
|
each achievement, index in achievements
|
2014-08-12 11:59:33 -04:00
|
|
|
- var title = achievement.i18nName();
|
|
|
|
- var description = achievement.i18nDescription();
|
2014-07-30 16:23:43 -04:00
|
|
|
- var locked = ! achievement.get('unlocked');
|
2014-08-11 08:11:26 -04:00
|
|
|
- var style = achievement.getStyle()
|
2014-08-04 09:26:21 -04:00
|
|
|
- var imgURL = achievement.getImageURL();
|
|
|
|
if locked
|
|
|
|
- var imgURL = achievement.getLockedImageURL();
|
|
|
|
else
|
|
|
|
- var imgURL = achievement.getImageURL();
|
2014-07-30 16:23:43 -04:00
|
|
|
.col-lg-4.col-xs-12
|
2014-08-11 08:11:26 -04:00
|
|
|
include ../achievements/achievement-popup
|
2014-07-30 16:23:43 -04:00
|
|
|
else if activeLayout === 'table'
|
|
|
|
.table-layout
|
|
|
|
if earnedAchievements.length
|
|
|
|
table.table
|
|
|
|
tr
|
2014-08-12 07:41:14 -04:00
|
|
|
th(data-i18n="general.name") Name
|
|
|
|
th(data-i18n="general.description") Description
|
|
|
|
th(data-i18n="general.date") Date
|
|
|
|
th(data-i18n="achievements.amount_achieved") Amount
|
2014-07-30 16:23:43 -04:00
|
|
|
th XP
|
2014-08-07 16:03:00 -04:00
|
|
|
each earnedAchievement in earnedAchievements.models
|
2014-07-30 16:23:43 -04:00
|
|
|
- var achievement = earnedAchievement.get('achievement');
|
2014-10-17 18:25:31 -04:00
|
|
|
if achievement.get('category')
|
|
|
|
// No level-specific achievements in here.
|
|
|
|
tr
|
|
|
|
td= achievement.i18nName()
|
|
|
|
td= achievement.i18nDescription()
|
|
|
|
td= moment().format("MMMM Do YYYY", earnedAchievement.get('changed'))
|
|
|
|
if achievement.isRepeatable()
|
|
|
|
td= earnedAchievement.get('achievedAmount')
|
|
|
|
else
|
|
|
|
td
|
|
|
|
td= earnedAchievement.get('earnedPoints')
|
2014-07-30 16:23:43 -04:00
|
|
|
else
|
|
|
|
.panel#no-achievements
|
2014-08-12 07:41:14 -04:00
|
|
|
.panel-body(data-i18n="user.no_achievements") No achievements earned yet.
|
2014-07-30 16:23:43 -04:00
|
|
|
else
|
|
|
|
div How did you even do that?
|