Change route from bounty to bounties

This commit is contained in:
Faris Ansari
2017-08-23 18:09:39 +05:30
parent bd797b5904
commit f05f53a0f0
7 changed files with 13 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ frappe.ui.form.on('Bounty', {
}, },
feature_name: function(frm) { feature_name: function(frm) {
if (frm.doc.route) return; if (frm.doc.route) return;
const route = 'bounty/' + frm.doc.feature_name.toLowerCase().replace(/ /g, '-'); const route = 'bounties/' + frm.doc.feature_name.toLowerCase().replace(/ /g, '-');
frm.set_value('route', route); frm.set_value('route', route);
} }
}); });

View File

@@ -384,8 +384,8 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2017-08-21 15:20:13.637175", "modified": "2017-08-23 17:58:31.810230",
"modified_by": "Administrator", "modified_by": "faris@erpnext.com",
"module": "ERPNext Foundation", "module": "ERPNext Foundation",
"name": "Bounty", "name": "Bounty",
"name_case": "", "name_case": "",
@@ -415,7 +415,7 @@
"quick_entry": 0, "quick_entry": 0,
"read_only": 0, "read_only": 0,
"read_only_onload": 0, "read_only_onload": 0,
"route": "bounty", "route": "bounties",
"show_name_in_global_search": 0, "show_name_in_global_search": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",

View File

@@ -36,7 +36,7 @@ class Bounty(WebsiteGenerator):
self.bounty_collected = sum([backer.amount for backer in self.bounty_backer if backer.paid]) self.bounty_collected = sum([backer.amount for backer in self.bounty_backer if backer.paid])
if not self.route: if not self.route:
self.published = 1 self.published = 1
self.route = 'bounty/' + self.feature_name.lower().replace(' ', '-') self.route = 'bounties/' + self.feature_name.lower().replace(' ', '-')
def get_list_context(context): def get_list_context(context):
context.allow_guest = True context.allow_guest = True

View File

@@ -11,7 +11,7 @@
</div> </div>
<p> <p>
<span class="label">{{ fmt_money(doc.goal, currency="USD") }}</span> <span class="label">{{ fmt_money(doc.goal, currency="USD") }}</span>
<span class="label">{{ doc.end_date }}</span> <span class="label">Ends on {{ doc.end_date }}</span>
{% if doc.bounty_backer %} {% if doc.bounty_backer %}
<span class="label"> <span class="label">
{{ doc.bounty_backer|len }} {{ doc.bounty_backer|len }}

View File

@@ -19,8 +19,8 @@
"is_standard": 1, "is_standard": 1,
"login_required": 1, "login_required": 1,
"max_attachment_size": 0, "max_attachment_size": 0,
"modified": "2017-08-21 16:36:33.431742", "modified": "2017-08-23 18:05:50.695856",
"modified_by": "Administrator", "modified_by": "faris@erpnext.com",
"module": "ERPNext Foundation", "module": "ERPNext Foundation",
"name": "back-this-bounty", "name": "back-this-bounty",
"owner": "faris@erpnext.com", "owner": "faris@erpnext.com",
@@ -30,7 +30,7 @@
"route": "bounty/back-this-bounty", "route": "bounty/back-this-bounty",
"show_sidebar": 1, "show_sidebar": 1,
"sidebar_items": [], "sidebar_items": [],
"success_url": "/bounty", "success_url": "/bounties",
"title": "Back this bounty", "title": "Back this bounty",
"web_form_fields": [ "web_form_fields": [
{ {

View File

@@ -18,8 +18,8 @@
"is_standard": 1, "is_standard": 1,
"login_required": 1, "login_required": 1,
"max_attachment_size": 0, "max_attachment_size": 0,
"modified": "2017-08-21 16:36:27.918067", "modified": "2017-08-23 18:04:50.092049",
"modified_by": "Administrator", "modified_by": "faris@erpnext.com",
"module": "ERPNext Foundation", "module": "ERPNext Foundation",
"name": "start-a-new-bounty", "name": "start-a-new-bounty",
"owner": "Administrator", "owner": "Administrator",
@@ -28,7 +28,7 @@
"route": "new-bounty", "route": "new-bounty",
"show_sidebar": 1, "show_sidebar": 1,
"sidebar_items": [], "sidebar_items": [],
"success_url": "/bounty", "success_url": "/bounties",
"title": "Start a new Bounty", "title": "Start a new Bounty",
"web_form_fields": [ "web_form_fields": [
{ {

View File

@@ -47,7 +47,7 @@ website_context = {
{"label": "Services", "url": "/service-providers", "right": 1}, {"label": "Services", "url": "/service-providers", "right": 1},
{"label": "Jobs", "url": "/erpnext-jobs", "right": 1}, {"label": "Jobs", "url": "/erpnext-jobs", "right": 1},
{"label": "Chapters", "url": "/chapters", "right": 1}, {"label": "Chapters", "url": "/chapters", "right": 1},
{"label": "Bounties", "url": "/bounty", "right": 1}, {"label": "Bounties", "url": "/bounties", "right": 1},
{"label": '<span class="indicator blue">Conference</span>', "url": "/conf/2017", "right": 1}, {"label": '<span class="indicator blue">Conference</span>', "url": "/conf/2017", "right": 1},
{"label": "About", "url": "/about", "right": 1}, {"label": "About", "url": "/about", "right": 1},
], ],