more stuff

This commit is contained in:
Rushabh Mehta
2017-03-02 18:46:34 +05:30
parent 6a8e3b6a45
commit 20652f948e
28 changed files with 507 additions and 80 deletions

View File

@@ -2,7 +2,7 @@
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:member_name",
"autoname": "field:email",
"beta": 0,
"creation": "2017-02-24 11:47:56.865726",
"custom": 0,
@@ -198,7 +198,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-02-28 16:20:10.046062",
"modified": "2017-03-02 11:36:12.723569",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "Member",

View File

@@ -2,6 +2,7 @@
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "M-.YY.-.####",
"beta": 0,
"creation": "2017-02-24 11:56:55.208964",
"custom": 0,
@@ -76,7 +77,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "from",
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -105,7 +106,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "to",
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -228,7 +229,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-02-28 16:18:54.592372",
"modified": "2017-03-02 11:48:11.912727",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "Membership",

View File

@@ -5,12 +5,36 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils import add_days, add_years, nowdate, getdate
from frappe import _
class Membership(Document):
def validate(self):
member_name = frappe.get_value('Member', dict(email=frappe.user.name))
member_name = frappe.get_value('Member', dict(email=frappe.session.user))
if not member_name:
user = frappe.get_doc('User', frappe.session.user)
member = frappe.get_doc(dict(
doctype='Member',
))
email=frappe.session.user,
member_name=user.get_fullname()
)).insert()
member_name = member.name
self.member = member_name
# get last membership (if active)
last_membership = frappe.get_all('Membership', 'name,to_date', dict(member=member_name),
order_by='to_date desc', limit=1)
if last_membership:
# if last membership does not expire in 30 days, then do not allow to renew
if getdate(add_days(last_membership[-1].to_date, -30)) > getdate(nowdate()):
frappe.throw(_('You can only renew if your membership expires within 30 days'))
self.from_date = add_days(last_membership[-1].to_date, 1)
else:
self.from_date = nowdate()
self.to_date = add_years(self.from_date, 1)

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, EOSSF and contributors
// For license information, please see license.txt
frappe.ui.form.on('Portal Event', {
refresh: function(frm) {
}
});

View File

@@ -0,0 +1,236 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:event_title",
"beta": 0,
"creation": "2017-03-02 14:37:01.391536",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "event_title",
"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": "Event 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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "event_date",
"fieldtype": "Date",
"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": "Event Date",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "place",
"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": "Place",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "published",
"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": "Published",
"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_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": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 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": 0,
"in_list_view": 0,
"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": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-03-02 15:18:47.126672",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "Portal Event",
"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,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, 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 PortalEvent(WebsiteGenerator):
def validate(self):
if not self.route:
self.route = 'events/' + self.scrub(self.event_title)
def get_list_context(context):
context.title = 'Upcoming Events'
context.no_breadcrumbs = True
context.row_template = 'foundation/templates/includes/portal_event.html'
context.order_by = 'creation desc'
context.introduction = '<p><a href="/add-event">Add an event</a></p>'

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, EOSSF and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Portal Event')
class TestPortalEvent(unittest.TestCase):
pass

View File

@@ -13,7 +13,7 @@ class PortalJob(WebsiteGenerator):
)
def validate(self):
if not self.route:
self.route = 'jobs/' + self.scrub(self.name)
self.route = 'jobs/' + self.scrub(self.title)
def get_list_context(context):
context.title = 'ERPNext Jobs'

View File

