<%inherit file="base.html" />
<%block name="title">Schedule &amp; Details</%block>
<%block name="bodyclass">is-signedin course settings</%block>


<%namespace name='static' file='static_content.html'/>
<%!
from contentstore import utils 
%>


<%block name="jsextra">
  <link rel="stylesheet" type="text/css" href="${static.url('js/vendor/timepicker/jquery.timepicker.css')}" />
  <script src="${static.url('js/vendor/timepicker/jquery.timepicker.js')}"></script>
  <script src="${static.url('js/vendor/timepicker/datepair.js')}"></script>
  <script src="${static.url('js/vendor/date.js')}"></script>
  
  <script type="text/javascript" src="${static.url('js/template_loader.js')}"></script>
  <script type="text/javascript" src="${static.url('js/views/server_error.js')}"></script>
  <script type="text/javascript" src="${static.url('js/models/course_relative.js')}"></script>
  <script type="text/javascript" src="${static.url('js/views/validating_view.js')}"></script>
  <script type="text/javascript" src="${static.url('js/views/settings/main_settings_view.js')}"></script>
  <script type="text/javascript" src="${static.url('js/models/settings/course_details.js')}"></script>
  
  <script type="text/javascript">
    $(document).ready(function(){
    
        var editor = new CMS.Views.Settings.Details({
            el: $('.settings-details'),
            model: new CMS.Models.Settings.CourseDetails(${course_details|n},{parse:true})
        });
        
        editor.render();
    });
      
  </script>
</%block>

