diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/__init__.py b/foundation/erpnext_foundation/doctype/foundation_fellowship/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.js b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.js new file mode 100644 index 00000000..d1d91e3b --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.js @@ -0,0 +1,8 @@ +// Copyright (c) 2017, EOSSF and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Foundation Fellowship', { + refresh: function(frm) { + + } +}); diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.json b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.json new file mode 100644 index 00000000..b74cfafc --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.json @@ -0,0 +1,544 @@ +{ + "allow_copy": 0, + "allow_guest_to_view": 1, + "allow_import": 0, + "allow_rename": 0, + "autoname": "field:title", + "beta": 0, + "creation": "2017-10-27 05:03:24.894001", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "title", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Title", + "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, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "country", + "fieldtype": "Link", + "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": "Country", + "length": 0, + "no_copy": 0, + "options": "Country", + "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, + "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": 0, + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "phone", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Phone", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "website", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "address", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_8", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_10", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "introduction", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Introduction", + "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, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "details", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Details", + "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, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_13", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "discuss_id", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Discuss ID", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "github_id", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "GitHub ID", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "route", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Route", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "show_in_website", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show in Website", + "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": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "has_web_view": 1, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_field": "image", + "image_view": 0, + "in_create": 0, + "is_published_field": "show_in_website", + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2017-10-27 05:14:36.189151", + "modified_by": "Administrator", + "module": "ERPNext Foundation", + "name": "Foundation Fellowship", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "route": "foundation-fellow", + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py new file mode 100644 index 00000000..52019838 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, EOSSF and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.website.website_generator import WebsiteGenerator + +class FoundationFellowship(WebsiteGenerator): + _website = frappe._dict( + condition_field = "show_in_website", + ) + def validate(self): + if not self.route: + self.route = 'foundation-fellow/' + self.scrub(self.name) + + def get_context(self, context): + context.no_cache = True + context.parents = [dict(label='View All Foundation Fellows', + route='foundation-fellow', title='View All foundation fellows')] + + + +def get_list_context(context): + context.allow_guest = True + context.no_cache = True + context.no_breadcrumbs = True + context.order_by = 'creation desc' + context.introduction = '

Following are the Foundation Fellows

' \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship.html b/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship.html new file mode 100644 index 00000000..c733dd1b --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship.html @@ -0,0 +1,61 @@ +{% extends "templates/web.html" %} + +{% from "foundation/templates/includes/macros.html" import media %} + +{% block page_content %} +

{{ title }}

+
+
+
+ + + +
+
+ {{ introduction }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Country{{ country }}
Address{{ (address or '').replace('\n', '
') }}
Phone{{ phone }}
Email + {{ email }}
Disscuss Id{{ discuss_id }}
Github Id{{ github_id }}
Website{{ website }}
+ +
+
+
+
+ {{ details }} +
+
+

Contact {{ title }}

+
+ +{% endblock %} diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html b/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html new file mode 100644 index 00000000..049a778b --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html @@ -0,0 +1,11 @@ +
+ +

{{ doc.title }}

+

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

+
+
diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/test_foundation_fellowship.js b/foundation/erpnext_foundation/doctype/foundation_fellowship/test_foundation_fellowship.js new file mode 100644 index 00000000..75cac461 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/test_foundation_fellowship.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Foundation Fellowship", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Foundation Fellowship + () => frappe.tests.make('Foundation Fellowship', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/test_foundation_fellowship.py b/foundation/erpnext_foundation/doctype/foundation_fellowship/test_foundation_fellowship.py new file mode 100644 index 00000000..be738143 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/test_foundation_fellowship.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, EOSSF and Contributors +# See license.txt +from __future__ import unicode_literals + +import frappe +import unittest + +class TestFoundationFellowship(unittest.TestCase): + pass diff --git a/foundation/hooks.py b/foundation/hooks.py index bb3156d0..b663c621 100644 --- a/foundation/hooks.py +++ b/foundation/hooks.py @@ -43,15 +43,18 @@ website_context = { "copyright": "ERPNext Open Source Software Foundation", "footer_address": "
ERPNext is and will always be 100% Open Source", "top_bar_items": [ - {"label": "Docs", "url": "/docs", "right": 1}, - {"label": "Services", "url": "/service-providers", "right": 1}, - {"label": "Jobs", "url": "/erpnext-jobs", "right": 1}, - {"label": "Chapters", "url": "/chapters", "right": 1}, - {"label": "Bounties", "url": "/bounties", "right": 1}, - {"label": 'Conference', "url": "/conf/2017", "right": 1}, + {"label": "User Manual", "url": "/docs", "right": 1}, + {"label": "Foundation", "child_items":[ + {"label": "Chapter", "url": "/chapters","right": 1}, + {"label": "Foundation Fellow", "url": "/foundation-fellow","right": 1} + ], "right":1}, + {"label": "Services", "child_items":[ + {"label": "Service Providers", "url": "/service-providers","right": 1}, + {"label": "Freelancer Jobs", "url": "/erpnext-jobs", "right": 1}, + ], "right":1}, {"label": "About", "url": "/about", "right": 1}, ], - "hide_login": 1, + "hide_login": 0, "favicon": "/assets/frappe_theme/img/favicon.ico" } # website user home page (by Role) @@ -70,6 +73,7 @@ website_context = { portal_menu_items = [ {'label': 'My Profile', 'route': '/service-provider-settings'}, + {'label': 'Module Leader', 'route': '/module-leader-settings'}, {'label': 'Membership', 'route': '/members/details'}, {'label': 'Conference Talks', 'route': '/conference-talk-proposal'}, {'label': 'Jobs', 'route': '/my-jobs'},