Compare commits
159 Commits
invite-bas
...
event-mana
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c55f1f71c | ||
|
|
eb58b1c149 | ||
|
|
af9760f944 | ||
|
|
21b2412362 | ||
|
|
7e5e167eec | ||
|
|
7c3189e273 | ||
|
|
ace74febc7 | ||
|
|
8dbdabd52c | ||
|
|
f0ee8d7b88 | ||
|
|
7e5203f058 | ||
|
|
a3672e9d91 | ||
|
|
7017382451 | ||
|
|
6c9d49bf8c | ||
|
|
2de058246b | ||
|
|
798ea30382 | ||
|
|
3e2c6b3343 | ||
|
|
5ea744de5c | ||
|
|
aedb3d3d45 | ||
|
|
83a2f42df9 | ||
|
|
66aace247c | ||
|
|
bc3db06960 | ||
|
|
ddaa063587 | ||
|
|
f9b4fe468e | ||
|
|
6cbca8d1bb | ||
|
|
d5067a4bcd | ||
|
|
04d44510de | ||
|
|
844fcc9bca | ||
|
|
145b5efab0 | ||
|
|
4079ed97b9 | ||
|
|
63d70fc037 | ||
|
|
ce86b5deda | ||
|
|
037e946bbe | ||
|
|
a51c8de1eb | ||
|
|
53dc517180 | ||
|
|
44ca940c6b | ||
|
|
c0b688c720 | ||
|
|
861d5f231d | ||
|
|
d14b4f55a6 | ||
|
|
db9a6c3eda | ||
|
|
a667643681 | ||
|
|
f278e4b6a5 | ||
|
|
33a12c2dec | ||
|
|
508f90f459 | ||
|
|
709f0c2274 | ||
|
|
be47700e7c | ||
|
|
40842830a4 | ||
|
|
11d070fa0d | ||
|
|
dd2f830a33 | ||
|
|
5431fcb450 | ||
|
|
324033e9ee | ||
|
|
86596d0cfe | ||
|
|
9323cfd748 | ||
|
|
d125b02cec | ||
|
|
282c4c5351 | ||
|
|
276d64a66a | ||
|
|
79eb381a41 | ||
|
|
44f9c0dfd3 | ||
|
|
0ca4cd724e | ||
|
|
8a3e31f021 | ||
|
|
9be8a1af0b | ||
|
|
b9cac20613 | ||
|
|
e6d5e6d37b | ||
|
|
0abfcac7da | ||
|
|
b70e8b9acc | ||
|
|
3b1e1aa3c3 | ||
|
|
8f74c74d50 | ||
|
|
d2f435016c | ||
|
|
389b35802b | ||
|
|
a9192a74f9 | ||
|
|
1366c7cf75 | ||
|
|
eaa9e8e3ea | ||
|
|
5ecae0df61 | ||
|
|
4891be1d8c | ||
|
|
ec852fc255 | ||
|
|
47f2d3cb7b | ||
|
|
37820c1e19 | ||
|
|
230fab3bb2 | ||
|
|
d292d2d093 | ||
|
|
51d5db01e9 | ||
|
|
0fd760df81 | ||
|
|
71d0a89968 | ||
|
|
d939a63412 | ||
|
|
daaa2d2fe2 | ||
|
|
6dd7cb19df | ||
|
|
b1de2481a8 | ||
|
|
27c01b3b0c | ||
|
|
b7aa9aff51 | ||
|
|
524a041fb9 | ||
|
|
9de0203914 | ||
|
|
0ed5309b97 | ||
|
|
68fd32d536 | ||
|
|
5ea3b25d21 | ||
|
|
2c24412633 | ||
|
|
1b8a45ba4a | ||
|
|
3dd4adbc1f | ||
|
|
0c52c9c4bc | ||
|
|
9caf44cdbd | ||
|
|
45d88bdc08 | ||
|
|
94b3ccd3d9 | ||
|
|
ee8273fd30 | ||
|
|
60c1449f40 | ||
|
|
67708325ae | ||
|
|
3e99577401 | ||
|
|
5e916dc2c8 | ||
|
|
0c64d46e99 | ||
|
|
3aa974f8bd | ||
|
|
621d01d502 | ||
|
|
aa20136223 | ||
|
|
9bc5408a44 | ||
|
|
5a7afb3092 | ||
|
|
f8948ac2ef | ||
|
|
8b1576a028 | ||
|
|
56d8a72a7d | ||
|
|
f6c11ce52f | ||
|
|
0284c9305c | ||
|
|
d785fb7562 | ||
|
|
9f50af4ebd | ||
|
|
4c3645f0d4 | ||
|
|
20b3ae7d76 | ||
|
|
f303be4db5 | ||
|
|
fc1c393f15 | ||
|
|
5d96bf544d | ||
|
|
5abfa35095 | ||
|
|
6c751cdf39 | ||
|
|
2c570ea214 | ||
|
|
ecfcc8a2f7 | ||
|
|
3384f974e5 | ||
|
|
eb435261fe | ||
|
|
dc7eabefb9 | ||
|
|
fed4b5568b | ||
|
|
aa77c60abd | ||
|
|
9c1506d3c8 | ||
|
|
e94c3f27ab | ||
|
|
5fa8bdd40c | ||
|
|
17f03aeee7 | ||
|
|
7840512a13 | ||
|
|
526ded784b | ||
|
|
6b5ddcd54a | ||
|
|
c42247db42 | ||
|
|
8f8d4901ff | ||
|
|
f5f3c808d4 | ||
|
|
1e3152e303 | ||
|
|
344661cf83 | ||
|
|
d9185c0b6b | ||
|
|
5363fb7eb3 | ||
|
|
1cb81de5c0 | ||
|
|
d90a1247f1 | ||
|
|
ef0c3e4a24 | ||
|
|
3619b136f8 | ||
|
|
671b4a0650 | ||
|
|
586b39c0fd | ||
|
|
4fd7af053b | ||
|
|
5fd1143f76 | ||
|
|
0dc4743556 | ||
|
|
c96a14c972 | ||
|
|
400e706be1 | ||
|
|
a12a52747e | ||
|
|
b9a93bb160 | ||
|
|
9c65ff8ae6 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,3 +5,6 @@
|
|||||||
tags
|
tags
|
||||||
community/docs/current
|
community/docs/current
|
||||||
community/public/dist
|
community/public/dist
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Discussion Message', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -1,67 +1,53 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"creation": "2021-03-19 12:19:32.355307",
|
"creation": "2021-08-11 10:59:38.597046",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"author",
|
"thread",
|
||||||
"batch",
|
"column_break_2",
|
||||||
"column_break_3",
|
"parent_message",
|
||||||
"author_name",
|
"section_break_4",
|
||||||
"pin",
|
|
||||||
"section_break_6",
|
|
||||||
"message"
|
"message"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
|
||||||
"fieldname": "batch",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Batch",
|
|
||||||
"options": "LMS Batch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "author",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Author",
|
|
||||||
"options": "User"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "message",
|
"fieldname": "message",
|
||||||
"fieldtype": "Markdown Editor",
|
"fieldtype": "Long Text",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Message"
|
"label": "Message"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"fieldname": "thread",
|
||||||
"fieldname": "pin",
|
"fieldtype": "Link",
|
||||||
"fieldtype": "Check",
|
"in_list_view": 1,
|
||||||
"label": "Pin"
|
"in_standard_filter": 1,
|
||||||
|
"label": "Thread",
|
||||||
|
"options": "Discussion Thread"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fetch_from": "author.full_name",
|
"fieldname": "column_break_2",
|
||||||
"fieldname": "author_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"label": "Author Name",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "column_break_3",
|
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "section_break_6",
|
"fieldname": "parent_message",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Parent Message",
|
||||||
|
"options": "Discussion Message"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_4",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-21 11:49:34.911479",
|
"modified": "2021-08-12 15:59:04.811286",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "Community",
|
||||||
"name": "LMS Message",
|
"name": "Discussion Message",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
@@ -77,9 +63,7 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"title_field": "author",
|
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
from community.widgets import Widget, Widgets
|
||||||
|
|
||||||
|
class DiscussionMessage(Document):
|
||||||
|
def after_insert(self):
|
||||||
|
data = {
|
||||||
|
"message": self,
|
||||||
|
"widgets": Widgets()
|
||||||
|
}
|
||||||
|
template = frappe.render_template("community/templates/message_card.html", data)
|
||||||
|
thread_info = frappe.db.get_value("Discussion Thread", self.thread, ["reference_doctype", "reference_docname"], as_dict=True)
|
||||||
|
frappe.publish_realtime(event="publish_message",
|
||||||
|
message = {
|
||||||
|
"thread": self.thread,
|
||||||
|
"template": template,
|
||||||
|
"thread_info": thread_info
|
||||||
|
},
|
||||||
|
after_commit=True)
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2021, FOSS United and Contributors
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
# import frappe
|
# import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestLMSSketch(unittest.TestCase):
|
class TestDiscussionMessage(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Discussion Thread', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 10:55:29.341674",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"title",
|
||||||
|
"reference_doctype",
|
||||||
|
"reference_docname"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "reference_doctype",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Reference Doctype",
|
||||||
|
"options": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "reference_docname",
|
||||||
|
"fieldtype": "Dynamic Link",
|
||||||
|
"label": "Reference Docname",
|
||||||
|
"options": "reference_doctype"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-11 12:29:43.564123",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Discussion Thread",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"search_fields": "title",
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"title_field": "title",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class DiscussionThread(Document):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def submit_discussion(doctype, docname, message, title=None, thread_name=None):
|
||||||
|
thread = []
|
||||||
|
filters = {}
|
||||||
|
if doctype and docname:
|
||||||
|
filters = {
|
||||||
|
"reference_doctype": doctype,
|
||||||
|
"reference_docname": docname
|
||||||
|
}
|
||||||
|
|
||||||
|
elif thread_name:
|
||||||
|
filters = {
|
||||||
|
"name": thread_name
|
||||||
|
}
|
||||||
|
|
||||||
|
if filters:
|
||||||
|
thread = frappe.get_all("Discussion Thread",filters)
|
||||||
|
if len(thread):
|
||||||
|
thread = thread[0]
|
||||||
|
save_message(message, thread)
|
||||||
|
|
||||||
|
else:
|
||||||
|
thread = frappe.get_doc({
|
||||||
|
"doctype": "Discussion Thread",
|
||||||
|
"title": title,
|
||||||
|
"reference_doctype": doctype,
|
||||||
|
"reference_docname": docname
|
||||||
|
})
|
||||||
|
thread.save(ignore_permissions=True)
|
||||||
|
save_message(message, thread)
|
||||||
|
|
||||||
|
return thread.name
|
||||||
|
|
||||||
|
def save_message(message, thread):
|
||||||
|
frappe.get_doc({
|
||||||
|
"doctype": "Discussion Message",
|
||||||
|
"message": message,
|
||||||
|
"thread": thread.name
|
||||||
|
}).save(ignore_permissions=True)
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2021, FOSS United and Contributors
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
# import frappe
|
# import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestLMSMessage(unittest.TestCase):
|
class TestDiscussionThread(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{% set color = member.get_palette() %}
|
{% set color = member.get_palette() %}
|
||||||
<a href="/{{member.username}}">
|
<a class="button-links" href="/{{member.username}}">
|
||||||
<span class="avatar {{ avatar_class }}" title="{{ member.full_name }}">
|
<span class="avatar {{ avatar_class }}" title="{{ member.full_name }}">
|
||||||
{% if member.user_image %}
|
{% if member.user_image %}
|
||||||
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}" title="{{ member.full_name }}">
|
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}" title="{{ member.full_name }}">
|
||||||
|
|||||||
70
community/community/widgets/DiscussionComment.html
Normal file
70
community/community/widgets/DiscussionComment.html
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<div class="discussions">
|
||||||
|
|
||||||
|
<form class="discussion-form {% if doctype or thread %} discussion-on-page {% endif %}" id="discussion-form">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group" {% if title or thread %} style="display: none;" {% endif %}>
|
||||||
|
<div class="control-input-wrapper">
|
||||||
|
<div class="control-input">
|
||||||
|
<input type="text" autocomplete="off" class="input-with-feedback form-control thread-title"
|
||||||
|
data-fieldtype="Data" data-fieldname="feedback_comments" placeholder="Title" spellcheck="false" {% if title
|
||||||
|
%} value="{{ title }}" {% endif %}></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="control-input-wrapper">
|
||||||
|
<div class="control-input">
|
||||||
|
<textarea type="text" autocomplete="off" class="input-with-feedback form-control comment-field"
|
||||||
|
data-fieldtype="Text" data-fieldname="feedback_comments" placeholder="Enter a comment..."
|
||||||
|
spellcheck="false"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="comment-footer">
|
||||||
|
<div class="button is-secondary pull-right" id="submit-discussion"
|
||||||
|
{% if doctype %} data-doctype="{{ doctype | urlencode}}" {% endif %}
|
||||||
|
{% if docname %} data-docname="{{ docname | urlencode}}" {% endif %}
|
||||||
|
{% if thread %} data-thread="{{ thread }}" {% endif %}>
|
||||||
|
Post</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
frappe.ready(() => {
|
||||||
|
$("#submit-discussion").click((e) => {
|
||||||
|
submit_discussion(e);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
var submit_discussion = (e) => {
|
||||||
|
var message = $(".comment-field").val().trim();
|
||||||
|
|
||||||
|
if (message) {
|
||||||
|
var doctype = $(e.currentTarget).attr("data-doctype");
|
||||||
|
doctype = doctype ? decodeURIComponent(doctype) : doctype;
|
||||||
|
|
||||||
|
var docname = $(e.currentTarget).attr("data-docname");
|
||||||
|
docname = docname ? decodeURIComponent(docname) : docname;
|
||||||
|
|
||||||
|
frappe.call({
|
||||||
|
method: "community.community.doctype.discussion_thread.discussion_thread.submit_discussion",
|
||||||
|
args: {
|
||||||
|
"doctype": doctype ? doctype : "",
|
||||||
|
"docname": docname ? docname : "",
|
||||||
|
"message": $(".comment-field").val(),
|
||||||
|
"title": $(".thread-title").val(),
|
||||||
|
"thread_name": $(e.currentTarget).attr("data-thread")
|
||||||
|
},
|
||||||
|
callback: (data) => {
|
||||||
|
if (! $(".discussion-on-page").length) {
|
||||||
|
$("#discussion-modal").modal("hide");
|
||||||
|
window.location.href = `/discussions/${data.message}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
80
community/community/widgets/DiscussionMessage.html
Normal file
80
community/community/widgets/DiscussionMessage.html
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{% if doctype and docname and not thread %}
|
||||||
|
|
||||||
|
{% set thread_info = frappe.get_all("Discussion Thread", {"reference_doctype": doctype, "reference_docname": docname},
|
||||||
|
["name"]) %}
|
||||||
|
|
||||||
|
{% if thread_info | length %}
|
||||||
|
{% set thread = thread_info[0].name %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if thread %}
|
||||||
|
{% set messages = frappe.get_all("Discussion Message", {"thread": thread}, ["name", "message", "owner", "creation"],
|
||||||
|
order_by="creation") %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if doctype %}
|
||||||
|
<div class="course-home-headings mt-5"> Discussions </div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="messages mt-5">
|
||||||
|
{% for message in messages %}
|
||||||
|
{% include "community/templates/message_card.html" %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if frappe.session.user == "Guest" or (condition is defined and not condition) %}
|
||||||
|
<div class="d-flex flex-column align-items-center font-weight-bold">
|
||||||
|
Want to join the discussion?
|
||||||
|
{% if frappe.session.user == "Guest" %}
|
||||||
|
<div class="button is-primary" id="login-from-discussion">Log In</div>
|
||||||
|
{% elif not condition %}
|
||||||
|
<div class="button is-primary" id="login-from-discussion" data-redirect="{{ redirect_to }}">{{ button_name }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
{{ widgets.DiscussionComment(doctype=doctype, docname=docname, title=title, thread=thread ) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
frappe.ready(() => {
|
||||||
|
setup_socket_io();
|
||||||
|
|
||||||
|
$("#login-from-discussion").click((e) => {
|
||||||
|
login_from_discussion(e);
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
var setup_socket_io = () => {
|
||||||
|
const assets = [
|
||||||
|
"/assets/frappe/js/lib/socket.io.min.js",
|
||||||
|
"/assets/frappe/js/frappe/socketio_client.js",
|
||||||
|
]
|
||||||
|
frappe.require(assets, () => {
|
||||||
|
|
||||||
|
if (window.dev_server) {
|
||||||
|
frappe.boot.socketio_port = "9000";
|
||||||
|
}
|
||||||
|
|
||||||
|
frappe.socketio.init(9000);
|
||||||
|
var target = $("#submit-discussion");
|
||||||
|
|
||||||
|
frappe.socketio.socket.on("publish_message", (data) => {
|
||||||
|
if (target.attr("data-thread") == data.thread
|
||||||
|
|| (decodeURIComponent(target.attr("data-doctype")) == data.thread_info.reference_doctype
|
||||||
|
&& decodeURIComponent(target.attr("data-docname")) == data.thread_info.reference_docname)) {
|
||||||
|
$(".comment-field").val("");
|
||||||
|
$(".messages").append(data.template);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var login_from_discussion = (e) => {
|
||||||
|
var redirect = $(e.currentTarget).attr("data-redirect") || window.location.href;
|
||||||
|
window.location.href = `/login?redirect-to=${redirect}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -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) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 10:07:53.262504",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"attendee_info_section",
|
||||||
|
"name1",
|
||||||
|
"email",
|
||||||
|
"phone_number",
|
||||||
|
"occupation",
|
||||||
|
"company",
|
||||||
|
"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",
|
||||||
|
"label": "Company"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "what_are_you_hoping_to_learn",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"label": "What are you hoping to learn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-11 10:07:53.262504",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Attendee 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
|
||||||
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2021, FOSS United and contributors
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class CodeRevision(Document):
|
class AttendeeRegistration(Document):
|
||||||
pass
|
pass
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2021, FOSS United and Contributors
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
# import frappe
|
# import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestCodeRevision(unittest.TestCase):
|
class TestAttendeeRegistration(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2021, FOSS United and contributors
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Code Revision', {
|
frappe.ui.form.on('Event Details', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:event_name",
|
||||||
|
"creation": "2021-08-11 10:05:41.072432",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event_name",
|
||||||
|
"start_date",
|
||||||
|
"end_date",
|
||||||
|
"event_description"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "event_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Event Name",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "start_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Start Date",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "end_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "End Date",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event_description",
|
||||||
|
"fieldtype": "Markdown Editor",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Event Description"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-18 23:51:30.432691",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Event Details",
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class EventDetails(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestEventDetails(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Event Ticket', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 11:17:28.452289",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"ticket",
|
||||||
|
"attendee"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "ticket",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Ticket"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "attendee",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "attendee",
|
||||||
|
"options": "Attendee Registration"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-18 09:51:14.654098",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Event Ticket",
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class EventTicket(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestEventTicket(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -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) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class ExhibitorRegistration(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestExhibitorRegistration(unittest.TestCase):
|
||||||
|
pass
|
||||||
0
community/event_management/doctype/host/__init__.py
Normal file
0
community/event_management/doctype/host/__init__.py
Normal file
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2021, FOSS United and contributors
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('LMS Sketch', {
|
frappe.ui.form.on('Host', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
65
community/event_management/doctype/host/host.json
Normal file
65
community/event_management/doctype/host/host.json
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:full_name",
|
||||||
|
"creation": "2021-08-11 10:51:47.234690",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"full_name",
|
||||||
|
"user_image",
|
||||||
|
"title"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"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_image",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Image"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-11 23:54:17.790263",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Host",
|
||||||
|
"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
|
||||||
|
}
|
||||||
8
community/event_management/doctype/host/host.py
Normal file
8
community/event_management/doctype/host/host.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Host(Document):
|
||||||
|
pass
|
||||||
8
community/event_management/doctype/host/test_host.py
Normal file
8
community/event_management/doctype/host/test_host.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestHost(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Previous Content', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"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",
|
||||||
|
"title",
|
||||||
|
"name_of_the_speaker",
|
||||||
|
"url",
|
||||||
|
"thumbnail"
|
||||||
|
],
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-18 09:37:03.278439",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Previous Content",
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class PreviousContent(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestPreviousContent(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2021, FOSS United and contributors
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('LMS Message', {
|
frappe.ui.form.on('Schedule', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
63
community/event_management/doctype/schedule/schedule.json
Normal file
63
community/event_management/doctype/schedule/schedule.json
Normal 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
|
||||||
|
}
|
||||||
18
community/event_management/doctype/schedule/schedule.py
Normal file
18
community/event_management/doctype/schedule/schedule.py
Normal 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")
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestSchedule(unittest.TestCase):
|
||||||
|
pass
|
||||||
0
community/event_management/doctype/slot/__init__.py
Normal file
0
community/event_management/doctype/slot/__init__.py
Normal file
8
community/event_management/doctype/slot/slot.js
Normal file
8
community/event_management/doctype/slot/slot.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Slot', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
69
community/event_management/doctype/slot/slot.json
Normal file
69
community/event_management/doctype/slot/slot.json
Normal 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
|
||||||
|
}
|
||||||
14
community/event_management/doctype/slot/slot.py
Normal file
14
community/event_management/doctype/slot/slot.py
Normal 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")
|
||||||
|
|
||||||
8
community/event_management/doctype/slot/test_slot.py
Normal file
8
community/event_management/doctype/slot/test_slot.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestSlot(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -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) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestSpeakerRegistration(unittest.TestCase):
|
||||||
|
pass
|
||||||
0
community/event_management/web_form/__init__.py
Normal file
0
community/event_management/web_form/__init__.py
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
{
|
||||||
|
"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": "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-18 11:35:06.067390",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "attendee-registration",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "event/conference2021/attendee-registration",
|
||||||
|
"route_to_success_link": 0,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/event/conference20221",
|
||||||
|
"title": "Attendee Registration",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "attendee_info_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Attendee Info",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"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
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "what_are_you_hoping_to_learn",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "What are you hoping to learn",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
frappe.ready(function() {
|
||||||
|
// bind events here
|
||||||
|
})
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"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": "Save",
|
||||||
|
"creation": "2021-08-16 16:27:06.566564",
|
||||||
|
"doc_type": "Exhibitor Registration",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 1,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"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": "event/conference2021/exhibitor-registration",
|
||||||
|
"route_to_success_link": 0,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/exhibitor-registration",
|
||||||
|
"title": "Exhibitor Registration",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Full Name",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Company ",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "logo",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Logo",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
# do your magic here
|
||||||
|
pass
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
frappe.ready(function() {
|
||||||
|
// bind events here
|
||||||
|
})
|
||||||
@@ -0,0 +1,218 @@
|
|||||||
|
{
|
||||||
|
"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",
|
||||||
|
"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-18 20:00:46.756407",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "speaker-registration",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "event/conference2021/speaker-registration",
|
||||||
|
"route_to_success_link": 1,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/event/conference2021/about",
|
||||||
|
"title": "Speaker Registration",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "speaker_info_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Speaker Info",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Full 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": "job_title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Job Title",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
# do your magic here
|
||||||
|
pass
|
||||||
0
community/event_management/web_template/__init__.py
Normal file
0
community/event_management/web_template/__init__.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<div class="section-with-cards">
|
||||||
|
<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>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-13 15:05:41.606772",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "exhibitor_details",
|
||||||
|
"fieldtype": "Table Break",
|
||||||
|
"label": "Exhibitor Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "exhibitor",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Exhibitor",
|
||||||
|
"options": "Exhibitor Registration",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 1,
|
||||||
|
"modified": "2021-08-19 10:57:20.815230",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Exhibitor Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-13 11:34:07.611034",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "talk_details",
|
||||||
|
"fieldtype": "Table Break",
|
||||||
|
"label": "Talk Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__islocal": 1,
|
||||||
|
"__unsaved": 1,
|
||||||
|
"fieldname": "previous_content",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Previous Content",
|
||||||
|
"options": "Previous Content",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 1,
|
||||||
|
"modified": "2021-08-18 10:03:50.193908",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Previous Talk",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-17 16:43:49.506200",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details",
|
||||||
|
"reqd": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2021-08-18 10:13:49.300196",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Schedule Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<div class="section-with-cards">
|
||||||
|
<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">
|
||||||
|
<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>
|
||||||
|
{%- if cta_link -%}
|
||||||
|
<div class="event-btn"><a href={{cta_link}} class="btn btn-primary ">Become a Speaker</a></div>
|
||||||
|
{%- endif -%}
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-12 21:15:14.492000",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "section_title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Section Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"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",
|
||||||
|
"label": "Speaker Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "speaker",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Speaker",
|
||||||
|
"options": "Speaker Registration",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 1,
|
||||||
|
"modified": "2021-08-18 10:06:03.032441",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Speaker Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
373
community/fixtures/custom_field.json
Normal file
373
community/fixtures/custom_field.json
Normal file
@@ -0,0 +1,373 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "linkedin",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "mobile_no",
|
||||||
|
"label": "LinkedIn ID",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-linkedin",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "github",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "linkedin",
|
||||||
|
"label": "Github ID",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-github",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "medium",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "github",
|
||||||
|
"label": "Medium ID",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-medium",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "city",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "mute_sounds",
|
||||||
|
"label": "City",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-city",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "college",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "city",
|
||||||
|
"label": "College Name",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-college",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "branch",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "college",
|
||||||
|
"label": "Branch",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-branch",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": null,
|
||||||
|
"columns": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Custom Field",
|
||||||
|
"dt": "User",
|
||||||
|
"fetch_from": null,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "profession",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"hide_border": 0,
|
||||||
|
"hide_days": 0,
|
||||||
|
"hide_seconds": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_preview": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"insert_after": "medium",
|
||||||
|
"label": "Profession",
|
||||||
|
"length": 0,
|
||||||
|
"mandatory_depends_on": null,
|
||||||
|
"modified": "2021-06-30 14:46:55.834145",
|
||||||
|
"name": "User-profession",
|
||||||
|
"no_copy": 0,
|
||||||
|
"non_negative": 0,
|
||||||
|
"options": null,
|
||||||
|
"parent": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_depends_on": null,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"translatable": 1,
|
||||||
|
"unique": 0,
|
||||||
|
"width": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -3,13 +3,14 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
class CommunityProjectMember(Document):
|
class CommunityProjectMember(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_if_already_member()
|
self.validate_if_already_member()
|
||||||
|
|
||||||
def validate_if_already_member(self):
|
def validate_if_already_member(self):
|
||||||
if frappe.get_all("Community Project Member", {"owner": self.owner}):
|
if frappe.get_all("Community Project Member", {"owner": self.owner}):
|
||||||
frappe.throw(_("You have already applied for the membership of this project."))
|
frappe.throw(_("You have already applied for the membership of this project."))
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ doc_events = {
|
|||||||
# ]
|
# ]
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
fixtures = ["Custom Field"]
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
# -------
|
# -------
|
||||||
|
|
||||||
@@ -134,17 +136,17 @@ primary_rules = [
|
|||||||
{"from_route": "/courses/<course>/<topic>", "to_route": "courses/topic"},
|
{"from_route": "/courses/<course>/<topic>", "to_route": "courses/topic"},
|
||||||
{"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"},
|
{"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"},
|
||||||
{"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"},
|
{"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"},
|
||||||
{"from_route": "/dashboard", "to_route": ""},
|
|
||||||
{"from_route": "/add-a-new-batch", "to_route": "add-a-new-batch"},
|
{"from_route": "/add-a-new-batch", "to_route": "add-a-new-batch"},
|
||||||
{"from_route": "/courses/<course>/<batch>/home", "to_route": "batch/home"},
|
{"from_route": "/courses/<course>/home", "to_route": "batch/home"},
|
||||||
{"from_route": "/courses/<course>/<batch>/learn", "to_route": "batch/learn"},
|
{"from_route": "/courses/<course>/learn", "to_route": "batch/learn"},
|
||||||
{"from_route": "/courses/<course>/<batch>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
|
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
|
||||||
{"from_route": "/courses/<course>/<batch>/schedule", "to_route": "batch/schedule"},
|
{"from_route": "/courses/<course>/schedule", "to_route": "batch/schedule"},
|
||||||
{"from_route": "/courses/<course>/<batch>/members", "to_route": "batch/members"},
|
{"from_route": "/courses/<course>/members", "to_route": "batch/members"},
|
||||||
{"from_route": "/courses/<course>/<batch>/discuss", "to_route": "batch/discuss"},
|
{"from_route": "/courses/<course>/discuss", "to_route": "batch/discuss"},
|
||||||
{"from_route": "/courses/<course>/<batch>/about", "to_route": "batch/about"},
|
{"from_route": "/courses/<course>/about", "to_route": "batch/about"},
|
||||||
{"from_route": "/courses/<course>/<batch>/progress", "to_route": "batch/progress"},
|
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
|
||||||
{"from_route": "/courses/<course>/<batch>/join", "to_route": "batch/join"}
|
{"from_route": "/courses/<course>/join", "to_route": "batch/join"},
|
||||||
|
{"from_route": "/discussions/<discussion>", "to_route": "discussions/discussion"}
|
||||||
]
|
]
|
||||||
|
|
||||||
# Any frappe default URL is blocked by profile-rules, add it here to unblock it
|
# Any frappe default URL is blocked by profile-rules, add it here to unblock it
|
||||||
@@ -161,10 +163,18 @@ whitelist = [
|
|||||||
"/socket.io",
|
"/socket.io",
|
||||||
"/hackathons",
|
"/hackathons",
|
||||||
"/dashboard",
|
"/dashboard",
|
||||||
"/join-request"
|
"/join-request",
|
||||||
"/add-a-new-batch",
|
"/add-a-new-batch",
|
||||||
"/new-sign-up",
|
"/new-sign-up",
|
||||||
"/message"
|
"/message",
|
||||||
|
"/about",
|
||||||
|
"/edit-profile",
|
||||||
|
"/attendee-registration",
|
||||||
|
"/speaker-registration",
|
||||||
|
"/event",
|
||||||
|
"/hello",
|
||||||
|
"/exhibitor-registration",
|
||||||
|
"/discussions"
|
||||||
]
|
]
|
||||||
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]
|
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]
|
||||||
|
|
||||||
@@ -175,4 +185,28 @@ profile_rules = [
|
|||||||
|
|
||||||
website_route_rules = primary_rules + whitelist_rules + profile_rules
|
website_route_rules = primary_rules + whitelist_rules + profile_rules
|
||||||
|
|
||||||
|
website_redirects = [
|
||||||
|
{"source": "/update-profile", "target": "/edit-profile"},
|
||||||
|
]
|
||||||
|
|
||||||
update_website_context = 'community.widgets.update_website_context'
|
update_website_context = 'community.widgets.update_website_context'
|
||||||
|
|
||||||
|
## Specify the additional tabs to be included in the user profile page.
|
||||||
|
## Each entry must be a subclass of community.community.plugins.ProfileTab
|
||||||
|
# profile_tabs = []
|
||||||
|
|
||||||
|
## Specify the extension to be used to control what scripts and stylesheets
|
||||||
|
## to be included in lesson pages. The specified value must be be a
|
||||||
|
## subclass of community.community.plugins.PageExtension
|
||||||
|
# community_lesson_page_extension = None
|
||||||
|
|
||||||
|
community_lesson_page_extensions = [
|
||||||
|
"community.plugins.LiveCodeExtension"
|
||||||
|
]
|
||||||
|
|
||||||
|
## Markdown Macros for Lessons
|
||||||
|
community_markdown_macro_renderers = {
|
||||||
|
"Exercise": "community.plugins.exercise_renderer",
|
||||||
|
"Quiz": "community.plugins.quiz_renderer",
|
||||||
|
"YouTubeVideo": "community.plugins.youtube_video_renderer",
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,13 +15,6 @@ def autosave_section(section, code):
|
|||||||
doc.insert()
|
doc.insert()
|
||||||
return {"name": doc.name}
|
return {"name": doc.name}
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_section(name):
|
|
||||||
"""Saves the code edited in one of the sections.
|
|
||||||
"""
|
|
||||||
doc = frappe.get_doc("LMS Section", name)
|
|
||||||
return doc and doc.as_dict()
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def submit_solution(exercise, code):
|
def submit_solution(exercise, code):
|
||||||
"""Submits a solution.
|
"""Submits a solution.
|
||||||
@@ -36,14 +29,14 @@ def submit_solution(exercise, code):
|
|||||||
return {"name": doc.name, "creation": doc.creation}
|
return {"name": doc.name, "creation": doc.creation}
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def save_current_lesson(batch_name, lesson_name):
|
def save_current_lesson(course_name, lesson_name):
|
||||||
"""Saves the current lesson for a student/mentor.
|
"""Saves the current lesson for a student/mentor.
|
||||||
"""
|
"""
|
||||||
name = frappe.get_value(
|
name = frappe.get_value(
|
||||||
doctype="LMS Batch Membership",
|
doctype="LMS Batch Membership",
|
||||||
filters={
|
filters={
|
||||||
"batch": batch_name,
|
"course": course_name,
|
||||||
"member_email": frappe.session.user
|
"member": frappe.session.user
|
||||||
},
|
},
|
||||||
fieldname="name")
|
fieldname="name")
|
||||||
if not name:
|
if not name:
|
||||||
|
|||||||
@@ -2,7 +2,15 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Chapter', {
|
frappe.ui.form.on('Chapter', {
|
||||||
// refresh: function(frm) {
|
|
||||||
|
|
||||||
// }
|
onload: function (frm) {
|
||||||
|
frm.set_query("lesson", "lessons", function () {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"chapter": frm.doc.name,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
"course",
|
"course",
|
||||||
"title",
|
"title",
|
||||||
"description",
|
"description",
|
||||||
"locked",
|
"lessons"
|
||||||
"index_"
|
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -24,12 +23,6 @@
|
|||||||
"fieldtype": "Markdown Editor",
|
"fieldtype": "Markdown Editor",
|
||||||
"label": "Description"
|
"label": "Description"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"default": "0",
|
|
||||||
"fieldname": "locked",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"label": "Locked"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "course",
|
"fieldname": "course",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -38,10 +31,10 @@
|
|||||||
"options": "LMS Course"
|
"options": "LMS Course"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "1",
|
"fieldname": "lessons",
|
||||||
"fieldname": "index_",
|
"fieldtype": "Table",
|
||||||
"fieldtype": "Int",
|
"label": "Lessons",
|
||||||
"label": "Index"
|
"options": "Lessons"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
@@ -52,7 +45,7 @@
|
|||||||
"link_fieldname": "chapter"
|
"link_fieldname": "chapter"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2021-05-13 21:05:20.531890",
|
"modified": "2021-07-27 16:28:08.667964",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Chapter",
|
"name": "Chapter",
|
||||||
|
|||||||
@@ -7,9 +7,4 @@ import frappe
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class Chapter(Document):
|
class Chapter(Document):
|
||||||
def get_lessons(self):
|
pass
|
||||||
rows = frappe.db.get_all("Lesson",
|
|
||||||
filters={"chapter": self.name},
|
|
||||||
fields='*',
|
|
||||||
order_by="index_")
|
|
||||||
return [frappe.get_doc(dict(row, doctype='Lesson')) for row in rows]
|
|
||||||
|
|||||||
0
community/lms/doctype/chapters/__init__.py
Normal file
0
community/lms/doctype/chapters/__init__.py
Normal file
32
community/lms/doctype/chapters/chapters.json
Normal file
32
community/lms/doctype/chapters/chapters.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-07-27 16:25:02.903245",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"chapter"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "chapter",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Chapter",
|
||||||
|
"options": "Chapter",
|
||||||
|
"reqd": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"istable": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-07-27 16:25:02.903245",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "LMS",
|
||||||
|
"name": "Chapters",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
8
community/lms/doctype/chapters/chapters.py
Normal file
8
community/lms/doctype/chapters/chapters.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Chapters(Document):
|
||||||
|
pass
|
||||||
@@ -15,7 +15,9 @@
|
|||||||
"hints",
|
"hints",
|
||||||
"tests",
|
"tests",
|
||||||
"image",
|
"image",
|
||||||
"lesson"
|
"lesson",
|
||||||
|
"index_",
|
||||||
|
"index_label"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -27,6 +29,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "course",
|
"fieldname": "course",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
"label": "Course",
|
"label": "Course",
|
||||||
"options": "LMS Course"
|
"options": "LMS Course"
|
||||||
},
|
},
|
||||||
@@ -73,13 +76,27 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "lesson",
|
"fieldname": "lesson",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
"label": "Lesson",
|
"label": "Lesson",
|
||||||
"options": "Lesson"
|
"options": "Lesson"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "index_",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"label": "Index",
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "index_label",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Index Label",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-20 13:23:12.340928",
|
"modified": "2021-06-01 05:22:15.656013",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Exercise",
|
"name": "Exercise",
|
||||||
@@ -99,8 +116,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"search_fields": "title",
|
"search_fields": "title",
|
||||||
"sort_field": "modified",
|
"sort_field": "index_label",
|
||||||
"sort_order": "DESC",
|
"sort_order": "ASC",
|
||||||
"title_field": "title",
|
"title_field": "title",
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,8 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from ..lms_sketch.livecode import livecode_to_svg
|
|
||||||
|
|
||||||
class Exercise(Document):
|
class Exercise(Document):
|
||||||
def before_save(self):
|
|
||||||
self.image = livecode_to_svg(None, self.answer)
|
|
||||||
|
|
||||||
def get_user_submission(self):
|
def get_user_submission(self):
|
||||||
"""Returns the latest submission for this user.
|
"""Returns the latest submission for this user.
|
||||||
"""
|
"""
|
||||||
@@ -25,7 +21,6 @@ class Exercise(Document):
|
|||||||
order_by="creation desc",
|
order_by="creation desc",
|
||||||
page_length=1)
|
page_length=1)
|
||||||
|
|
||||||
print("get_user_submission", result)
|
|
||||||
if result:
|
if result:
|
||||||
return result[0]
|
return result[0]
|
||||||
|
|
||||||
@@ -43,8 +38,6 @@ class Exercise(Document):
|
|||||||
course = frappe.get_doc("LMS Course", self.course)
|
course = frappe.get_doc("LMS Course", self.course)
|
||||||
batch = course.get_student_batch(user)
|
batch = course.get_student_batch(user)
|
||||||
|
|
||||||
image = livecode_to_svg(None, code)
|
|
||||||
|
|
||||||
doc = frappe.get_doc(
|
doc = frappe.get_doc(
|
||||||
doctype="Exercise Submission",
|
doctype="Exercise Submission",
|
||||||
exercise=self.name,
|
exercise=self.name,
|
||||||
@@ -52,8 +45,8 @@ class Exercise(Document):
|
|||||||
course=self.course,
|
course=self.course,
|
||||||
lesson=self.lesson,
|
lesson=self.lesson,
|
||||||
batch=batch and batch.name,
|
batch=batch and batch.name,
|
||||||
image=image,
|
|
||||||
solution=code)
|
solution=code)
|
||||||
doc.insert(ignore_permissions=True)
|
doc.insert(ignore_permissions=True)
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,17 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"exercise",
|
"exercise",
|
||||||
"solution",
|
"status",
|
||||||
|
"batch",
|
||||||
|
"column_break_4",
|
||||||
"exercise_title",
|
"exercise_title",
|
||||||
"course",
|
"course",
|
||||||
"batch",
|
|
||||||
"lesson",
|
"lesson",
|
||||||
"image"
|
"section_break_8",
|
||||||
|
"solution",
|
||||||
|
"image",
|
||||||
|
"test_results",
|
||||||
|
"comments"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -21,12 +26,6 @@
|
|||||||
"label": "Exercise",
|
"label": "Exercise",
|
||||||
"options": "Exercise"
|
"options": "Exercise"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "solution",
|
|
||||||
"fieldtype": "Code",
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Solution"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fetch_from": "exercise.title",
|
"fetch_from": "exercise.title",
|
||||||
"fieldname": "exercise_title",
|
"fieldname": "exercise_title",
|
||||||
@@ -61,11 +60,41 @@
|
|||||||
"fieldtype": "Code",
|
"fieldtype": "Code",
|
||||||
"label": "Image",
|
"label": "Image",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Correct\nIncorrect"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "test_results",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Test Results"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "comments",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Comments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "solution",
|
||||||
|
"fieldtype": "Code",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Solution"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_4",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_8",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-21 11:28:45.833018",
|
"modified": "2021-06-24 16:22:50.570845",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Exercise Submission",
|
"name": "Exercise Submission",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user