Compare commits

..

1 Commits

Author SHA1 Message Date
pateljannat
4c55f1f71c fix: exhibitor template 2021-08-19 12:16:05 +05:30
83 changed files with 944 additions and 8942 deletions

View File

@@ -1,5 +1,5 @@
{% set color = member.get_palette() %}
<a class="button-links" href="/user/{{member.username}}">
<a class="button-links" href="/{{member.username}}">
<span class="avatar {{ avatar_class }}" title="{{ member.full_name }}">
{% if member.user_image %}
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}" title="{{ member.full_name }}">

View File

@@ -1,14 +0,0 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Attendee', {
onload: function (frm) {
frm.set_query('user', function (doc) {
return {
filters: {
"ignore_user_type": 1,
}
};
});
}
});

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Attendee Registration', {
// refresh: function(frm) {
// }
});

View File

@@ -5,15 +5,40 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"user",
"full_name",
"column_break_3",
"attendee_info_section",
"name1",
"email",
"phone_number",
"occupation",
"company",
"is_paid",
"section_break_6",
"what_are_you_hoping_to_learn"
],
"fields": [
{
"fieldname": "attendee_info_section",
"fieldtype": "Section Break",
"label": "Attendee Info"
},
{
"fieldname": "name1",
"fieldtype": "Data",
"label": "Name"
},
{
"fieldname": "email",
"fieldtype": "Data",
"label": "Email"
},
{
"fieldname": "phone_number",
"fieldtype": "Data",
"label": "Phone Number"
},
{
"fieldname": "occupation",
"fieldtype": "Data",
"label": "Occupation"
},
{
"fieldname": "company",
"fieldtype": "Data",
@@ -22,42 +47,15 @@
{
"fieldname": "what_are_you_hoping_to_learn",
"fieldtype": "Text",
"label": "What are you hoping to learn?"
},
{
"fieldname": "user",
"fieldtype": "Link",
"label": "User",
"options": "User"
},
{
"fetch_from": "user.full_name",
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name",
"read_only": 1
},
{
"default": "0",
"fieldname": "is_paid",
"fieldtype": "Check",
"label": "Is Paid"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_6",
"fieldtype": "Section Break"
"label": "What are you hoping to learn"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-20 17:03:09.741997",
"modified": "2021-08-11 10:07:53.262504",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Attendee",
"name": "Attendee Registration",
"owner": "Administrator",
"permissions": [
{
@@ -75,6 +73,5 @@
],
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "user",
"track_changes": 1
}

View File

@@ -4,5 +4,5 @@
# import frappe
from frappe.model.document import Document
class Speaker(Document):
class AttendeeRegistration(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
# import frappe
import unittest
class TestAttendeeRegistration(unittest.TestCase):
pass

View File

@@ -19,7 +19,7 @@
"fieldname": "attendee",
"fieldtype": "Link",
"label": "attendee",
"options": "Attendee"
"options": "Attendee Registration"
},
{
"fieldname": "event",
@@ -30,7 +30,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-20 13:38:28.688115",
"modified": "2021-08-18 09:51:14.654098",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Event Ticket",

View File

@@ -1,87 +0,0 @@
{
"actions": [],
"creation": "2021-08-16 16:26:46.189119",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"event",
"is_paid",
"column_break_3",
"user",
"full_name",
"company",
"section_break_7",
"description"
],
"fields": [
{
"fetch_from": "user.full_name",
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name",
"read_only": 1
},
{
"fieldname": "company",
"fieldtype": "Data",
"label": "Company "
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"label": "Description"
},
{
"default": "0",
"fieldname": "is_paid",
"fieldtype": "Check",
"label": "Is Paid"
},
{
"fieldname": "user",
"fieldtype": "Link",
"label": "User",
"options": "User"
},
{
"fieldname": "event",
"fieldtype": "Link",
"label": "Event",
"options": "Event Details"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_7",
"fieldtype": "Section Break"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-20 16:32:58.031324",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Exhibitor",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "user",
"track_changes": 1
}

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Exhibitor Registration', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,54 @@
{
"actions": [],
"autoname": "Exhibitor-Regis-.####.",
"creation": "2021-08-16 16:26:46.189119",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"full_name",
"company",
"logo"
],
"fields": [
{
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name"
},
{
"fieldname": "company",
"fieldtype": "Data",
"label": "Company "
},
{
"fieldname": "logo",
"fieldtype": "Attach Image",
"label": "Logo"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-18 20:08:31.591935",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Exhibitor Registration",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -4,5 +4,5 @@
# import frappe
from frappe.model.document import Document
class Attendee(Document):
class ExhibitorRegistration(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
# import frappe
import unittest
class TestExhibitorRegistration(unittest.TestCase):
pass

View File

@@ -1,13 +1,15 @@
{
"actions": [],
"autoname": "field:full_name",
"creation": "2021-08-11 10:51:47.234690",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"event",
"user",
"full_name"
"full_name",
"user_image",
"title"
],
"fields": [
{
@@ -16,22 +18,29 @@
"label": "Event",
"options": "Event Details"
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title"
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Full Name",
"reqd": 1,
"unique": 1
},
{
"fieldname": "user",
"fieldtype": "Data",
"label": "User"
"fieldname": "user_image",
"fieldtype": "Attach Image",
"label": "Image"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-20 17:03:26.733195",
"modified": "2021-08-11 23:54:17.790263",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Host",
@@ -52,6 +61,5 @@
],
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "user",
"track_changes": 1
}

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Exhibitor', {
frappe.ui.form.on('Previous Content', {
// refresh: function(frm) {
// }

View File

@@ -1,41 +1,37 @@
{
"actions": [],
"creation": "2021-08-11 10:37:32.124651",
"autoname": "format:PRE-VID-BY-{name_of_the_speaker}-{####}",
"creation": "2021-08-18 08:42:58.711932",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"event",
"company",
"column_break_8",
"user",
"full_name"
"title",
"name_of_the_speaker",
"url",
"thumbnail"
],
"fields": [
{
"fieldname": "user",
"fieldtype": "Link",
"in_list_view": 1,
"label": "User",
"options": "User"
},
{
"fetch_from": "user.full_name",
"fieldname": "full_name",
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Full Name",
"read_only": 1
"label": "Title"
},
{
"fieldname": "company",
"fieldname": "name_of_the_speaker",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Company"
"label": "Name of the Speaker"
},
{
"fieldname": "column_break_8",
"fieldtype": "Column Break"
"fieldname": "url",
"fieldtype": "Data",
"label": "Video Embed Link"
},
{
"fieldname": "thumbnail",
"fieldtype": "Data",
"label": "Preview Image (Link)"
},
{
"fieldname": "event",
@@ -46,10 +42,10 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-20 16:53:43.968260",
"modified": "2021-08-18 09:37:03.278439",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Speaker",
"name": "Previous Content",
"owner": "Administrator",
"permissions": [
{
@@ -67,6 +63,5 @@
],
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "user",
"track_changes": 1
}

View File

@@ -4,5 +4,5 @@
# import frappe
from frappe.model.document import Document
class Exhibitor(Document):
class PreviousContent(Document):
pass

View File

@@ -4,5 +4,5 @@
# import frappe
import unittest
class TestExhibitor(unittest.TestCase):
class TestPreviousContent(unittest.TestCase):
pass

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Speaker', {
frappe.ui.form.on('Schedule', {
// refresh: function(frm) {
// }

View File

@@ -0,0 +1,63 @@
{
"actions": [],
"autoname": "Schedule-.####",
"creation": "2021-08-11 10:50:23.522178",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"event",
"speaker",
"slot"
],
"fields": [
{
"fieldname": "speaker",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Speaker",
"options": "Speaker Registration",
"reqd": 1
},
{
"fieldname": "slot",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Slot",
"options": "Slot",
"reqd": 1
},
{
"fieldname": "event",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Event",
"options": "Event Details",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-18 09:46:18.694910",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Schedule",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,18 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
class Schedule(Document):
def before_save(self):
exists = frappe.db.exists(
"Schedule",
{
"Event": self.event,
"slot": self.slot
},
)
if exists:
frappe.throw("Slot already Assigned")

View File

@@ -4,5 +4,5 @@
# import frappe
import unittest
class TestSpeaker(unittest.TestCase):
class TestSchedule(unittest.TestCase):
pass

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Talk', {
frappe.ui.form.on('Slot', {
// refresh: function(frm) {
// }

View File

@@ -0,0 +1,69 @@
{
"actions": [],
"autoname": "format:SLOT-{date}-{start_time}",
"creation": "2021-08-11 11:19:50.276917",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"event",
"date",
"start_time",
"end_time"
],
"fields": [
{
"fieldname": "event",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Event",
"options": "Event Details",
"reqd": 1
},
{
"fieldname": "date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Date",
"reqd": 1
},
{
"fieldname": "start_time",
"fieldtype": "Time",
"in_list_view": 1,
"label": "Start Time",
"reqd": 1
},
{
"fieldname": "end_time",
"fieldtype": "Time",
"in_list_view": 1,
"label": "End Time",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-18 23:51:47.850435",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Slot",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
from frappe.utils import getdate
class Slot(Document):
def before_save(self):
event = frappe.get_doc("Event Details", self.event)
if getdate(self.date) < event.start_date or getdate(self.date) > event.end_date:
frappe.throw("Slot should be in Event's span")

View File

@@ -4,5 +4,5 @@
# import frappe
import unittest
class TestTalk(unittest.TestCase):
class TestSlot(unittest.TestCase):
pass

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Speaker Registration', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,149 @@
{
"actions": [],
"autoname": "SPEAKER-REGIS.####.",
"creation": "2021-08-11 10:37:32.124651",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"speaker_info_section",
"full_name",
"email",
"phone_number",
"job_title",
"company",
"column_break_8",
"picture",
"bio",
"talk_info_section",
"topic",
"title",
"column_break_13",
"about",
"attachment",
"status"
],
"fields": [
{
"fieldname": "speaker_info_section",
"fieldtype": "Section Break",
"label": "Speaker Info"
},
{
"fieldname": "email",
"fieldtype": "Data",
"label": "Email",
"reqd": 1,
"unique": 1
},
{
"fieldname": "phone_number",
"fieldtype": "Data",
"label": "Phone Number",
"unique": 1
},
{
"fieldname": "job_title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Job Title",
"reqd": 1
},
{
"fieldname": "company",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Company",
"reqd": 1
},
{
"fieldname": "picture",
"fieldtype": "Attach Image",
"label": "Profile Image",
"reqd": 1
},
{
"fieldname": "bio",
"fieldtype": "Text",
"label": "Bio"
},
{
"fieldname": "talk_info_section",
"fieldtype": "Section Break",
"label": "Talk Info"
},
{
"fieldname": "topic",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Topic",
"options": "Delivery\nCloud\nCustomer Success\nMarketing\nDevelopment\nHR\nCustomer Stories",
"reqd": 1
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1
},
{
"fieldname": "about",
"fieldtype": "Text",
"label": "About",
"reqd": 1
},
{
"fieldname": "attachment",
"fieldtype": "Attach",
"label": "Attachment"
},
{
"fieldname": "column_break_8",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_13",
"fieldtype": "Column Break"
},
{
"default": "Applied",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"options": "Applied\nPending\nApproved\nRejected"
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Full Name",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-18 09:48:19.602309",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Speaker Registration",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,10 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
class SpeakerRegistration(Document):
def on_update(self):
pass

View File

@@ -4,5 +4,5 @@
# import frappe
import unittest
class TestAttendee(unittest.TestCase):
class TestSpeakerRegistration(unittest.TestCase):
pass

View File

@@ -1,139 +0,0 @@
{
"actions": [],
"creation": "2021-08-18 08:42:58.711932",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"event",
"title",
"url",
"column_break_5",
"speaker",
"category",
"thumbnail",
"schedule_section",
"date",
"status",
"column_break_11",
"start_time",
"end_time",
"section_break_9",
"about",
"attachment",
"name_of_the_speaker"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"label": "Title"
},
{
"fieldname": "name_of_the_speaker",
"fieldtype": "Data",
"label": "Name of the Speaker"
},
{
"fieldname": "url",
"fieldtype": "Data",
"label": "Video Embed Link"
},
{
"fieldname": "thumbnail",
"fieldtype": "Data",
"label": "Preview Image (Link)"
},
{
"fieldname": "event",
"fieldtype": "Link",
"label": "Event",
"options": "Event Details"
},
{
"fieldname": "about",
"fieldtype": "Text",
"label": "About the Talk"
},
{
"fieldname": "attachment",
"fieldtype": "Attach",
"label": "Attachment"
},
{
"fieldname": "speaker",
"fieldtype": "Link",
"label": "Speaker",
"options": "Speaker"
},
{
"default": "Pending",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"options": "Pending\nApproved\nRejected"
},
{
"fieldname": "column_break_5",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_9",
"fieldtype": "Section Break"
},
{
"fieldname": "category",
"fieldtype": "Data",
"label": "Category"
},
{
"fieldname": "schedule_section",
"fieldtype": "Section Break"
},
{
"fieldname": "date",
"fieldtype": "Date",
"label": "Date"
},
{
"fieldname": "column_break_11",
"fieldtype": "Column Break"
},
{
"fieldname": "start_time",
"fieldtype": "Time",
"label": "Start Time"
},
{
"fieldname": "end_time",
"fieldtype": "Time",
"label": "End Time"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-20 17:02:51.609288",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Talk",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}

View File

@@ -1,29 +0,0 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
class Talk(Document):
def before_save(self):
if not self.speaker:
self.save_speaker()
def save_speaker(self):
exists = frappe.db.exists({
'doctype': 'Speaker',
'user': frappe.session.user
})
if exists:
self.speaker = frappe.db.get_value(
'Speaker', {'user': frappe.session.user}, ["name"])
else:
speaker = frappe.get_doc({
"doctype": "Speaker",
"event": self.event,
"user": frappe.session.user
}).save(ignore_permissions=True)
self.speaker = speaker

View File

@@ -1,7 +1,3 @@
frappe.ready(function () {
frappe.web_form.after_save = () => {
setTimeout(function () {
window.location.href = '/event/conference2021/about';
}, 2000);
}
frappe.ready(function() {
// bind events here
})

View File

@@ -9,17 +9,16 @@
"amount": 0.0,
"amount_based_on_field": 0,
"apply_document_permissions": 0,
"button_label": "",
"creation": "2021-08-19 15:26:56.594526",
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
"doc_type": "Attendee",
"button_label": "Register",
"creation": "2021-08-11 10:08:24.418743",
"doc_type": "Attendee Registration",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-08-23 10:13:19.224367",
"modified": "2021-08-18 11:35:06.067390",
"modified_by": "Administrator",
"module": "Event Management",
"name": "attendee-registration",
@@ -27,24 +26,71 @@
"payment_button_label": "Buy Now",
"published": 1,
"route": "event/conference2021/attendee-registration",
"route_to_success_link": 1,
"route_to_success_link": 0,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 0,
"sidebar_items": [],
"success_url": "/event/conference2021/about",
"success_url": "/event/conference20221",
"title": "Attendee Registration",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldname": "user",
"fieldtype": "Data",
"fieldname": "attendee_info_section",
"fieldtype": "Section Break",
"hidden": 0,
"label": "User",
"label": "Attendee Info",
"max_length": 0,
"max_value": 0,
"options": "User",
"read_only": 1,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "name1",
"fieldtype": "Data",
"hidden": 0,
"label": "Name",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "email",
"fieldtype": "Data",
"hidden": 0,
"label": "Email",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "phone_number",
"fieldtype": "Data",
"hidden": 0,
"label": "Phone Number",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "occupation",
"fieldtype": "Data",
"hidden": 0,
"label": "Occupation",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},

View File

@@ -1,7 +1,3 @@
frappe.ready(function () {
frappe.web_form.after_save = () => {
setTimeout(function () {
window.location.href = '/event/conference2021/about';
}, 2000);
}
})
frappe.ready(function() {
// bind events here
})

View File

@@ -11,40 +11,38 @@
"apply_document_permissions": 0,
"button_label": "Save",
"creation": "2021-08-16 16:27:06.566564",
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
"doc_type": "Exhibitor",
"doc_type": "Exhibitor Registration",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-08-23 10:12:24.038572",
"modified": "2021-08-17 11:51:02.929819",
"modified_by": "Administrator",
"module": "Event Management",
"name": "exhibitor-registration",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"published": 1,
"route": "exhibitor-registration",
"route": "event/conference2021/exhibitor-registration",
"route_to_success_link": 0,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 0,
"sidebar_items": [],
"success_url": "",
"success_url": "/exhibitor-registration",
"title": "Exhibitor Registration",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldname": "user",
"fieldname": "full_name",
"fieldtype": "Data",
"hidden": 0,
"label": "User",
"label": "Full Name",
"max_length": 0,
"max_value": 0,
"options": "User",
"read_only": 1,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
@@ -62,10 +60,10 @@
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"fieldname": "logo",
"fieldtype": "Attach Image",
"hidden": 0,
"label": "Description",
"label": "Logo",
"max_length": 0,
"max_value": 0,
"read_only": 0,

View File

@@ -1,7 +0,0 @@
frappe.ready(function () {
frappe.web_form.after_save = () => {
setTimeout(function () {
window.location.href = '/event/conference2021/about';
}, 2000);
}
})

View File

@@ -1,102 +0,0 @@
{
"accept_payment": 0,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_incomplete": 0,
"allow_multiple": 0,
"allow_print": 0,
"amount": 0.0,
"amount_based_on_field": 0,
"apply_document_permissions": 0,
"button_label": "Submit",
"client_script": "",
"creation": "2021-08-19 15:16:22.341723",
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
"doc_type": "Talk",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-08-23 10:18:17.486228",
"modified_by": "Administrator",
"module": "Event Management",
"name": "purpose-a-talk",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"published": 1,
"route": "propose-talk",
"route_to_success_link": 0,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 0,
"sidebar_items": [],
"success_message": "Talk Submitted!",
"success_url": "/purpose-a-talk",
"title": "Propose a Talk",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 0,
"label": "Title",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "category",
"fieldtype": "Data",
"hidden": 0,
"label": "Category",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "event",
"fieldtype": "Data",
"hidden": 0,
"label": "Event",
"max_length": 0,
"max_value": 0,
"options": "Event Details",
"read_only": 1,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "about",
"fieldtype": "Text Editor",
"hidden": 0,
"label": "About",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "attachment",
"fieldtype": "Attach",
"hidden": 0,
"label": "Attachment",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
]
}

View File

@@ -1,5 +0,0 @@
import frappe
def get_context(context):
# do your magic here
pass

View File

@@ -1,7 +1,3 @@
frappe.ready(function () {
frappe.web_form.after_save = () => {
setTimeout(function () {
window.location.href = '/event/conference2021/propose-talk';
}, 2000);
}
frappe.ready(function() {
// bind events here
})

View File

@@ -9,55 +9,41 @@
"amount": 0.0,
"amount_based_on_field": 0,
"apply_document_permissions": 0,
"button_label": "Register",
"creation": "2021-08-19 15:29:01.167930",
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
"doc_type": "Speaker",
"button_label": "Submit",
"creation": "2021-08-11 20:52:20.308925",
"doc_type": "Speaker Registration",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "<div class=\"ql-editor read-mode\"><p><br></p></div>",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-08-20 16:16:51.107177",
"modified": "2021-08-18 20:00:46.756407",
"modified_by": "Administrator",
"module": "Event Management",
"name": "speaker-registration",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"published": 1,
"route": "speaker-registration",
"route": "event/conference2021/speaker-registration",
"route_to_success_link": 1,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 0,
"sidebar_items": [],
"success_url": "/speaker-registration",
"success_url": "/event/conference2021/about",
"title": "Speaker Registration",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldname": "event",
"fieldtype": "Link",
"fieldname": "speaker_info_section",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Event",
"label": "Speaker Info",
"max_length": 0,
"max_value": 0,
"options": "Event Details",
"read_only": 1,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "user",
"fieldtype": "Link",
"hidden": 0,
"label": "User",
"max_length": 0,
"max_value": 0,
"options": "User",
"read_only": 1,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
@@ -70,6 +56,42 @@
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "email",
"fieldtype": "Data",
"hidden": 0,
"label": "Email",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "phone_number",
"fieldtype": "Data",
"hidden": 0,
"label": "Phone Number",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "job_title",
"fieldtype": "Data",
"hidden": 0,
"label": "Job Title",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
@@ -82,8 +104,115 @@
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "picture",
"fieldtype": "Attach Image",
"hidden": 0,
"label": "Picture",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "bio",
"fieldtype": "Text",
"hidden": 0,
"label": "Bio",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "talk_info_section",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Talk Info",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "topic",
"fieldtype": "Select",
"hidden": 0,
"label": "Topic",
"max_length": 0,
"max_value": 0,
"options": "Delivery\nCloud\nCustomer Success\nMarketing\nDevelopment\nHR\nCustomer Stories",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 0,
"label": "Title",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_13",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "about",
"fieldtype": "Data",
"hidden": 0,
"label": "About",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "attachment",
"fieldtype": "Attach",
"hidden": 0,
"label": "Attachment",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
]
}

View File

@@ -1,43 +1,20 @@
<div class="section-with-cards">
<h1 class="course-home-headings">{{title}}</h1>
{%- if subtitle -%}
<p class="section-description">{{ subtitle }}</p>
{%- endif -%}
<div>
<div class="mentors-section">
{% for exhibitor in exhibitor_details %}
{% set exhibitor_doc = frappe.db.get_value("Exhibitor", exhibitor.exhibitor, ["user", "company"], as_dict= True)
%}
{% set member = frappe.get_doc("User", exhibitor_doc.user) %}
<div class="common-card-style member-card">
{% set color = member.get_palette() %}
<a class="button-links" href="/user/{{member.username}}">
<span class="avatar avatar-large" title="{{ member.full_name }}">
{% if member.user_image %}
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}"
title="{{ member.full_name }}">
</img>
{% else %}
<span class="avatar-frame standard-image" title="{{ member.full_name }}"
style="background-color: var({{color[0]}}); color: var({{color[1]}});">
{{ frappe.utils.get_abbr(member.full_name) }}
</span>
{% endif %}
</span>
</a>
<div class="small-title member-card-title">
{{ member.full_name }}
</div>
<div class="small-title">
{{exhibitor_doc.company}}
</div>
<a class="stretched-link" href=""></a>
</div>
{% endfor %}
<div class="courses-header">
<span>{{ title }}</span>
{% set cta_link = "/exhibitor-registration" if frappe.session.user != "Guest" else
"/login?redirect_to=exhibitor-registration" %}
<a href={{cta_link}} class="button is-primary pull-right">Become an Exhibitor</a>
</div>
<div class="speaker-cards-parent">
{% for exhibitor in exhibitor_details %}
{% set exhibitor_doc = frappe.db.get_value("Exhibitor Registration", exhibitor.exhibitor, ["logo", "company"],
as_dict=True) %}
<div class="common-card-style flex-column exhibitor-card">
<span>
<img class="standard-image company-logo" src="{{exhibitor_doc.logo}}" />
</span>
<div class="font-weight-bold mt-5">{{exhibitor_doc.company}}</div>
</div>
<div class="event-btn"><a href="/exhibitor-registration?new=1&user={{ frappe.session.user }}&event={{ event }}"
class="btn btn-primary ">Become an Exhibitor</a></div>
{% endfor %}
</div>
</div>

View File

@@ -33,12 +33,12 @@
"fieldname": "exhibitor",
"fieldtype": "Link",
"label": "Exhibitor",
"options": "Exhibitor",
"options": "Exhibitor Registration",
"reqd": 0
}
],
"idx": 1,
"modified": "2021-08-20 16:28:22.779057",
"modified": "2021-08-19 10:57:20.815230",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Exhibitor Section",

View File

@@ -1,3 +0,0 @@
<div class="section-with-cards">
<h1 class="course-home-headings">{{title}}</h1>
</div>

View File

@@ -0,0 +1,38 @@
<div class="section-with-cards">
<div class="course-home-headings">{{title}}</div>
<div class="speaker-cards-parent">
{% for video in talk_details %}
{% set video_details = frappe.get_doc('Previous Content', video.previous_content, filters={
'event': event
}) %}
<div class="common-card-style talk-card">
<div class="course-image" style="background-image: url({{video_details.thumbnail}})">
<div class="course-tags"></div>
</div>
<div class="course-card-content">
<div class="course-card-meta muted-text">
<span> ERPNext </span>
</div>
<div class="course-card-title">{{video_details.title}}</div>
<div class="card-divider"></div>
<div class="course-card-meta-2">
<a class="button-links" href="/rushabh">
<span class="avatar avatar-small" title="Rushabh Mehta">
<img class="avatar-frame standard-image" style="object-fit: cover"
src="{{video_details.thumbnail}}"
title={{video_details.name_of_the_speaker}} />
</span>
</a>
<span class="course-instructor"> {{video_details.name_of_the_speaker}} </span>
<span class="small-title company-name"></span>
</div>
<div class="view-talk-link">
Vew Talk
<img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
</div>
<a class="stretched-link" href="{{video_details.url}}"></a>
</div>
</div>
{% endfor %}
</div>
</div>

View File

@@ -17,6 +17,7 @@
"reqd": 0
},
{
"__unsaved": 1,
"fieldname": "event",
"fieldtype": "Link",
"label": "Event",
@@ -30,18 +31,20 @@
"reqd": 0
},
{
"fieldname": "talk",
"__islocal": 1,
"__unsaved": 1,
"fieldname": "previous_content",
"fieldtype": "Link",
"label": "Talk",
"options": "Talk",
"label": "Previous Content",
"options": "Previous Content",
"reqd": 0
}
],
"idx": 1,
"modified": "2021-08-20 10:58:45.556636",
"modified": "2021-08-18 10:03:50.193908",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Talk Section",
"name": "Previous Talk",
"owner": "Administrator",
"standard": 1,
"template": "",

View File

@@ -0,0 +1,78 @@
{% set schedule_docs = frappe.get_all("Schedule", fields =["speaker", "slot"], filters={
'event': event
},) %}
{% set slot_data = {} %}
{% for schedule in schedule_docs %}
{% set speaker = frappe.get_doc("Speaker Registration", schedule.speaker) %}
{% set slot = frappe.get_doc("Slot", schedule.slot) %}
{% set slot_data = slot_data.setdefault(slot.date, []).append({
"slot": slot.name|string,
"start_time": slot.start_time,
"end_time": slot.end_time,
"speaker": speaker.name,
"picture": speaker.picture,
"about": speaker.about,
"title": speaker.title,
"full_name": speaker.full_name,
"email": speaker.email
}) %}
{% endfor %}
<div class="courses-header">{{title}}</div>
<div class="common-page-style">
<div class="container">
<div class="course-content-parent">
<div class="course-details-outline">
<div class="course-home-outline">
<div class="coure-outline">
<div>
{% for day in slot_data %}
<div class="small-title chapter-title" data-target="#apps-sites-and-bench"
data-toggle="collapse" aria-expanded="false">
<img class="chapter-icon" src="/assets/community/icons/chevron-right.svg" />
{{day}}
</div>
<div class="card-divider"></div>
</div>
{% endfor %}
</div>
</div>
<div>
{% for day in slot_data %}
{% set outer_loop = loop %}
<div class="course-details-outline">
<div class="course-home-headings">{{day}}</div>
<div class="coure-outline">
{% for slot in slot_data[day] %}
<div class="schedule-container">
<div class="schedule-inner-container">
<span class="info-speaker-avatar">
<span class="info-avatar avatar avatar-small">
<img class="avatar-frame standard-image" src="{{slot.picture}}" />
</span>
<h6 class="info-speaker">{{slot.full_name}}</h6>
</span>
<div class="schedule-title">{{slot.title}}</div>
<div class="schedule-slot">
{{ frappe.format(slot.start_time, {'fieldtype': 'Time'})}} - {{
frappe.format(slot.end_time, {'fieldtype': 'Time'}) }}
</div>
<div class="chapter-title small-title" data-toggle="collapse" data-target="#slot-{{loop.index}}-{{outer_loop.index}}" aria-expanded="false" aria-controls="collapseExample">
<img class="chapter-icon" src="/assets/community/icons/chevron-right.svg">
</div>
</div>
<div class="collapse" id="slot-{{loop.index}}-{{outer_loop.index}}">
<p class="schedule-info">{{slot.about}}</p>
</div>
<div class="card-divider"></div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
{
"__unsaved": 1,
"creation": "2021-08-20 08:12:29.549625",
"creation": "2021-08-17 16:43:49.506200",
"docstatus": 0,
"doctype": "Web Template",
"fields": [
@@ -8,7 +8,7 @@
"fieldname": "title",
"fieldtype": "Data",
"label": "Title",
"reqd": 0
"reqd": 1
},
{
"fieldname": "subtitle",
@@ -18,24 +18,18 @@
},
{
"__unsaved": 1,
"fieldname": "hosts",
"fieldtype": "Table Break",
"label": "Hosts",
"reqd": 0
},
{
"fieldname": "host",
"fieldname": "event",
"fieldtype": "Link",
"label": "Host",
"options": "Host",
"reqd": 0
"label": "Event",
"options": "Event Details",
"reqd": 1
}
],
"idx": 0,
"modified": "2021-08-20 08:16:25.805456",
"modified": "2021-08-18 10:13:49.300196",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Host Section",
"name": "Schedule Section",
"owner": "Administrator",
"standard": 1,
"template": "",

View File

@@ -1,44 +1,23 @@
<div class="section-with-cards">
<h1 class="course-home-headings">{{section_title}}</h1>
{%- if subtitle -%}
<p class="section-description">{{ subtitle }}</p>
{%- endif -%}
<div class="mentors-section">
{% for speaker in speaker_details %}
{% set speaker_doc = frappe.db.get_value("Speaker", speaker.speaker, ["user", "company"], as_dict= True)
%}
{% set member = frappe.get_doc("User", speaker_doc.user) %}
<h1 class="course-home-headings">{{section_title}}</h1>
<div class="speaker-cards-parent">
{% for speaker in speaker_details %}
{% set speaker_doc = frappe.get_doc("Speaker Registration", speaker.speaker) %}
<div class="common-card-style member-card">
{% set color = member.get_palette() %}
<a class="button-links" href="/user/{{member.username}}">
<span class="avatar avatar-large" title="{{ member.full_name }}">
{% if member.user_image %}
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}"
title="{{ member.full_name }}">
</img>
{% else %}
<span class="avatar-frame standard-image" title="{{ member.full_name }}"
style="background-color: var({{color[0]}}); color: var({{color[1]}});">
{{ frappe.utils.get_abbr(member.full_name) }}
</span>
{% endif %}
</span>
</a>
<div class="common-card-style member-card">
<span class="avatar avatar-large">
<img class="avatar-frame" src="{{speaker_doc.picture}}" />
</span>
<div class="small-title talk-title mt-5">
{{ speaker_doc.full_name }}
</div>
<div class="small-title mt-5 bb">{{speaker_doc.job_title}}</div>
<div class="small-title company-name">{{speaker_doc.company}}</div>
</div>
{% endfor %}
<div class="small-title member-card-title">
{{ member.full_name }}
</div>
<div class="small-title">
{{speaker_doc.company}}
</div>
<a class="stretched-link" href=""></a>
</div>
{% endfor %}
</div>
<div class="event-btn">
<a href='/propose-talk?new=1&event={{ event }}' class="btn btn-primary ">Propose a Talk</a>
</div>
</div>
</div>
{%- if cta_link -%}
<div class="event-btn"><a href={{cta_link}} class="btn btn-primary ">Become a Speaker</a></div>
{%- endif -%}
</div>

View File

@@ -17,12 +17,19 @@
"reqd": 0
},
{
"__unsaved": 1,
"fieldname": "event_",
"fieldtype": "Link",
"label": "Event ",
"options": "Event Details",
"reqd": 0
},
{
"fieldname": "cta_link",
"fieldtype": "Data",
"label": "CTA Link",
"reqd": 0
},
{
"fieldname": "speaker_details",
"fieldtype": "Table Break",
@@ -33,12 +40,12 @@
"fieldname": "speaker",
"fieldtype": "Link",
"label": "Speaker",
"options": "Speaker",
"options": "Speaker Registration",
"reqd": 0
}
],
"idx": 1,
"modified": "2021-08-20 10:59:54.965714",
"modified": "2021-08-18 10:06:03.032441",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Speaker Section",

View File

@@ -1,53 +0,0 @@
<div class="section-with-cards">
<div class="course-home-headings">{{title}}</div>
{%- if subtitle -%}
<p class="section-description">{{ subtitle }}</p>
{%- endif -%}
<div class="cards-parent">
{% for talk in talk_details %}
{% set talk_doc = frappe.db.get_value('Talk', talk.talk, ["title", "category", "speaker", "url", "thumbnail"], as_dict=True) %}
{% set speaker_info = frappe.db.get_value("Speaker", talk_doc.speaker, ["user"], as_dict=True) %}
{% set member = frappe.get_doc("User", speaker_info.user) %}
<div class="common-card-style flex-column">
<div class="course-image" style="background-image: url({{talk_doc.thumbnail}})">
<div class="course-tags"></div>
</div>
<div class="course-card-content">
<div class="course-card-meta muted-text">
<span> {{talk_doc.category}} </span>
</div>
<div class="course-card-title">{{talk_doc.title}}</div>
<div class="card-divider"></div>
<div class="course-card-meta-2">
{% set color = member.get_palette() %}
<a class="button-links" href="/user/{{member.username}}">
<span class="avatar avatar-small" title="{{ member.full_name }}">
{% if member.user_image %}
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}"
title="{{ member.full_name }}">
</img>
{% else %}
<span class="avatar-frame standard-image" title="{{ member.full_name }}"
style="background-color: var({{color[0]}}); color: var({{color[1]}});">
{{ frappe.utils.get_abbr(member.full_name) }}
</span>
{% endif %}
</span>
</a>
<span class="course-instructor"> {{ member.full_name }} </span>
<span class="small-title company-name"></span>
</div>
<div class="view-talk-link">
Vew Talk
<img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
</div>
<a class="stretched-link" href="{{talk_doc.url}}"></a>
</div>
</div>
{% endfor %}
</div>
</div>

View File

@@ -146,7 +146,7 @@ primary_rules = [
{"from_route": "/courses/<course>/about", "to_route": "batch/about"},
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
{"from_route": "/courses/<course>/join", "to_route": "batch/join"},
{"from_route": "/discussions/<discussion>", "to_route": "discussions/discussion"},
{"from_route": "/discussions/<discussion>", "to_route": "discussions/discussion"}
]
# Any frappe default URL is blocked by profile-rules, add it here to unblock it
@@ -174,9 +174,7 @@ whitelist = [
"/event",
"/hello",
"/exhibitor-registration",
"/discussions",
"/propose-talk",
"/discussions"
]
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]

View File

@@ -91,8 +91,7 @@ def save_progress(lesson, course, status):
"lesson": lesson,
"status": status,
}).save(ignore_permissions=True)
course_details = frappe.get_doc("LMS Course", course)
return course_details.get_course_progress()
return "OK"
def update_progress(lesson):
user = frappe.session.user

View File

@@ -1,14 +0,0 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('LMS Certification', {
onload: function (frm) {
frm.set_query("student", function (doc) {
return {
filters: {
"ignore_user_type": 1,
}
};
});
}
});

View File

@@ -1,70 +0,0 @@
{
"actions": [],
"creation": "2021-08-16 15:47:19.494055",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"student",
"issue_date",
"column_break_3",
"course",
"expiry_date"
],
"fields": [
{
"fieldname": "student",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Student",
"options": "User"
},
{
"fieldname": "issue_date",
"fieldtype": "Date",
"label": "Issue Date"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"fieldname": "course",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Course",
"options": "LMS Course"
},
{
"fieldname": "expiry_date",
"fieldtype": "Date",
"label": "Expiry Date"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-16 15:47:19.494055",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Certification",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -1,41 +0,0 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
from frappe.utils import nowdate, add_years
from frappe import _
from frappe.utils.pdf import get_pdf
class LMSCertification(Document):
def validate(self):
certificates = frappe.get_all("LMS Certification", {
"student": self.student,
"course": self.course,
"expiry_date": [">", nowdate()]
})
if len(certificates):
full_name = frappe.db.get_value("User", self.student, "full_name")
course_name = frappe.db.get_value("LMS Course", self.course, "title")
frappe.throw(_("There is already a valid certificate for user {0} for the course {1}").format(full_name, course_name))
@frappe.whitelist()
def create_certificate(course):
course_details = frappe.get_doc("LMS Course", course)
certificate = course_details.is_certified()
if certificate:
return certificate
else:
expires_after_yrs = course_details.expiry
certificate = frappe.get_doc({
"doctype": "LMS Certification",
"student": frappe.session.user,
"course": course,
"issue_date": nowdate(),
"expiry_date": add_years(nowdate(), int(expires_after_yrs))
})
certificate.save(ignore_permissions=True)
return certificate.name

View File

@@ -1,8 +0,0 @@
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
# import frappe
import unittest
class TestLMSCertification(unittest.TestCase):
pass

View File

@@ -25,10 +25,7 @@
"section_break_5",
"short_introduction",
"description",
"chapters",
"certification_section",
"enable_certification",
"expiry"
"chapters"
],
"fields": [
{
@@ -97,25 +94,6 @@
"fieldtype": "Table",
"label": "Chapters",
"options": "Chapters"
},
{
"fieldname": "certification_section",
"fieldtype": "Section Break",
"label": "Certification"
},
{
"default": "0",
"fieldname": "enable_certification",
"fieldtype": "Check",
"label": "Enable Certification"
},
{
"default": "0",
"depends_on": "enable_certification",
"fieldname": "expiry",
"fieldtype": "Select",
"label": "Certification Expires After Years",
"options": "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10"
}
],
"index_web_pages_for_search": 1,
@@ -137,7 +115,7 @@
"link_fieldname": "course"
}
],
"modified": "2021-08-18 18:02:12.623807",
"modified": "2021-07-28 19:01:50.677445",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Course",

View File

@@ -347,16 +347,6 @@ class LMSCourse(Document):
"next": numbers[index+1] if index+1 < len(numbers) else None
}
def is_certified(self):
certificate = frappe.get_all("LMS Certification",
{
"student": frappe.session.user,
"course": self.name
})
if len(certificate):
return certificate[0].name
return
@frappe.whitelist()
def reindex_exercises(doc):
course_data = json.loads(doc)

View File

@@ -8,7 +8,7 @@ frappe.ready(function () {
frappe.web_form.after_save = () => {
setTimeout(() => {
window.location.href = `/user/${frappe.web_form.get_value(["username"])}`;
window.location.href = `/${frappe.web_form.get_value(["username"])}`;
})
}
})

View File

@@ -12,7 +12,7 @@
{% endif %}
<div class="course-author">
{% with author = course.get_instructor() %}
{{ widgets.Avatar(member=author, avatar_class="avatar-medium") }} <a href="/user/{{author.username}}">{{ author.full_name }}</a>
{{ widgets.Avatar(member=author, avatar_class="avatar-medium") }} <a href="/{{author.username}}">{{ author.full_name }}</a>
{% endwith %}
</div>
</div>

View File

@@ -1,6 +1,6 @@
<div class="instructor">
{{ widgets.Avatar(member=instructor, avatar_class="avatar-medium") }}
<a class="ml-1 instructor-title" href="/user/{{instructor.username}}">{{ instructor.full_name }}</a>
<a class="ml-1 instructor-title" href="/{{instructor.username}}">{{ instructor.full_name }}</a>
<div class="instructor-subtitle">Course Creator</div>
<!-- <div class="instructor-subtitle">Created {{instructor.get_course_count()}} courses</div> -->
</div>

View File

@@ -11,5 +11,5 @@
Created {{ course_count }} {{ suffix }}
</div>
{% endif %}
<a class="stretched-link" href="/user/{{ member.username }}"></a>
<a class="stretched-link" href="/{{ member.username }}"></a>
</div>

View File

@@ -18,7 +18,7 @@
<div class="review-card-footer">
<div>
{{ widgets.Avatar(member=review.owner_details, avatar_class="avatar-medium") }}
<a class="button-links" href="/user/{{review.owner_details.username}}">
<a class="button-links" href="/{{review.owner_details.username}}">
<span class="course-instructor">
{{ review.owner_details.full_name }}
</span>

View File

@@ -1283,6 +1283,10 @@ pre {
font-size: 1rem;
}
.talk-card {
width: 16rem;
}
.talk-title {
border-bottom: 1px solid #cecdcd;
}
@@ -1299,12 +1303,16 @@ a.talk-link {
text-decoration: none;
}
.talk-card {
flex-direction: column;
}
.speaker-cards-parent {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
-moz-column-gap: 32px;
column-gap: 14px;
row-gap: 32px;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
-moz-column-gap: 2rem;
column-gap: 2rem;
row-gap: 2rem;
}
.avatar img {
@@ -1334,6 +1342,7 @@ a.talk-link {
}
.schedule-info{
/* display: none; */
padding: 20px;
}
@@ -1354,17 +1363,15 @@ a.talk-link {
padding-bottom: 30px;
}
.exhibitor-card .company-name{
font-size: 25px;
margin-top: 30px;
}
.exhibitor-card .company-logo{
height: 158px;
width: 252px;
object-fit: contain;
}
/* .schedule-container:hover > .schedule-info {
display: block;
transition: all 0.3s ease-in-out;
} */
.info-speaker-avatar {
display: flex;
text-align: left;
@@ -1380,6 +1387,9 @@ a.talk-link {
object-fit: contain;
}
.hide{
display: none;
}
.thread-card {
flex-direction: column;
padding: 1.5rem;
@@ -1412,40 +1422,3 @@ textarea.form-control {
color: #192734;
margin-left: 0.5rem;
}
.certificate-page .common-card-style {
flex-direction: column;
font-family: Inter;
color: black;
font-size: 2rem;
text-align: center;
padding: 5rem;
background-image: url(/assets/community/images/certificate-background.png);
}
.certificate-heading {
font-size: 4rem;
margin-bottom: 3rem;
font-weight: bold;
}
.certificate-para {
margin-bottom: 3rem;
}
@media (max-width: 768px) {
.certificate-page .common-card-style {
padding: 2rem;
font-size: 1.5rem;
}
.certificate-heading {
font-size: 3rem;
}
}
@media (max-width: 360px) {
.certificate-heading {
font-size: 2rem;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

File diff suppressed because one or more lines are too long

View File

@@ -1,32 +0,0 @@
<div class="common-card-style">
<div class="certificate-heading">
Certificate of Completion
</div>
<div class="certificate-para">
This is to certify that <span class="font-weight-bold">{{ student.full_name }}</span> has successfully completed
<span class="font-weight-bold">{{ course.title }}</span> online course on
<span class="font-weight-bold">{{ frappe.utils.format_date(certificate.issue_date, "medium") }}</span>
</div>
<div style="display: flex; justify-content: space-between;" class="certificate-footer">
<div>
<div class="font-weight-bold">
Instructor:
</div>
<div>
{{ instructor.full_name }}
</div>
</div>
<div>
<div class="font-weight-bold">
Expiry Date:
</div>
<div>
{{ frappe.utils.format_date(certificate.expiry_date, "medium") }}
</div>
</div>
</div>
<div>
<img src="{{ logo }}" style="height: 50px;">
</div>
</div>
<script src="/assets/community/js/html2canvas.js"></script>

View File

@@ -2,7 +2,7 @@
<div class="mb-4">
{% set member = frappe.get_doc("User", message.owner) %}
{{ widgets.Avatar(member=member, avatar_class="avatar-small")}}
<a class="button-links" href="/user/{{ member.username }}">
<a class="button-links" href="/{{ member.username }}">
<span class="message-author">{{ member.full_name }}</span>
</a>
<span class="muted-text pull-right">{{ frappe.utils.format_datetime(message.creation, "dd MMM hh:mm") }}</span>

View File

@@ -63,7 +63,7 @@
<div>
{% if prev_url %}
<a class="button is-secondary dark-links prev" href="{{ prev_url }}">
<a class="button is-secondary dark-links" href="{{ prev_url }}">
<img class="mr-2" src="/assets/community/icons/left-arrow.svg">
Prev
</a>
@@ -87,14 +87,10 @@
<div>
{% if next_url %}
<a class="button is-primary next" href="{{ next_url }}">
<a class="button is-primary" href="{{ next_url }}">
Next
<img class="ml-2" src="/assets/community/icons/side-arrow-white.svg">
</a>
{% elif course.enable_certification %}
<div class="button is-primary {% if course.get_course_progress() != 100 %} hide {% endif %}" id="certification">
Get Certificate
</div>
{% endif %}
</div>

View File

@@ -28,10 +28,6 @@ frappe.ready(() => {
try_quiz_again(e);
});
$("#certification").click((e) => {
create_certificate(e);
})
})
var save_current_lesson = () => {
@@ -75,9 +71,8 @@ var mark_progress = (e) => {
status: status
},
callback: (data) => {
change_progress_indicators(status, e);
if (data.message == 100 && !$(".next").length && $("#certification").hasClass("hide")) {
$("#certification").removeClass("hide");
if (data.message == "OK") {
change_progress_indicators(status, e);
}
}
})
@@ -171,17 +166,3 @@ var add_to_local_storage = (quiz_name, current_index, answer, is_correct) => {
quiz_stored ? quiz_stored.push(quiz_obj) : quiz_stored = [quiz_obj]
localStorage.setItem(quiz_name, JSON.stringify(quiz_stored))
}
var create_certificate = (e) => {
e.preventDefault();
course = $(".title").attr("data-course");
frappe.call({
method: "community.lms.doctype.lms_certification.lms_certification.create_certificate",
args: {
"course": course
},
callback: (data) => {
window.location.href = `/courses/${course}/${data.message}`;
}
})
}

View File

@@ -1,25 +0,0 @@
{% extends "templates/base.html" %}
{% from "www/macros/common_macro.html" import MentorsSection %}
{% block title %} {{ student.full_name }} - {{ course.title }} {% endblock %}
{% block content %}
<div class="common-page-style">
<div class="container certificate-page">
<div class="breadcrumb">
<a class="dark-links" href="/courses">All Courses</a>
<img class="ml-1 mr-1" src="/assets/community/icons/chevron-right.svg">
<a class="dark-links" href="/courses/{{ course.name }}">{{ course.title }}</a>
</div>
{% if certificate.student == frappe.session.user %}
<div class="comment-footer mb-5">
<div class="button is-secondary pull-right" id="export-as-pdf" data-certificate="{{ certificate.name }}"
data-certificate-name="{{ student.full_name }} - {{ course.title }}">Export</div>
</div>
{% endif %}
{% include "community/templates/certificate.html" %}
</div>
</div>
{% endblock %}

View File

@@ -1,29 +0,0 @@
frappe.ready(() => {
if ($(document).width() <= 550) {
$(".certificate-footer").css("flex-direction", "column");
$(".certificate-footer").children().addClass("mb-5");
}
$("#export-as-pdf").click((e) => {
export_as_pdf(e);
})
})
var export_as_pdf = (e) => {
var button = $(e.currentTarget);
button.text(__("Exporting..."));
html2canvas(document.querySelector('.common-card-style'), {
scrollY: -window.scrollY,
scrollX: 0
}).then(function(canvas) {
let dataURL = canvas.toDataURL('image/png');
let a = document.createElement('a');
a.href = dataURL;
a.download = button.attr("data-certificate-name");
a.click();
}).finally(() => {
button.text(__("Export"))
});
}

View File

@@ -1,31 +0,0 @@
import frappe
def get_context(context):
context.no_cache = 1
try:
course_name = frappe.form_dict["course"]
certificate_name = frappe.form_dict["certificate"]
except KeyError:
redirect_to_course_list()
context.certificate = frappe.db.get_value("LMS Certification", certificate_name,
["name", "student", "issue_date", "expiry_date", "course"], as_dict=True)
if context.certificate.course != course_name:
redirect_to_course_list()
context.course = frappe.db.get_value("LMS Course", course_name,
["owner", "title", "name"], as_dict=True)
context.instructor = frappe.db.get_value("User", context.course.owner,
["full_name", "username"], as_dict=True)
context.student = frappe.db.get_value("User", context.certificate.student,
["full_name"], as_dict=True)
context.logo = frappe.db.get_single_value("Website Settings", "banner_image")
def redirect_to_course_list():
frappe.local.flags.redirect_location = "/courses"
raise frappe.Redirect

View File

@@ -70,10 +70,6 @@
<img class="ml-2" src="/assets/community/images/play.png" />
</div>
{% endif %}
{% set certificate = course.is_certified() %}
{% if certificate %}
<a class="button wide-button is-secondary dark-links" href="/courses/{{ course.name }}/{{ certificate }}">Get Certificate</a>
{% endif %}
</div>
</div>
</div>
@@ -123,7 +119,7 @@
{% if progress != 100 %}
Great work so far!
{% else %}
Excellent work on completing this course 👏
Excellent Work on completing this course 👏
{% endif %}
</p>
<p class="progress-text">

View File

@@ -67,4 +67,4 @@
})
</script>
{% endblock %}
{% endblock %}