2014-07-15 10:15:21 -04:00
|
|
|
extends /templates/kinds/user
|
|
|
|
|
|
|
|
block append content
|
2014-07-21 16:02:08 -04:00
|
|
|
if user
|
2014-07-22 06:14:21 -04:00
|
|
|
.vertical-buffer
|
|
|
|
.row
|
|
|
|
.left-column
|
2014-07-22 15:45:36 -04:00
|
|
|
.profile-wrapper
|
2014-07-22 06:14:21 -04:00
|
|
|
img.picture(src="#{me.getPhotoURL(150)}" alt="")
|
2014-07-29 14:11:45 -04:00
|
|
|
div.profile-info
|
|
|
|
h3.name= user.get('name')
|
|
|
|
if favoriteLanguage
|
|
|
|
div.extra-info Favorite language is
|
|
|
|
strong.spl.spr= favoriteLanguage
|
2014-07-22 15:45:36 -04:00
|
|
|
.btn-group-vertical.profile-menu
|
2014-08-07 16:03:00 -04:00
|
|
|
a.btn.btn-default(href="/user/#{user.getSlugOrID()}/profile")
|
2014-07-22 15:45:36 -04:00
|
|
|
i.glyphicon.glyphicon-briefcase
|
|
|
|
span Job Profile
|
2014-08-07 16:03:00 -04:00
|
|
|
a.btn.btn-default(href="/user/#{user.getSlugOrID()}/stats")
|
|
|
|
i.glyphicon.glyphicon-certificate
|
|
|
|
span Stats
|
2014-07-28 14:04:44 -04:00
|
|
|
a.btn.btn-default.disabled(href="#")
|
2014-07-22 15:45:36 -04:00
|
|
|
i.glyphicon.glyphicon-pencil
|
|
|
|
span Code
|
2014-07-22 06:14:21 -04:00
|
|
|
- var emails = user.get('emails')
|
|
|
|
if emails
|
|
|
|
ul.contributor-categories
|
|
|
|
//li.contributor-category
|
|
|
|
img.contributor-image(src="/images/pages/user/general.png")
|
|
|
|
h4.contributor-title CodeCombateer
|
|
|
|
if emails.adventurerNews
|
|
|
|
li.contributor-category
|
|
|
|
img.contributor-image(src="/images/pages/user/adventurer.png")
|
|
|
|
h4.contributor-title
|
|
|
|
a(href="/contribute#adventurer") Adventurer
|
|
|
|
if emails.ambassadorNews
|
|
|
|
li.contributor-category
|
|
|
|
img.contributor-image(src="/images/pages/user/ambassador.png")
|
|
|
|
h4.contributor-title
|
|
|
|
a(href="/contribute#ambassador") Ambassador
|
|
|
|
if emails.archmageNews
|
|
|
|
li.contributor-category
|
|
|
|
img.contributor-image(src="/images/pages/user/archmage.png")
|
|
|
|
h4.contributor-title
|
|
|
|
a(href="/contribute#archmage") Archmage
|
|
|
|
if emails.artisanNews
|
|
|
|
li.contributor-category
|
|
|
|
img.contributor-image(src="/images/pages/user/artisan.png")
|
|
|
|
h4.contributor-title
|
|
|
|
a(href="/contribute#artisan") Artisan
|
|
|
|
if emails.scribeNews
|
|
|
|
li.contributor-category
|
|
|
|
img.contributor-image(src="/images/pages/user/scribe.png")
|
|
|
|
h4.contributor-title
|
|
|
|
a(href="/contribute#scribe") Scribe
|
|
|
|
|
|
|
|
.right-column
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
2014-07-29 14:11:45 -04:00
|
|
|
h3.panel-title Singleplayer Levels
|
|
|
|
if (!singlePlayerSessions)
|
|
|
|
.panel-body
|
2014-07-29 10:50:07 -04:00
|
|
|
p Loading...
|
2014-07-29 14:11:45 -04:00
|
|
|
else if (singlePlayerSessions.length)
|
|
|
|
table.table
|
|
|
|
tr
|
2014-08-07 16:03:00 -04:00
|
|
|
th.col-xs-4 Level
|
|
|
|
th.col-xs-4 Last Played
|
|
|
|
th.col-xs-4 Status
|
2014-07-29 14:11:45 -04:00
|
|
|
each session in singlePlayerSessions
|
2014-08-03 17:58:51 -04:00
|
|
|
if session.get('levelName')
|
|
|
|
tr
|
|
|
|
td
|
2014-07-29 14:11:45 -04:00
|
|
|
a(href="/play/level/#{session.get('levelID')}")= session.get('levelName')
|
2014-08-03 17:58:51 -04:00
|
|
|
td= moment(session.get('changed')).fromNow()
|
|
|
|
if session.get('state').complete === true
|
|
|
|
td Completed
|
|
|
|
else
|
|
|
|
td Unfinished
|
2014-07-29 14:11:45 -04:00
|
|
|
else
|
|
|
|
.panel-body
|
|
|
|
p No Singleplayer games played yet.
|
2014-07-22 06:14:21 -04:00
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
2014-07-29 14:11:45 -04:00
|
|
|
h3.panel-title Multiplayer Levels
|
|
|
|
if (!multiPlayerSessions)
|
|
|
|
.panel-body
|
|
|
|
p Loading...
|
|
|
|
else if (multiPlayerSessions.length)
|
|
|
|
table.table
|
|
|
|
tr
|
2014-08-07 16:03:00 -04:00
|
|
|
th.col-xs-4 Level
|
|
|
|
th.col-xs-4 Last Played
|
|
|
|
th.col-xs-4 Score
|
2014-07-29 14:11:45 -04:00
|
|
|
each session in multiPlayerSessions
|
|
|
|
tr
|
|
|
|
td
|
2014-08-07 16:03:00 -04:00
|
|
|
- var posturl = ''
|
|
|
|
- if (session.get('team')) posturl = '?team=' + session.get('team')
|
|
|
|
a(href="/play/level/#{session.get('levelID') + posturl}")= session.get('levelName') + (session.get('team') ? ' (' + session.get('team') + ')' : '')
|
2014-07-29 14:11:45 -04:00
|
|
|
td= moment(session.get('changed')).fromNow()
|
2014-08-07 16:03:00 -04:00
|
|
|
if session.get('totalScore')
|
|
|
|
td= session.get('totalScore') * 100
|
|
|
|
else
|
|
|
|
td Unfinished
|
2014-07-29 14:11:45 -04:00
|
|
|
else
|
|
|
|
.panel-body
|
|
|
|
p No Multiplayer games played yet.
|
2014-08-07 16:03:00 -04:00
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
h3.panel-title Achievements
|
|
|
|
if ! earnedAchievements
|
|
|
|
.panel-body
|
|
|
|
p Loading...
|
|
|
|
else if ! earnedAchievements.length
|
|
|
|
.panel-body
|
|
|
|
p No achievements earned so far.
|
|
|
|
else
|
|
|
|
table.table
|
|
|
|
tr
|
|
|
|
th.col-xs-4 Achievement
|
|
|
|
th.col-xs-4 Last Earned
|
|
|
|
th.col-xs-4 Amount
|
|
|
|
each achievement in earnedAchievements.models
|
|
|
|
tr
|
|
|
|
td= achievement.get('achievementName')
|
2014-08-08 13:26:24 -04:00
|
|
|
td= moment().format("MMMM Do YYYY", achievement.get('changed'))
|
2014-08-07 16:03:00 -04:00
|
|
|
if achievement.get('achievedAmount')
|
|
|
|
td= achievement.get('achievedAmount')
|
|
|
|
else
|
|
|
|
td
|