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