mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
Add edit button
This commit is contained in:
@@ -14,7 +14,7 @@ class Bounty(WebsiteGenerator):
|
||||
paid_backers = [backer for backer in self.bounty_backer if backer.paid]
|
||||
no_of_backers = len(paid_backers)
|
||||
if no_of_backers == 0:
|
||||
no_of_backers = 'No backers yet'
|
||||
no_of_backers = 'Be the first to back this bounty'
|
||||
elif no_of_backers == 1:
|
||||
no_of_backers = str(no_of_backers) + ' backer'
|
||||
else:
|
||||
|
||||
@@ -31,7 +31,13 @@
|
||||
</style>
|
||||
|
||||
<div class="main">
|
||||
<h1>{{ title }} <span style="font-size: 14px; line-height: 44px;" class="pull-right small">{{days_to_go}} days to go</span></h1>
|
||||
<h1>
|
||||
{{ title }}
|
||||
{% if doc.owner == frappe.session.user %}
|
||||
<a href="/new-bounty?name={{doc.name}}" class="btn btn-default btn-xs">Edit</a>
|
||||
{% endif %}
|
||||
<span style="font-size: 14px; line-height: 44px;" class="pull-right small">{{days_to_go}} days to go</span>
|
||||
</h1>
|
||||
{% set bounty_progress = ((doc.bounty_collected/doc.goal)*100) %}
|
||||
<div class="progress" style="height: 12px;">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar"
|
||||
@@ -100,7 +106,7 @@
|
||||
|
||||
</div>
|
||||
<p>
|
||||
<h4>About this feature</h4>
|
||||
<h6 class="text-muted uppercase">About this feature</h6>
|
||||
<p>{{doc.description}}</p>
|
||||
</p>
|
||||
<hr style="margin: 50px 0;">
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
frappe.ready(function() {
|
||||
|
||||
setTimeout(() => {
|
||||
if ($('select[name=user]').val() === "") {
|
||||
window.location.href = '/bounties';
|
||||
}
|
||||
}, 1000);
|
||||
})
|
||||
@@ -1,3 +1,7 @@
|
||||
frappe.ready(function() {
|
||||
// bind events here
|
||||
setTimeout(() => {
|
||||
if ($('select[name=user]').val() === "") {
|
||||
window.location.href = '/bounties';
|
||||
}
|
||||
}, 1000);
|
||||
})
|
||||
Reference in New Issue
Block a user