diff --git a/src/presenters/postDisplayer.py b/src/presenters/postDisplayer.py index 1e23bbe..01c00e9 100644 --- a/src/presenters/postDisplayer.py +++ b/src/presenters/postDisplayer.py @@ -657,7 +657,7 @@ class displayPollPresenter(base.basePresenter): title = _("Poll from {user1_nom}").format(**user) self.send_message("set_title", value=title) self.send_message("set", control="question", value=self.poll["question"]) - if len(self.poll["answer_ids"]) > 0 or ("is_closed" in self.poll and self.poll["is_closed"] == True) or load_results == True: + if len(self.poll["answer_ids"]) > 0 or ("is_closed" in self.poll and self.poll["is_closed"] == True) or load_results == True or ("can_vote" in self.poll and self.poll["can_vote"] == False): options = [] for i in self.poll["answers"]: options.append((i["text"], i["votes"], i["rate"])) diff --git a/src/views/dialogs/postDisplay.py b/src/views/dialogs/postDisplay.py index ad9c772..0ed1c62 100644 --- a/src/views/dialogs/postDisplay.py +++ b/src/views/dialogs/postDisplay.py @@ -345,7 +345,7 @@ class displayPoll(widgetUtils.BaseDialog): for i in options: sizer2 = wx.StaticBoxSizer(parent=sizer.GetStaticBox(), orient=wx.HORIZONTAL, label=i[0]) staticcontrol = wx.StaticText(sizer2.GetStaticBox(), wx.NewId(), i[0]) - control = wx.TextCtrl(sizer2.GetStaticBox(), wx.NewId(), _("{votes} votes ({rate}% rate)").format(votes=i[1], rate=i[2]), style=wx.TE_READONLY|wx.TE_MULTILINE) + control = wx.TextCtrl(sizer2.GetStaticBox(), wx.NewId(), _("{votes} ({rate}%)").format(votes=i[1], rate=i[2]), style=wx.TE_READONLY|wx.TE_MULTILINE) sizer2.Add(staticcontrol, 0, wx.ALL, 5) sizer2.Add(control, 0, wx.ALL, 5) sizer.Add(sizer2, 0, wx.ALL, 5)