Merge pull request #2910 from trotod/fix-clan-details-style

Fix clan details style
This commit is contained in:
Matt Lott 2015-07-29 10:22:36 -07:00
commit 822d25984f
3 changed files with 15 additions and 5 deletions

View file

@ -38,6 +38,9 @@
margin: 0px 2px margin: 0px 2px
vertical-align: middle vertical-align: middle
td.hero-icon-cell
display: table-cell
.level-cell .level-cell
width: 50px width: 50px
text-align: center text-align: center
@ -167,6 +170,10 @@
td.code-language-cell td.code-language-cell
width: 30px width: 30px
vertical-align: middle
.code-language-cell
vertical-align: middle
span.code-language-cell span.code-language-cell
background: transparent url(/images/common/code_languages/javascript_small.png) background: transparent url(/images/common/code_languages/javascript_small.png)
@ -175,3 +182,6 @@
width: 30px width: 30px
height: 30px height: 30px
margin: 0px 2px margin: 0px 2px
.remove-member-cell
vertical-align: middle

View file

@ -195,12 +195,12 @@ block content
thead thead
tr tr
th th
th th
td.name-cell(data-i18n="clans.name") Name th.name-cell(data-i18n="clans.name") Name
th.level-cell(data-i18n="resources.level") Level th.level-cell(data-i18n="resources.level") Level
th.achievements-cell(data-i18n="play.achievements") Achievements th.achievements-cell(data-i18n="play.achievements") Achievements
th.latest-achievement-cell(data-i18n="clans.latest_achievement") Latest Achievement th.latest-achievement-cell(data-i18n="clans.latest_achievement") Latest Achievement
th th.remove-member-cell
tbody tbody
each member in members each member in members
tr tr
@ -218,6 +218,6 @@ block content
td.latest-achievement-cell td.latest-achievement-cell
if memberAchievementsMap && memberAchievementsMap[member.id] && memberAchievementsMap[member.id].length if memberAchievementsMap && memberAchievementsMap[member.id] && memberAchievementsMap[member.id].length
span= memberAchievementsMap[member.id][0].get('achievementName') span= memberAchievementsMap[member.id][0].get('achievementName')
td td.remove-member-cell
if isOwner && member.id !== clan.get('ownerID') if isOwner && member.id !== clan.get('ownerID')
button.btn.btn-xs.btn-warning.remove-member-btn(data-id="#{member.id}", data-i18n="clans.rem_hero") Remove Hero button.btn.btn-xs.btn-warning.remove-member-btn(data-id="#{member.id}", data-i18n="clans.rem_hero") Remove Hero

View file

@ -116,7 +116,7 @@ ClanHandler = class ClanHandler extends Handler
return @sendDatabaseError(res, err) if err return @sendDatabaseError(res, err) if err
return @sendNotFoundError(res) unless clan return @sendNotFoundError(res) unless clan
memberIDs = clan.get('members') ? [] memberIDs = clan.get('members') ? []
User.find {_id: {$in: memberIDs}}, 'name nameLower points', {sort: {nameLower: 1}}, (err, users) => User.find {_id: {$in: memberIDs}}, 'name nameLower points heroConfig.thangType', {sort: {nameLower: 1}}, (err, users) =>
return @sendDatabaseError(res, err) if err return @sendDatabaseError(res, err) if err
cleandocs = (UserHandler.formatEntity(req, doc) for doc in users) cleandocs = (UserHandler.formatEntity(req, doc) for doc in users)
@sendSuccess(res, cleandocs) @sendSuccess(res, cleandocs)