From 155ec4ba5849e82509a805d6e818a94fb9d9d6b4 Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 1 Dec 2017 13:54:49 +0530 Subject: [PATCH] [new] Grant application doctype clean up after review --- erpnext/non_profit/doctype/chapter/chapter.py | 1 + .../grant_application/grant_application.json | 66 +++++++++---------- .../grant_application/grant_application.py | 6 ++ .../templates/grant_application_row.html | 60 ++++++++++++++--- 4 files changed, 91 insertions(+), 42 deletions(-) diff --git a/erpnext/non_profit/doctype/chapter/chapter.py b/erpnext/non_profit/doctype/chapter/chapter.py index 67e2296397..d484882519 100644 --- a/erpnext/non_profit/doctype/chapter/chapter.py +++ b/erpnext/non_profit/doctype/chapter/chapter.py @@ -13,6 +13,7 @@ class Chapter(WebsiteGenerator): def get_context(self, context): context.no_cache = True + context.show_sidebar = True context.parents = [dict(label='View All Chapters', route='chapters', title='View Chapters')] diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.json b/erpnext/non_profit/doctype/grant_application/grant_application.json index 0f2dc10160..31da2af110 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.json +++ b/erpnext/non_profit/doctype/grant_application/grant_application.json @@ -38,7 +38,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -73,6 +73,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "email", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Email", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -164,36 +194,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "email", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Email", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -837,7 +837,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-11-20 17:43:57.337044", + "modified": "2017-12-01 12:55:35.934666", "modified_by": "Administrator", "module": "Non Profit", "name": "Grant Application", @@ -885,7 +885,7 @@ "write": 1 } ], - "quick_entry": 1, + "quick_entry": 0, "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Non Profit", diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py index 3aa8d149cb..b3fb1a9734 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/grant_application.py @@ -22,11 +22,17 @@ class GrantApplication(WebsiteGenerator): """Load address and contacts in `__onload`""" load_address_and_contact(self) + def get_context(self, context): + context.no_cache = True + context.show_sidebar = True + context.parents = [dict(label='View All Grant Applications', + route='grant-application', title='View Grants')] def get_list_context(context): context.allow_guest = True context.no_cache = True context.no_breadcrumbs = True + context.show_sidebar = True context.order_by = 'creation desc' context.introduction ='
Grant Application List

Apply for new Grant Application' diff --git a/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html b/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html index 64ef869097..4d1c2e4536 100644 --- a/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html +++ b/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html @@ -1,9 +1,51 @@ -
- -

{{ doc.title }}

-

- {{ frappe.format_date(doc.creation) }} -

-
-
+{% if doc.published %} +
+ +

{{ doc.title }}

+

+ {{ frappe.format_date(doc.creation) }} +

+
+
+{% endif %} + + \ No newline at end of file