Livestream page (#348)

Add Conference Settings page with livestream url
This commit is contained in:
Kenneth Sequeira
2018-10-25 15:25:56 +05:30
committed by GitHub
parent fb3fe3cfad
commit 0d3ba7b252
6 changed files with 147 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,95 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-10-25 15:15:22.842234",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "livestream_url",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Livestream URL",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2018-10-25 15:23:08.695489",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "Conference Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, EOSSF and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ConferenceSettings(Document):
pass

View File

@@ -0,0 +1,34 @@
{% extends "templates/web.html" %}
{% block title %}
ERPNext Conference 2018 - Livestream
{% endblock %}
{% block page_content %}
<section class='section-padding text-center section-bg'>
<div class='container'>
<h1>
Livestream begins on<br>
<small class="text-muted">26 October 2018 10:00 AM IST</small>
</h1>
<p>
<a href="https://twitter.com/intent/tweet?button_hashtag=ERPNextConference2018&ref_src=twsrc%5Etfw" class="twitter-hashtag-button" data-show-count="false">Tweet #ERPNextConference2018</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</p>
</div>
<p>
<iframe width="1120" height="630" src="{{ frappe.db.get_value('Conference Settings', 'Conference Settings', 'livestream_url') or 'https://www.youtube.com/embed/IWMYnp3CggA'}}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</p>
</section>
{% endblock %}
{% block body_include %}
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
{% endblock %}