• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


コミットメタ情報

リビジョンc85b54e49c35798279190de30cb8443d0ccab25b (tree)
日時2012-07-18 04:25:22
作者Yuriy <yuriyarhipovua@yand...>
コミッターCory Johns

ログメッセージ

変更サマリ

差分

--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -683,7 +683,7 @@ class VotableArtifact(MappedClass):
683683 self.votes_down = self.votes_down - 1
684684 self.votes_up_users.append(user.username)
685685 self.votes_up += 1
686- self.votes += 1
686+ self.votes = self.votes_up - self.votes_down
687687
688688 def vote_down(self, user):
689689 if user.username in self.votes_down_users:
@@ -694,7 +694,7 @@ class VotableArtifact(MappedClass):
694694 self.votes_up = self.votes_up - 1
695695 self.votes_down_users.append(user.username)
696696 self.votes_down += 1
697- self.votes -= 1
697+ self.votes = self.votes_up - self.votes_down
698698
699699 def user_voted(self, user):
700700 """Check that user voted for this artifact.
--- a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_search_results.html
+++ b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_search_results.html
@@ -32,7 +32,7 @@
3232 {% elif col['name'] == 'assigned_to' %}
3333 <td>{% if t.assigned_to_id %}{{t.assigned_to.display_name}}{% endif %}</td>
3434 {% elif col['name'] == 'votes' %}
35- <td>{{ t.votes }}</td>
35+ <td><div style="color:{%if t.votes>0 %}green{%endif%}{%if t.votes<0 %}red{%endif%}">{{ t.votes }}</div></td>
3636 {% else %}
3737 {% set fld = c.app.globals.get_custom_field(col['name']) %}
3838 {% if fld and fld.type == 'user' %}