From 10312ebcfc9512d06f81920bfe6d306b6d2c7c99 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Sun, 17 Dec 2017 15:04:53 +0530 Subject: [PATCH] About Us Page picks people from team_members --- foundation/fixtures/custom_field.json | 40 +++++++++++++++++++++++++++ foundation/hooks.py | 8 ++++++ foundation/www/about.html | 24 +++------------- foundation/www/about.py | 7 +++++ 4 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 foundation/fixtures/custom_field.json create mode 100644 foundation/www/about.py diff --git a/foundation/fixtures/custom_field.json b/foundation/fixtures/custom_field.json new file mode 100644 index 00000000..f5081c14 --- /dev/null +++ b/foundation/fixtures/custom_field.json @@ -0,0 +1,40 @@ +[ + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "About Us Team Member", + "fieldname": "avatar", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "insert_after": "full_name", + "label": "Avatar", + "modified": "2017-12-17 14:47:48.972431", + "name": "About Us Team Member-avatar", + "no_copy": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "unique": 0, + "width": null + } +] \ No newline at end of file diff --git a/foundation/hooks.py b/foundation/hooks.py index b663c621..abe82cbc 100644 --- a/foundation/hooks.py +++ b/foundation/hooks.py @@ -152,3 +152,11 @@ scheduler_events = { # "frappe.desk.doctype.event.event.get_events": "foundation.event.get_events" # } +fixtures = [ + { + "dt": "Custom Field", + "filters": [["name", "in", + ["About Us Team Member-avatar"] + ]] + } +] diff --git a/foundation/www/about.html b/foundation/www/about.html index 40f567da..be4c6f37 100644 --- a/foundation/www/about.html +++ b/foundation/www/about.html @@ -6,29 +6,13 @@ {% block page_content %}
- -

About ERPNext Foundation

-

Community of ERPNext Users, Developers and Service Providers

-
-
-
“ BE and BE Recognized as The Best Open Source ERP Product in The World.”
-

Goals

-

The goal of the ERPNext Foundation is to provide a platform for the ERPNext Community to come together, join hands and build assets to help build and enhance ERPNext around the world. ERPNext Foundation aims to be a community driven organization and run in a transparent. -

-

If you want to be more involved in the ERPNext Community, read the FAQ

+ {{ doc.company_introduction }}

People

- {{ media("Jay Ram, CEO", - "Jay is a Mechanical Engineer with an MBA (PGDM) from IIM, Bangalore and has worked in Information Security and Risk areas for large enterprises. He is passionate about helping small and medium businesses overcome thier challenges to grow and thinks ERPNext and his skills and interests are a perfect alignment for what what he wants to do with the rest of his life. In his spare time he plays golf, rides (Bicycling and motorbiking) and travels and would like to combine all his interests on his trips - ERPNext, riding and golf.", - "https://discuss.erpnext.com/user_avatar/discuss.erpnext.com/jayram/240/6872_1.png") }} - {{ media("Rushabh Mehta, Director", "Rushabh is the CEO of Frappé Technologies Private Limited and one of the original creators of Frappé Framework and ERPNext. He built ERPNext for his family's business and then later published it as an open source project. Rushabh is an Industrial Engineer by training but a software developer by profession. In his free time, he likes to read and spend time relaxing at home.", - "https://discuss.erpnext.com/user_avatar/discuss.erpnext.com/rmehta/240/4147_1.png") }} - {{ media("Nabin Hait, Director", "Nabin is the Chief Operating Officer of Frappé Technologies Private Limited and the lead developer at ERPNext. Nabin is responsible for managing the ERPNext project and managing the team at Frappé. Nabin is a great cook and likes cooking and watching movies in his free time.", - "https://discuss.erpnext.com/user_avatar/discuss.erpnext.com/nabinhait/240/7_1.png") }} - {{ media("Prakash Hodage, Administrative Officer", "Prakash is the accountant and administrative officer of Frappé Technologies Private Limited. He is the person responsible for getting the foundation registered. Prakash has extensive experience in managing accounting and administration and is an expert ERPNext user, also handling user support from time to time. In his free time, Prakash loves to read and help people around him.", - "https://discuss.erpnext.com/user_avatar/discuss.erpnext.com/prakash/240/2703_1.png") }} - + {% for member in doc.team_members %} + {{ media(member.full_name, member.bio, member.image_link or member.avatar) }} + {% endfor %}

Want to talk to someone in the foundation? Get in touch

diff --git a/foundation/www/about.py b/foundation/www/about.py new file mode 100644 index 00000000..f40e0c66 --- /dev/null +++ b/foundation/www/about.py @@ -0,0 +1,7 @@ +# See license.txt + +from __future__ import unicode_literals +import frappe + +def get_context(context): + return { "doc": frappe.get_doc("About Us Settings", "About Us Settings") }