@@ -17,7 +17,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2017-02-28 15:06:44.748171",
"modified": "2017-03-02 12:09:51.793675",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "jobs",
@@ -51,6 +51,17 @@
"read_only": 0,
"reqd": 0
},
{
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
"label": "Status",
"max_length": 0,
"max_value": 0,
"options": "Open\nCompleted\nExpired\nWithdrawn",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "country",
"fieldtype": "Link",
@@ -83,17 +94,6 @@
"read_only": 0,
"reqd": 0
},
{
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
"label": "Status",
"max_length": 0,
"max_value": 0,
"options": "Open\nCompleted\nExpired\nWithdrawn",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "description",
"fieldtype": "Text Editor",

View File

@@ -20,8 +20,8 @@ frappe.ready(function() {
}
var m = moment();
$('[data-fieldname="from"]').val(m.format()).trigger('change');
$('[data-fieldname="to"]').val(m.add(1, 'year').format()).trigger('change');
$('[data-fieldname="from_date"]').val(m.format()).trigger('change');
$('[data-fieldname="to_date"]').val(m.add(1, 'year').format()).trigger('change');
$('[data-fieldname="membership_type"]').on('change', function() { set_amount(); });
$('[data-fieldname="currency"]').val('USD')
.on('change', function() {

View File

@@ -2,7 +2,7 @@
"accept_payment": 0,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_edit": 1,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 0,
@@ -16,7 +16,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2017-02-28 16:12:17.633312",
"modified": "2017-03-02 11:29:54.754782",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "memberships",
@@ -41,20 +41,20 @@
"reqd": 1
},
{
"fieldname": "from",
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"label": "From Date",
"label": "From",
"max_length": 0,
"max_value": 0,
"read_only": 1,
"reqd": 1
},
{
"fieldname": "to",
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"label": "To Date",
"label": "To",
"max_length": 0,
"max_value": 0,
"read_only": 1,

View File

@@ -39,19 +39,33 @@ home_page = "index"
website_context = {
"brand_html": "<img class='navbar-icon' src='/assets/foundation/img/erpnext-foundation-icon.svg' />ERPNext Foundation",
"top_bar_items": [
{"label": "Service Providers", "url": "/service-providers", "right":1},
{"label": "Resources", "url": "/resources", "right":1},
{"label": "About", "url": "/about", "right":1}
{"label": "My Account", "url": "/me", "right":1},
# {"label": "Resources", "url": "/resources", "right":1},
# {"label": "About", "url": "/about", "right":1}
# {"label": "Docs", "url": "http://frappe.github.io/erpnext", "right":1},
# {"label": "Blog", "url": "https://frappe.io/blog", "right":1},
],
"footer_items": [
{"label": "About", "url": "/about"},
{"label": "Memberships", "url": "/members"},
{"label": "Jobs", "url": "/jobs"},
{"label": "Contact", "url": "/contact"},
{"label": "Legal", "url": "/legal"},
{"label": "Terms", "url": "/terms"}
{"label": "ERPNext", "child_items": [
{"label": "Resources", "url": "/resources"},
{"label": "Documentation", "url": "https://frappe.github.io/erpnext", "target": "_blank"},
{"label": "Frappé Framework", "url": "https://frappe.github.io/frappe", "target": "_blank"},
{"label": "GitHub", "url": "https://github.com/frappe/erpnext", "target": "_blank"},
]},
{"label": "Foundation", "child_items": [
{"label": "About", "url": "/members"},
{"label": "Memberships", "url": "/members"},
{"label": "Contact", "url": "/contact"},
{"label": "Legal", "url": "/legal"},
{"label": "Terms", "url": "/terms"}
]},
{"label": "Community", "child_items": [
{"label": "Service Providers", "url": "/service-providers"},
{"label": "Jobs", "url": "/jobs"},
{"label": "Events", "url": "/events"},
{"label": "Forum", "url": "https://discuss.erpnext.com", "target": "_blank"}
]},
],
"hide_login": 1,
"favicon": "/assets/frappe_theme/img/favicon.ico"
@@ -59,6 +73,7 @@ website_context = {
website_route_rules = [
{"from_route": "/jobs", "to_route": "Portal Job"},
{"from_route": "/events", "to_route": "Portal Event"},
]
# website user home page (by Role)
@@ -78,7 +93,7 @@ website_generators = ["Service Provider", 'Portal Job']
portal_menu_items = [
{'label': 'Service Provider Settings', 'route': '/service-provider-settings'},
{'label': 'Jobs', 'route': '/my-jobs'},
{'label': 'Membership', 'route': '/memberships'}
{'label': 'Membership', 'route': '/members/details'}
]
# Installation

View File

@@ -3,7 +3,7 @@
body {
font-family: 'Open Sans', sans-serif;
font-size: 15px;
color: @text-color;
color: #161c23;
text-rendering: optimizeLegibility !important;
line-height: 1.5em;
-moz-osx-font-smoothing: grayscale;
@@ -12,15 +12,18 @@ body {
section {
padding: 30px 0px;
border-bottom: 1px solid #EBEFF2;
}
section:last-child {
border: none;
padding-bottom: 60px;
}
section h1 {
section p, section li, section .media-body {
font-size: 16px;
line-height: 1.8em;
}
h1 {
font-size: 32px;
}
@@ -39,27 +42,31 @@ h1, h2, h3, h4 {
margin-top: -5px;
}
.button {
display: inline-block;
border-radius: 4px;
padding: 7px 12px 9px;
line-height: 1;
text-decoration: none;
.page_content {
min-height: 400px;
}
.green-btn, .btn-primary {
text-decoration: none;
color: #fff;
padding: 5px 10px;
background: #458a49;
border-radius: 3px;
border: 0px;
}
.btn-primary, .btn-primary:visited {
background: #458a49;
}
.green-btn {
background: #70e079;
/*color: #fff;*/
border: 0px;
border-bottom: 3px solid rgba(0, 0, 0, 0.2);
font-size: 1em;
font-size: 14px;
}
.green-btn:hover {
text-decoration: none;
background: #458a49;
.green-btn:hover, .btn-primary:hover, .btn-primary:focus {
background: #41af47;
color: #fff;
border-bottom: 3px solid rgba(117, 116, 255, 0.2);
text-decoration: none;
}
.web-footer {
@@ -67,15 +74,59 @@ h1, h2, h3, h4 {
}
.row-full{
width: 100vw;
position: relative;
margin-left: -50vw;
height: 400px;
margin-top: 0px;
left: 50%;
width: 100vw;
position: relative;
margin-left: -50vw;
height: 400px;
margin-top: 0px;
left: 50%;
}
.foundation-media {
border: 1px solid #161c23;
border-radius: 3px;
padding: 15px;
margin-bottom: 30px;
}
a .media-body:hover, a .media-heading:hover {
text-decoration: none;
}
.web-footer {
background-color: #d9f7dc;
border-top: 4px solid #458a49;
padding-bottom: 0px;
}
.navbar-default {
border-bottom: 4px solid #458a49;
}
.footer-group-label, .navbar-brand {
color: #161c23 !important;
}
.web-footer .col-sm-6:first-child {
width: 60%;
}
.web-footer .col-sm-6:last-child {
width: 40%;
}
#website-post-login {
display: none !important;
}
.gold-member {
border: 1px solid #161c23;
border-radius: 3px;
padding: 15px;
}
.silver-member {
border: 1px solid #161c23;
border-radius: 3px;
padding: 0px 15px;
}

View File

@@ -6,7 +6,7 @@
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="erp-icon" fill-rule="nonzero">
<path d="M512,448 C512,483.2 483.2,512 448,512 L64,512 C28.8,512 0,483.2 0,448 L0,64 C0,28.8 28.8,0 64,0 L448,0 C483.2,0 512,28.8 512,64 L512,448 Z" id="Shape" fill="#70E078"></path>
<path d="M512,448 C512,483.2 483.2,512 448,512 L64,512 C28.8,512 0,483.2 0,448 L0,64 C0,28.8 28.8,0 64,0 L448,0 C483.2,0 512,28.8 512,64 L512,448 Z" id="Shape" fill="#458A49"></path>
<path d="M150.483,371.684 L150.483,141.15 C150.483,125.983 160.017,116.017 174.316,116.017 L336.816,116.017 C350.682,116.017 357.616,122.95 357.616,134.65 L357.616,137.25 C357.616,149.383 350.682,155.883 336.816,155.883 L195.116,155.883 L195.116,234.317 L304.75,234.317 C319.05,234.317 325.55,240.383 325.55,252.084 L325.55,253.384 C325.55,265.517 318.616,272.017 304.75,272.017 L195.117,272.017 L195.117,356.951 L339.417,356.951 C353.284,356.951 359.784,363.017 359.784,374.718 L359.784,376.885 C359.784,389.451 353.284,396.385 339.417,396.385 L174.317,396.385 C160.017,396.384 150.483,386.851 150.483,371.684 Z" id="Shape" fill="#FFFFFF"></path>
</g>
</g>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,6 +1,6 @@
{% macro media(title, content, image, link) %}
<div class="media"
style="margin: 45px 0px; {% if link %}cursor: pointer;{% endif %}"
<div class="media foundation-media"
{% if link %}style="cursor: pointer;"{% endif %}
{% if link %}onclick="location.href='{{ link }}'"{% endif %}>
<div class="media-left">
<a href="{{ link or "#" }}">

View File

@@ -0,0 +1,5 @@
<div style='margin-bottom: 30px; max-width: 600px;'>
<a href="/{{ doc.route }}"><h3>{{ doc.title }}</h3></a>
<p class='text-muted small'>{{ doc.place }} | {{ frappe.format_date(date) }}</p>
<p>{{ html2text(doc.description[:200]) }}{% if doc.description|len > 200 %}...{% endif %}</p>
</div>

View File

@@ -4,7 +4,7 @@
{% from "foundation/templates/includes/macros.html" import media %}
{% block content %}
{% block page_content %}
<section>
<h1>About ERPNext Foundation</h1>
<p class='lead'>Community of ERPNext Users, Developers and Service Providers</p>

4
foundation/www/index.css Normal file
View File

@@ -0,0 +1,4 @@
.page-content {
padding-top: 0px;
margin-top: -3px;
}

View File

@@ -2,7 +2,7 @@
{% block title %}ERPNext Foundation{% endblock %}
{% block content %}
{% block page_content %}
<div class='row-full'>
<img src="/assets/foundation/img/community.png" class='img-responsive'>
</div>

View File

View File

@@ -0,0 +1,31 @@
{% extends "templates/web.html" %}
{% block title %}Membership Details{% endblock %}
{% block page_content %}
<h2>Your Memberships</h2>
{% if frappe.session.user=='Guest' %}
<p>You must first sign up and login to become a member</p>
<p><a href="/login" class='button green-btn'>Login</a></p>
{% else %}
{% if not last_membership %}
<p>You have never been a member of ERPNext Foundation. Click on the button below to start a new membership</p>
<p><a href="/memberships?new=1" class='btn btn-primary'>Become A Member</a></p>
{% elif frappe.utils.getdate(last_membership[-1].to_date) < frappe.utils.getdate(frappe.utils.nowdate()) %}
<p>Your Membership has expired, Click the button below to start a new membership</p>
<p><a href="/memberships?new=1" class='btn btn-primary'>Renew</a></p>
<p><a href="/memberships" class='text-muted'>View Membership History</a></p>
{% elif frappe.utils.getdate(frappe.utils.add_days(last_membership[-1].to_date, -30)) < frappe.utils.getdate(frappe.utils.nowdate())%}
<p>Your Membership is due to expire soon. Click on the button below to renew</p>
<p><a href="/memberships?new=1" class='btn btn-primary'>Renew</a></p>
<p><a href="/memberships" class='text-muted'>View Membership History</a></p>
{% else %}
<p>Welcome back <b>{{ last_membership[-1].membership_type }} Member!</b></p>
<p>Your membership is due to expire on {{ frappe.format_date(last_membership[-1].to_date) }}.
<p><a href="/memberships" class='text-muted'>View Membership History</a></p>
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,7 @@
import frappe
def get_context(context):
if frappe.session.user != 'Guest':
context.show_sidebar = True
context.last_membership = frappe.get_all('Membership', 'name,to_date,membership_type',
dict(member=frappe.session.user), order_by='to_date desc', limit=1)

View File

@@ -4,7 +4,7 @@
{% from "foundation/templates/includes/macros.html" import media %}
{% block content %}
{% block page_content %}
<section>
<h1>Memberships</h1>
<p class='lead'>Be a Part of the ERPNext Foundation</p>
@@ -30,6 +30,6 @@
"medal.png") }}
</section>
<section>
<p><a href="/members" class="button green-btn">Become A Member</a></p>
<p><a href="/members/details" class="button green-btn">Become A Member</a></p>
</section>
{% endblock %}

View File

@@ -4,7 +4,7 @@
{% from "foundation/templates/includes/macros.html" import media %}
{% block content %}
{% block page_content %}
<section>
<h1>Resources</h1>
<p class='lead'>Information to help you get started on ERPNext</p>

View File

@@ -4,15 +4,28 @@
{% macro gold_member(m) %}
<div class='gold-member'>
{{ media(m.title, m.introduction, m.image, m.route) }}
<div class="media" style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<div class="media-left">
<a href="{{ m.route }}">
<img class="media-object" src="{{ m.image or '/assets/foundation/img/gold.png' }}"
style="width: 72px; height: 72px; max-width: 72px; ">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">{{ m.title }}</h4>
{{ m.introduction }}
</div>
</div>
</div>
{% endmacro %}
{% macro silver_member(m) %}
<div class='col-sm-4'>
<h4>{{ m.title }}</h4>
<p>{{ m.introduction[:100] }}</p>
<p><a class='btn btn-default btn-sm' href='{{ m.route }}'>Details</a></p>
<div class='silver-member'>
<h4>{{ m.title }}</h4>
<p>{{ m.introduction[:100] }}</p>
<p><a class='btn btn-default btn-sm' href='{{ m.route }}'>Details</a></p>
</div>
</div>
{% endmacro %}
@@ -20,7 +33,7 @@
<div class='col-sm-4'>
<p>
<a class='bold' href="/{{ s.route }}">{{ s.title.title()[:25] }}</a><br>
<div class='small'>{{ s.introduction[:100] }}</div>
{{ s.introduction[:100] }}
</p>
</div>
{% endmacro %}
@@ -50,7 +63,7 @@
</section>
{% if form_dict.country %}
<section>
<h2>ERPNext Foundation Members</h2>
<h2>Individual Members</h2>
<div class='row'>
{% for s in individual_members %}
{{ show_member(s) }}

View File

@@ -19,7 +19,7 @@ def get_context(context):
context.has_gold_member = 1
else:
context.gold_members.append(dict(
title='Gold Member',
title='Your Company',
introduction='Become a Gold Member today and get your company featured here',
image='/assets/foundation/img/gold.png',
route='/members'
@@ -35,7 +35,7 @@ def get_context(context):
# round to 3 columns
for i in xrange(3 - (len(context.silver_members) % 3)):
context.silver_members.append(dict(
title='Silver Member',
title='Your Company',
introduction='Become a Silver Member today and get your company featured here',
image='/assets/foundation/img/silver.png',
route='/members'
@@ -52,7 +52,7 @@ def get_context(context):
context.individual_members = frappe.get_all('Service Provider', 'title, introduction, `image`, route', filters)
else:
context.individual_members = [dict(
title='Individual Member',
title='Your Company',
introduction='Become an invidual member to list here',
route='/members'
)]