<%block name="content">
  <!-- -->
  <div class="main-wrapper">
    <div class="inner-wrapper">      
      <h1>Settings</h1>
      <article class="settings-overview">
        <div class="settings-page-section main-column">

          <section class="settings-details is-shown">
            <h2 class="title">Course Details</h2>

            <section class="settings-details-basic">
              <header>
                <h3>Basic Information</h3>
                <span class="detail">The nuts and bolts of your course</span>
              </header>

              <div class="row row-col2">
                <label for="course-name">Course Name:</label>
                <div class="field">
                  <div class="input">
                    <input type="text" class="long" id="course-name" value="[Course Name]" disabled="disabled">
                    <span class="tip tip-stacked">This is used in <a href="${utils.get_lms_link_for_about_page(course_location)}">your course URL</a>, and cannot be changed</span>
                  </div>
                </div>
              </div>

              <div class="row row-col2">
                <label for="course-organization">Organization:</label>
                <div class="field">
                  <div class="input">
                    <input type="text" class="long" id="course-organization" value="[Course Organization]" disabled="disabled">
                    <span class="tip tip-stacked">This is used in <a href="${utils.get_lms_link_for_about_page(course_location)}">your course URL</a>, and cannot be changed</span>
                  </div>
                </div>
              </div>

              <div class="row row-col2">
                <label for="course-number">Course Number:</label>
                <div class="field">
                  <div class="input">
                    <input type="text" class="short" id="course-number" value="[Course No.]" disabled="disabled">
                    <span class="tip tip-stacked">This is used in <a href="${utils.get_lms_link_for_about_page(course_location)}">your course URL</a>, and cannot be changed</span>
                  </div>
                </div>
              </div>
            </section><!-- .settings-details-basic -->

            <hr class="divide" />

            <section class="settings-details-schedule">
              <header>
                <h3>Course Schedule</h3>
                <span class="detail">Important steps and segments of your course</span>
              </header>

              <div class="row row-col2">
                <h4 class="label">Course Dates:</h4>
                
                <div class="field">
                  <div class="input multi multi-inline"  id="course-start">
                    <div class="group">
                      <label for="course-start-date">Start Date</label>
                      <input type="text" class="start-date date start datepicker" id="course-start-date" placeholder="MM/DD/YYYY" autocomplete="off">
                      <span class="tip tip-stacked">First day the course begins</span>          
                    </div>

                    <div class="group">
                      <label for="course-start-time">Start Time</label>
                      <input type="text" class="time start timepicker" id="course-start-time" value="" placeholder="HH:MM" autocomplete="off">
                      <span class="tip tip-stacked" id="timezone"></span>          
                    </div>
                  </div>
                </div>

                <div class="field field-additional">
                  <div class="input multi multi-inline" id="course-end">
                    <div class="group">
                      <label for="course-end-date">End Date</label>
                      <input type="text" class="end-date date end" id="course-end-date" placeholder="MM/DD/YYYY" autocomplete="off">
                      <span class="tip tip-stacked">Last day the course is active</span>          
                    </div>

                    <div class="group">
                      <label for="course-end-time">End Time</label>
                      <input type="text" class="time end" id="course-end-time" value="" placeholder="HH:MM" autocomplete="off">
                      <span class="tip tip-stacked" id="timezone"></span>          
                    </div>
                  </div>
                </div>
              </div>

              <div class="row row-col2">
                <h4 class="label">Enrollment Dates:</h4>
                
                <div class="field">
                  <div class="input multi multi-inline" id="enrollment-start">
                    <div class="group">
                      <label for="course-enrollment-start-date">Start Date</label>
                      <input type="text" class="start-date date start" id="course-enrollment-start-date" placeholder="MM/DD/YYYY" autocomplete="off">
                      <span class="tip tip-stacked">First day students can enroll</span>          
                    </div>

                    <div class="group">
                      <label for="course-enrollment-start-time">Start Time</label>
                      <input type="text" class="time start" id="course-enrollment-start-time" value="" placeholder="HH:MM" autocomplete="off">
                      <span class="tip tip-stacked" id="timezone"></span>           
                    </div>
                  </div>
                </div>

                <div class="field field-additional">
                  <div class="input multi multi-inline" id="enrollment-end">
                    <div class="group">
                      <label for="course-enrollment-end-date">End Date</label>
                      <input type="text" class="end-date date end" id="course-enrollment-end-date" placeholder="MM/DD/YYYY" autocomplete="off">
                      <span class="tip tip-stacked">Last day students can enroll</span>          
                    </div>

                    <div class="group">
                      <label for="course-enrollment-end-time">End Time</label>
                      <input type="text" class="time end" id="course-enrollment-end-time" value="" placeholder="HH:MM" autocomplete="off">
                      <span class="tip tip-stacked" id="timezone"></span>           
                    </div>
                  </div>
                </div>
              </div>

              <!-- <div class="row row-col2">
                <label for="course-syllabus">Course Syllabus</label>
                <div class="field">
                  <div class="input input-existing">
                    <div class="current current-course-syllabus">
                      <span class="doc-filename"></span>

                      <a href="#" class="remove-item remove-course-syllabus remove-doc-data" id="course-syllabus"><span class="delete-icon"></span> Delete Syllabus</a>
                    </div>
                  </div>

                  <div class="input">
                    <a href="#" class="new-item new-course-syllabus add-syllabus-data" id="course-syllabus">
                      <span class="upload-icon"></span>Upload Syllabus
                    </a>
                    <span class="tip tip-inline">PDF formatting preferred</span>          
                  </div>
                </div>
              </div> -->
            </section><!-- .settings-details-schedule -->

            <hr class="divide" />

            <section class="setting-details-marketing">
              <header>
                <h3>Introducing Your Course</h3>
                <span class="detail">Information for perspective students</span>
              </header>

              <div class="row row-col2">
                <label for="course-overview">Course Overview:</label>
                <div class="field">
                  <div class="input">
                    <textarea class="long tall tinymce text-editor" id="course-overview"></textarea>
                    <span class="tip tip-stacked">Introductions, prerequisites, FAQs that are used on <a href="${utils.get_lms_link_for_about_page(course_location)}">your course summary page</a></span>
                  </div>
                </div>      
              </div>

              <div class="row row-col2">
                <label for="course-introduction-video">Introduction Video:</label>
                <div class="field">
                  <div class="input input-existing">
                    <div class="current current-course-introduction-video">
                      <iframe width="380" height="215" src="" frameborder="0" allowfullscreen></iframe>

                      <a href="#" class="remove-item remove-course-introduction-video remove-video-data"><span class="delete-icon"></span> Delete Video</a>
                    </div>
                  </div>

                  <div class="input">
                    <input type="text" class="long new-course-introduction-video add-video-data" id="course-introduction-video" value="" placeholder="id" autocomplete="off">
                    <span class="tip tip-stacked">Video restrictions go here</span>
                  </div>
                </div>
              </div>
            </section><!-- .settings-details-marketing -->

            <hr class="divide" />

            <section class="settings-details-requirements">
              <header>
                <h3>Requirements</h3>
                <span class="detail">Expectations of the students taking this course</span>
              </header>

              <div class="row row-col2">
                <label for="course-effort">Hours of Effort per Week:</label>
                <div class="field">
                  <div class="input">
                    <input type="text" class="short time" id="course-effort" placeholder="HH:MM">
                    <span class="tip tip-inline">Time spent on all course work</span>
                  </div>
                </div>
              </div>
            </section>
          </section><!-- .settings-details -->

        </div>
      </article>
    </div>
  </div>
  <footer></footer>
</%block>
