changeset 4283:8560e7a59352

pull requests: add a 'Someone voted' comment on all uses of last_review_status
author Mads Kiilerich <madski@unity3d.com>
date Wed, 12 Jun 2013 02:13:05 +0200
parents 99997d8f31eb
children bc03f5a9f178
files kallithea/model/db.py kallithea/templates/pullrequests/pullrequest_data.html kallithea/templates/pullrequests/pullrequest_show_my_data.html
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/db.py	Fri Jun 14 16:28:38 2013 +0200
+++ b/kallithea/model/db.py	Wed Jun 12 02:13:05 2013 +0200
@@ -2301,7 +2301,7 @@
 
     @property
     def last_review_status(self):
-        return self.statuses[-1].status if self.statuses else ''
+        return str(self.statuses[-1].status) if self.statuses else ''
 
     def __json__(self):
         return dict(
--- a/kallithea/templates/pullrequests/pullrequest_data.html	Fri Jun 14 16:28:38 2013 +0200
+++ b/kallithea/templates/pullrequests/pullrequest_data.html	Wed Jun 12 02:13:05 2013 +0200
@@ -3,7 +3,7 @@
 % for pr in c.pullrequests_pager:
   <div class="pr ${'pr-closed' if pr.is_closed() else ''}">
     <div class="pr-title">
-      <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" />
+      <img src="${h.url('/images/icons/flag_status_%s.png' % pr.last_review_status)}" title="${_("Someone voted: %s") % pr.last_review_status}"/>
       <a href="${h.url('pullrequest_show',repo_name=pr.other_repo.repo_name,pull_request_id=pr.pull_request_id)}">
       ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))}
       </a>
--- a/kallithea/templates/pullrequests/pullrequest_show_my_data.html	Fri Jun 14 16:28:38 2013 +0200
+++ b/kallithea/templates/pullrequests/pullrequest_show_my_data.html	Wed Jun 12 02:13:05 2013 +0200
@@ -10,7 +10,7 @@
       <li class="${'closed' if pull_request.is_closed() else ''}">
         <div style="height: 12px">
           <div style="float:left">
-            <img src="${h.url('/images/icons/flag_status_%s.png' % str(pull_request.last_review_status))}" />
+            <img src="${h.url('/images/icons/flag_status_%s.png' % pull_request.last_review_status)}" title="${_("Someone voted: %s") % pull_request.last_review_status}"/>
             <a href="${h.url('pullrequest_show',repo_name=pull_request.other_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
               ${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.fmt_date(pull_request.created_on))}
               %if pull_request.is_closed():
@@ -37,7 +37,7 @@
       %for pull_request in c.participate_in_pull_requests:
       <li class="${'closed' if pull_request.is_closed() else ''}">
         <div style="height: 12px">
-          <img src="${h.url('/images/icons/flag_status_%s.png' % str(pull_request.last_review_status))}" />
+          <img src="${h.url('/images/icons/flag_status_%s.png' % pull_request.last_review_status)}" title="${_("Someone voted: %s") % pull_request.last_review_status}"/>
           <a href="${h.url('pullrequest_show',repo_name=pull_request.other_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
             ${_('Pull request #%s opened by %s on %s') % (pull_request.pull_request_id, pull_request.author.full_name, h.fmt_date(pull_request.created_on))}
           </a>