course_info.html 3.31 KB
Newer Older
David Baumgold committed
1
<%! from django.utils.translation import ugettext as _ %>
2
<%inherit file="base.html" />
3 4
<%namespace name='static' file='static_content.html'/>

5
<!-- TODO decode course # from context_course into title -->
David Baumgold committed
6
<%block name="title">${_("Course Updates")}</%block>
7 8
<%block name="bodyclass">is-signedin course course-info updates</%block>

9
<%block name="header_extras">
10
% for template_name in ["course_info_update", "course_info_handouts"]:
11 12 13 14 15
  <script type="text/template" id="${template_name}-tpl">
    <%static:include path="js/${template_name}.underscore" />
  </script>
% endfor
</%block>
16 17

<%block name="jsextra">
18
  <script type="text/javascript" src="${static.url('js/models/course_info.js')}"></script>
19
  <script type="text/javascript" src="${static.url('js/models/module_info.js')}"></script>
20
  <script type="text/javascript" src="${static.url('js/views/course_info_edit.js')}"></script>
21 22 23 24
  <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>
Brian Talbot committed
25

26
  <script type="text/javascript" charset="utf-8">
27 28 29
  $(document).ready(function(){
    var course_updates = new CMS.Models.CourseUpdateCollection();
    course_updates.urlbase = '${url_base}';
30
    course_updates.fetch({reset: true});
31 32 33 34 35

    var course_handouts = new CMS.Models.ModuleInfo({
        id: '${handouts_location}'
      });
    course_handouts.urlbase = '${url_base}';
Brian Talbot committed
36

37 38 39 40 41
    var editor = new CMS.Views.CourseInfoEdit({
      el: $('.main-wrapper'),
      model : new CMS.Models.CourseInfo({
        courseId : '${context_course.location}',
        updates : course_updates,
42
        base_asset_url : '${base_asset_url}',
43 44
        handouts : course_handouts
        })
45 46
    });
    editor.render();
47
  });
48 49 50 51
  </script>
</%block>

<%block name="content">
52
  <div class="wrapper-mast wrapper">
53
    <header class="mast has-actions has-subtitle">
Brian Talbot committed
54
      <h1 class="page-header">
David Baumgold committed
55 56
        <small class="subtitle">${_("Content")}</small>
        <span class="sr">&gt; </span>${_("Course Updates")}
Brian Talbot committed
57
      </h1>
58 59

      <nav class="nav-actions">
David Baumgold committed
60
        <h3 class="sr">${_('Page Actions')}</h3>
61 62
        <ul>
          <li class="nav-item">
David Baumgold committed
63
            <a href="#" class=" button new-button new-update-button"><i class="icon-plus"></i> ${_('New Update')}</a>
64 65 66 67 68 69
          </li>
        </ul>
      </nav>
    </header>
  </div>

70 71 72
  <div class="wrapper-content wrapper">
    <section class="content">
      <div class="introduction">
David Baumgold committed
73
        <p clas="copy">${_('Course updates are announcements or notifications you want to share with your class. Other course authors have used them for important exam/date reminders, change in schedules, and to call out any important steps students need to be aware of.')}</p>
74 75 76 77
      </div>
    </section>
  </div>

78 79
  <div class="main-wrapper">
    <div class="inner-wrapper">
80
      <div class="course-info-wrapper">
Tom Giannattasio committed
81 82
        <div class="main-column window">
          <article class="course-updates" id="course-update-view">
83 84 85
            <ol class="update-list" id="course-update-list"></ol>
          </article>
        </div>
86
        <div class="sidebar window course-handouts" id="course-handouts-view"></div>
87
      </div>
88 89
    </div>
  </div>
Brian Talbot committed
90
</%block>