Merge pull request #46 from vishdha/issue_45

[new] Shows bounty creator information
This commit is contained in:
Vishal Dhayagude
2017-09-11 13:13:43 +05:30
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -80,4 +80,7 @@ def get_list_context(context):
context.get_paid_backers = get_paid_backers
def get_paid_backers(backers):
return [backer for backer in backers if backer.paid]
if backers:
return [backer for backer in backers if backer.paid]
else:
return 0

View File

@@ -107,6 +107,7 @@
<p>
<h6 class="text-muted uppercase">About this feature</h6>
<p>{{doc.description}}</p>
<p class='text-muted'> Bounty created by {{ doc.owner }} </p>
</p>
<p>
<p><a href="/bounties-faq" class='text-muted'>Bounties FAQ</a></p>

View File

@@ -17,7 +17,7 @@
class='octicon octicon-comment-discussion'></i></span>
{% endif %}
{% set paid_backers = get_paid_backers(doc.bounty_backer) %}
{% if paid_backers|len > 0 %}
{% if paid_backers and paid_backers|len > 0 %}
<span class="label">
{{ paid_backers|len }}
{% if paid_backers|len > 1 %}