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

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

11
<%block name="header_extras">
12
<link rel="stylesheet" type="text/css" href="${static.url('js/vendor/timepicker/jquery.timepicker.css')}" />
13
% for template_name in ["course_info_update", "course_info_handouts"]:
14 15 16 17 18
  <script type="text/template" id="${template_name}-tpl">
    <%static:include path="js/${template_name}.underscore" />
  </script>
% endfor
</%block>
19 20 21

<%block name="jsextra">
  <script type="text/javascript" charset="utf-8">
22
  
23 24 25
require(["domReady!", "jquery", "js/collections/course_update", "js/models/module_info", "js/models/course_info", "js/views/course_info_edit"],
  function(doc, $, CourseUpdateCollection, ModuleInfoModel, CourseInfoModel, CourseInfoEditView) {
    var course_updates = new CourseUpdateCollection();
26
    course_updates.url = '${updates_url}';
27
    course_updates.fetch({reset: true});
28

29
    var course_handouts = new ModuleInfoModel({
30
        id: '${handouts_locator}'
31
      });
Brian Talbot committed
32

33
    var editor = new CourseInfoEditView({
34
      el: $('.main-wrapper'),
35
      model : new CourseInfoModel({
36
        updates : course_updates,
37
        base_asset_url : '${base_asset_url}',
38 39
        handouts : course_handouts
        })
40 41
    });
    editor.render();
42
});
43 44 45 46
  </script>
</%block>

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

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

65 66 67
  <div class="wrapper-content wrapper">
    <section class="content">
      <div class="introduction">
68
        <p clas="copy">${_('Use course updates to notify students of important dates or exams, highlight particular discussions in the forums, announce schedule changes, and respond to student questions. You add or edit updates in HTML.')}</p>
69 70 71 72
      </div>
    </section>
  </div>

73 74
  <div class="main-wrapper">
    <div class="inner-wrapper">
75
      <div class="course-info-wrapper">
Tom Giannattasio committed
76 77
        <div class="main-column window">
          <article class="course-updates" id="course-update-view">
78 79 80
            <ol class="update-list" id="course-update-list"></ol>
          </article>
        </div>
81
        <div class="sidebar course-handouts" id="course-handouts-view"></div>
82
      </div>
83 84
    </div>
  </div>
Brian Talbot committed
85
</%block>