Skip to content

Commit

Permalink
wip(goldenticket): Adding Golden ticket
Browse files Browse the repository at this point in the history
If "goldenTicket.active" is set to true in application.conf then show the GT votes on the result page for CFP members
  • Loading branch information
nicmarti committed Dec 30, 2015
1 parent 9d5db5a commit 6ce724b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/controllers/CFPAdmin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import library.{ComputeLeaderboard, ComputeVotesAndScore, SendMessageInternal, S
import models.Review.ScoreAndTotalVotes
import models._
import org.apache.commons.lang3.StringUtils
import play.api.Play
import play.api.data.Forms._
import play.api.data._
import play.api.data.validation.Constraints._
Expand Down Expand Up @@ -106,6 +107,14 @@ object CFPAdmin extends SecureCFPController {
val nextToBeReviewedSameTrack = (sameTracks.sortBy(_.talkType.id) ++ otherTracks).headOption
val nextToBeReviewedSameFormat = (sameTalkType.sortBy(_.track.id) ++ otherTalksType).headOption

// If Golden Ticket is active
if(Play.current.configuration.getBoolean("goldenTicket.active").getOrElse(false)){
play.Logger.info("ACTIVATE_GOLDEN_TICKET is true")
}else{
play.Logger.info("Golden ticket not active")
}


Ok(views.html.CFPAdmin.showVotesForProposal(uuid, proposal, score, countVotesCast, countVotes, allVotes, nextToBeReviewedSameTrack, nextToBeReviewedSameFormat))
}
case None => NotFound("Proposal not found").as("text/html")
Expand Down
2 changes: 2 additions & 0 deletions run.sh.sample
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export OPSGENIE_NAME="TODO"

export CFP_IS_OPEN="false"

export ACTIVATE_GOLDEN_TICKET="false"

echo -n "--- Configured for development ---"

play

0 comments on commit 6ce724b

Please sign in to comment.