mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
[new] Fixed Bounty Creation Issue
This commit is contained in:
@@ -37,6 +37,7 @@ class Bounty(WebsiteGenerator):
|
||||
context.comment_list = get_comment_list(self.doctype, self.name)
|
||||
context.can_edit = can_edit
|
||||
|
||||
|
||||
def validate(self):
|
||||
from frappe.utils.user import get_user_fullname
|
||||
|
||||
@@ -70,14 +71,14 @@ def get_list_context(context):
|
||||
context.introduction = '''
|
||||
<div style="margin-bottom: 20px;">
|
||||
<a href="new-bounty" class="btn btn-primary">
|
||||
Start a new Bounty</a>
|
||||
Start a new bounty</a>
|
||||
</div>'''
|
||||
context.list_footer = '''
|
||||
<p><a class='text-muted small'
|
||||
href="/bounties-faq">Bounty FAQ</a></p>
|
||||
'''
|
||||
context.fmt_money = fmt_money
|
||||
context.get_paid_backers = get_paid_backers
|
||||
|
||||
|
||||
def get_paid_backers(backers):
|
||||
return [backer for backer in backers if backer.paid]
|
||||
@@ -107,6 +107,7 @@
|
||||
<p>
|
||||
<h6 class="text-muted uppercase">About this feature</h6>
|
||||
<p>{{doc.description}}</p>
|
||||
<p class="text-muted">Created by {{doc.owner}} </p>
|
||||
</p>
|
||||
<p>
|
||||
<p><a href="/bounties-faq" class='text-muted'>Bounties FAQ</a></p>
|
||||
|
||||
@@ -13,19 +13,18 @@
|
||||
<p>
|
||||
<span class="label">{{ fmt_money(doc.goal, currency="USD") }}</span>
|
||||
{% if comments %}
|
||||
<span class="label">{{ comments }} <i
|
||||
class='octicon octicon-comment-discussion'></i></span>
|
||||
<span class="label">{{ comments }} <i
|
||||
class='octicon octicon-comment-discussion'></i></span>
|
||||
{% endif %}
|
||||
{% set paid_backers = get_paid_backers(doc.bounty_backer) %}
|
||||
{% if paid_backers|len > 0 %}
|
||||
<span class="label">
|
||||
{{ paid_backers|len }}
|
||||
{% if paid_backers|len > 1 %}
|
||||
Backers
|
||||
{% else %}
|
||||
Backer
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="label">
|
||||
{{ paid_backers|len }}
|
||||
{% if paid_backers|len > 1 %}
|
||||
Backers
|
||||
{% else %}
|
||||
Backer
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>{{ html2text(doc.description[:200]) }}{% if doc.description|len > 200 %}...{% endif %}</p>
|
||||
|
||||
Reference in New Issue
Block a user