Merge pull request #6 from faulteh/lca2017

Update css_class methods to use new vote scoring (removed VOTE_ZERO)
This commit is contained in:
Scott Bragg 2016-06-13 20:49:07 +10:00 committed by GitHub
commit 13393ef826

View file

@ -177,10 +177,10 @@ class Review(models.Model):
def css_class(self): def css_class(self):
return { return {
self.VOTES.PLUS_TWO: "plus-two",
self.VOTES.PLUS_ONE: "plus-one", self.VOTES.PLUS_ONE: "plus-one",
self.VOTES.PLUS_ZERO: "plus-zero",
self.VOTES.MINUS_ZERO: "minus-zero",
self.VOTES.MINUS_ONE: "minus-one", self.VOTES.MINUS_ONE: "minus-one",
self.VOTES.MINUS_TWO: "minus-two",
}[self.vote] }[self.vote]
@property @property
@ -210,10 +210,10 @@ class LatestVote(models.Model):
def css_class(self): def css_class(self):
return { return {
self.VOTES.PLUS_TWO: "plus-two",
self.VOTES.PLUS_ONE: "plus-one", self.VOTES.PLUS_ONE: "plus-one",
self.VOTES.PLUS_ZERO: "plus-zero",
self.VOTES.MINUS_ZERO: "minus-zero",
self.VOTES.MINUS_ONE: "minus-one", self.VOTES.MINUS_ONE: "minus-one",
self.VOTES.MINUS_TWO: "minus-two",
}[self.vote] }[self.vote]