diff --git a/app/templates/contribute/contributor_list.jade b/app/templates/contribute/contributor_list.jade index 32e5ac9e3..3604c4b90 100644 --- a/app/templates/contribute/contributor_list.jade +++ b/app/templates/contribute/contributor_list.jade @@ -1,13 +1,14 @@ .row - for contributor in contributors - .col-xs-6.col-md-3 - .thumbnail - - var src = "/images/pages/contribute/" + contributorClassName + ".png"; - - if(contributor.avatar) - - src = src.replace(contributorClassName, contributorClassName + "/" + contributor.avatar + "_small"); - - if(contributor.id) - - src = "/db/user/" + contributor.id + "/avatar?s=100&fallback=" + src; - a(href=contributor.github ? "https://github.com/codecombat/codecombat/commits?author=" + contributor.github : null, class=contributor.github ? 'has-github' : '') - img.img-responsive(src=src, alt=contributor.name) - .caption - h4= contributor.name + if contributors + for contributor in contributors + .col-xs-6.col-md-3 + .thumbnail + - var src = "/images/pages/contribute/" + contributorClassName + ".png"; + - if(contributor.avatar) + - src = src.replace(contributorClassName, contributorClassName + "/" + contributor.avatar + "_small"); + - if(contributor.id) + - src = "/db/user/" + contributor.id + "/avatar?s=100&fallback=" + src; + a(href=contributor.github ? "https://github.com/codecombat/codecombat/commits?author=" + contributor.github : null, class=contributor.github ? 'has-github' : '') + img.img-responsive(src=src, alt=contributor.name) + .caption + h4= contributor.name diff --git a/app/views/contribute/AdventurerView.coffee b/app/views/contribute/AdventurerView.coffee index f88130f4a..e82c262dc 100644 --- a/app/views/contribute/AdventurerView.coffee +++ b/app/views/contribute/AdventurerView.coffee @@ -5,4 +5,6 @@ template = require 'templates/contribute/adventurer' module.exports = class AdventurerView extends ContributeClassView id: 'adventurer-view' template: template - contributorClassName: 'adventurer' + + initialize: -> + @contributorClassName = 'adventurer' diff --git a/app/views/contribute/AmbassadorView.coffee b/app/views/contribute/AmbassadorView.coffee index cd10501c8..9dfb3b7f6 100644 --- a/app/views/contribute/AmbassadorView.coffee +++ b/app/views/contribute/AmbassadorView.coffee @@ -5,4 +5,6 @@ template = require 'templates/contribute/ambassador' module.exports = class AmbassadorView extends ContributeClassView id: 'ambassador-view' template: template - contributorClassName: 'ambassador' + + initialize: -> + @contributorClassName = 'ambassador' diff --git a/app/views/contribute/ArchmageView.coffee b/app/views/contribute/ArchmageView.coffee index 93cdc9401..5bd9fe553 100644 --- a/app/views/contribute/ArchmageView.coffee +++ b/app/views/contribute/ArchmageView.coffee @@ -4,7 +4,9 @@ template = require 'templates/contribute/archmage' module.exports = class ArchmageView extends ContributeClassView id: 'archmage-view' template: template - contributorClassName: 'archmage' + + initialize: -> + @contributorClassName = 'archmage' contributors: [ {id: '547acbb2af18b03c0563fdb3', name: 'David Liu', github: 'trotod'} diff --git a/app/views/contribute/ArtisanView.coffee b/app/views/contribute/ArtisanView.coffee index fa4c7433b..7d6c350b5 100644 --- a/app/views/contribute/ArtisanView.coffee +++ b/app/views/contribute/ArtisanView.coffee @@ -5,7 +5,9 @@ template = require 'templates/contribute/artisan' module.exports = class ArtisanView extends ContributeClassView id: 'artisan-view' template: template - contributorClassName: 'artisan' + + initialize: -> + @contributorClassName = 'artisan' contributors: [ {id: '5276ad5dcf83207a2801d3b4', name: 'Zach Martin', github: 'zachster01'} diff --git a/app/views/contribute/ContributeClassView.coffee b/app/views/contribute/ContributeClassView.coffee index 34a0b2ef2..dfc931770 100644 --- a/app/views/contribute/ContributeClassView.coffee +++ b/app/views/contribute/ContributeClassView.coffee @@ -6,17 +6,10 @@ contributorSignupTemplate = require 'templates/contribute/contributor_signup' contributorListTemplate = require 'templates/contribute/contributor_list' module.exports = class ContributeClassView extends RootView - navPrefix: '/contribute' events: 'change input[type="checkbox"]': 'onCheckboxChanged' - getRenderData: -> - c = super() - c.navPrefix = @navPrefix - c.contributors = @contributors - c - afterRender: -> super() @$el.find('.contributor-signup-anonymous').replaceWith(contributorSignupAnonymousTemplate(me: me)) @@ -39,5 +32,3 @@ module.exports = class ContributeClassView extends RootView me.patch() @openModalView new CreateAccountModal() if me.get 'anonymous' el.parent().find('.saved-notification').finish().show('fast').delay(3000).fadeOut(2000) - - contributors: [] diff --git a/app/views/contribute/DiplomatView.coffee b/app/views/contribute/DiplomatView.coffee index bbf74cb45..802d0ec7d 100644 --- a/app/views/contribute/DiplomatView.coffee +++ b/app/views/contribute/DiplomatView.coffee @@ -60,7 +60,9 @@ require("locale/et") module.exports = class DiplomatView extends ContributeClassView id: 'diplomat-view' template: template - contributorClassName: 'diplomat' + + initialize: -> + @contributorClassName = 'diplomat' calculateSpokenLanguageStats: -> @locale ?= require 'locale/locale' diff --git a/app/views/contribute/MainContributeView.coffee b/app/views/contribute/MainContributeView.coffee index 930870110..55a382c49 100644 --- a/app/views/contribute/MainContributeView.coffee +++ b/app/views/contribute/MainContributeView.coffee @@ -4,7 +4,6 @@ template = require 'templates/contribute/contribute' module.exports = class MainContributeView extends ContributeClassView id: 'contribute-view' template: template - navPrefix: '' events: 'change input[type="checkbox"]': 'onCheckboxChanged' diff --git a/app/views/contribute/ScribeView.coffee b/app/views/contribute/ScribeView.coffee index 319a4fef1..16a45cd31 100644 --- a/app/views/contribute/ScribeView.coffee +++ b/app/views/contribute/ScribeView.coffee @@ -5,7 +5,9 @@ template = require 'templates/contribute/scribe' module.exports = class ScribeView extends ContributeClassView id: 'scribe-view' template: template - contributorClassName: 'scribe' + + initialize: -> + @contributorClassName = 'scribe' contributors: [ {name: 'Ryan Faidley'}