codecombat/app/templates/clans/clan-details.jade

67 lines
1.8 KiB
Text
Raw Normal View History

extends /templates/base
block content
2015-04-03 12:52:25 -04:00
if clan
h1= clan.get('name')
2015-04-03 17:09:43 -04:00
if clan.get('description')
.clan-description
each line in clan.get('description').split('\n')
p= line
2015-04-03 17:48:00 -04:00
h5 Summary
table.table.table-condensed.stats-table
2015-04-03 14:05:37 -04:00
if owner
2015-04-03 17:48:00 -04:00
tr
td
span.spr Chieftain
td
a(href="/user/#{clan.get('ownerID')}")= owner.get('name')
2015-04-03 14:05:37 -04:00
if stats.averageLevel
2015-04-03 17:48:00 -04:00
tr
td Average Level
td= stats.averageLevel
2015-04-03 14:05:37 -04:00
if stats.totalAchievements
2015-04-03 17:48:00 -04:00
tr
td Total Achievements
2015-04-03 17:48:00 -04:00
td= stats.totalAchievements
p
if isOwner
button.btn.btn-sm.btn-warning.delete-clan-btn Delete Clan
else if isMember
button.btn.btn-sm.btn-warning.leave-clan-btn Leave Clan
else
button.btn.btn-sm.btn-success.join-clan-btn Join Clan
div
span.spl.spr.join-link-prompt Invite:
input.join-clan-link(type="text", readonly, value="#{joinClanLink}")
.small *Invite players to this Clan by sending them this link.
2015-04-03 12:52:25 -04:00
if members
h3 Heroes (#{members.length})
table.table.table-striped.table-condensed
thead
tr
th Name
th Level
2015-04-03 14:05:37 -04:00
th Achievements
th Favorite Language
th
tbody
2015-04-02 20:00:28 -04:00
each member in members
tr
td
2015-04-02 20:00:28 -04:00
a(href="/user/#{member.id}")= member.get('name') || 'Anoner'
td= member.level()
2015-04-03 14:05:37 -04:00
td
if memberAchievementsMap && memberAchievementsMap[member.id]
| #{memberAchievementsMap[member.id].length}
td
if memberLanguageMap && memberLanguageMap[member.id]
| #{memberLanguageMap[member.id]}
2015-04-03 14:05:37 -04:00
td
if isOwner && member.id !== clan.get('ownerID')
button.btn.btn-sm.btn-warning.remove-member-btn(data-id="#{member.id}") Remove Hero