<? require_once '../vendor/autoload.php'; require_once '../generated-conf/config.php'; require_once '../app/functions/functions.php'; require_once 'components/header.php'; $topics_tree = getTopicsTree(); $lessons_tree = getLessonsTree(); echo <<<s <div class="page" id="overview_page"> <div class="columns"> <div class="column"> <section class="page_section"> <h2>Topics</h2> </section> <section style="max-height: 800px; overflow-x: scroll;"> s; foreach ($topics_tree as $topics_tree_topic_data) { echo getTopicsTreeTopicHTML($topics_tree_topic_data); } echo <<<s </section> </div> <div class="column"> <section> <h2>Lessons</h2>
function getLessonsTreeOptions($lesson_to_select_id = false) { $lessons_tree = getLessonsTree(); $options_html = <<<s <option value="0">None</option> s; foreach ($lessons_tree as $lesson_data) { $options_html .= getLessonsTreeLessonOption($lesson_data, 0, $lesson_to_select_id); } return $options_html; }
require_once '../app/functions/functions.php'; # Display header require_once 'components/header.php'; # Get lesson, data, etc $lesson_object = getLesson($_GET['id']); $lesson_data = getLessonData($_GET['id']); $lesson_tags = getLessonTags($_GET['id'], $_GET['order_passages_by']); if (!$lesson_data['Ancestors']) { $lesson_family_root_id = $_GET['id']; } else { $lesson_family_root_id = $lesson_data['Ancestors'][0]; } $lesson_family = getLessonsTree([ $lesson_family_root_id ])[0]; $lessons_tree_options = getLessonsTreeOptions($lesson_data['Id']); # Get topics select options //$topics_select_options = getTopicsSelectOptions(); # Start page echo <<<s <div class="page" id="lesson_page"> <section class="page_heading"> <h1>{$lesson_data['Breadcrumb']} {$lesson_data['Title']}</h1> <button class="icon-pencil" onclick="showPopup('edit_lesson_title');"></button> <button class="icon-topics" onclick="showPopup('link_lesson_to_topic');"></button> <button class="icon-close" onclick="deleteLesson('{$lesson_data['Id']}');"></button>