manage_users.html 5.04 KB
Newer Older
1
<%inherit file="base.html" />
2 3 4 5 6
<%!
import json
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
%>
7
<%def name="online_help_token()"><% return "team_course" %></%def>
David Baumgold committed
8
<%block name="title">${_("Course Team Settings")}</%block>
9
<%block name="bodyclass">is-signedin course users view-team</%block>
10 11 12 13 14 15 16
<%namespace name='static' file='static_content.html'/>

<%block name="header_extras">
<script type="text/template" id="team-member-tpl">
    <%static:include path="js/team-member.underscore" />
</script>
</%block>
17

18
<%block name="content">
19

20
<div class="wrapper-mast wrapper">
21
  <header class="mast has-actions has-subtitle">
Brian Talbot committed
22
    <h1 class="page-header">
Mark L. Chang committed
23
      <small class="subtitle">${_("Settings")}</small>
David Baumgold committed
24
      <span class="sr">&gt; </span>${_("Course Team")}
Brian Talbot committed
25
    </h1>
26

27
    <nav class="nav-actions" aria-label="${_('Page Actions')}">
David Baumgold committed
28
      <h3 class="sr">${_("Page Actions")}</h3>
29 30 31
      <ul>
        %if allow_actions:
        <li class="nav-item">
32
          <a href="#" class="button new-button create-user-button"><i class="icon fa fa-plus"></i> ${_("New Team Member")}</a>
33 34 35 36 37 38 39
        </li>
        %endif
      </ul>
    </nav>
  </header>
</div>

40 41 42
<div class="wrapper-content wrapper">
  <section class="content">
    <article class="content-primary" role="main">
43
      %if allow_actions:
44
      <div class="wrapper-create-element animate wrapper-create-user">
Mathew Peterson committed
45
        <form class="form-create create-user" id="create-user-form" name="create-user-form">
46 47 48 49
          <div class="wrapper-form">
            <h3 class="title">${_("Add a User to Your Course's Team")}</h3>

            <fieldset class="form-fields">
50
              <legend class="sr">${_("New Team Member Information")}</legend>
51

52 53 54
                <ol class="list-input">
                  <li class="field text required create-user-email">
                    <label for="user-email-input">${_("User's Email Address")}</label>
55
                    <input id="user-email-input" class="user-email-input" name="user-email" type="text" placeholder="${_('example: username@domain.com')}" value="">
Alison Hodges committed
56
                    <span class="tip tip-stacked">${_("Provide the email address of the user you want to add as Staff")}</span>
57 58 59 60
                  </li>
                </ol>
            </fieldset>
          </div>
61

62 63 64 65 66 67
          <div class="actions">
            <button class="action action-primary" type="submit">${_("Add User")}</button>
            <button class="action action-secondary action-cancel">${_("Cancel")}</button>
          </div>
        </form>
      </div>
68
      %endif
69

70 71 72 73
      <ol class="user-list" id="user-list">
        <div class="ui-loading">
          <p><span class="spin"><i class="icon fa fa-refresh"></i></span> <span class="copy">Loading</span></p>
        </div>
74
      </ol>
75

76
      % if allow_actions and len(users) == 1:
77 78 79 80
      <div class="notice notice-incontext notice-create has-actions">
        <div class="msg">
          <h3 class="title">${_('Add Team Members to This Course')}</h3>
          <div class="copy">
81
            <p>${_('Adding team members makes course authoring collaborative. Users must be signed up for {studio_name} and have an active account.').format(studio_name=settings.STUDIO_SHORT_NAME)}</p>
82 83 84 85 86
          </div>
        </div>

        <ul class="list-actions">
          <li class="action-item">
87
            <a href="#" class="action action-primary button new-button create-user-button"><i class="icon fa fa-plus icon-inline"></i> ${_('Add a New Team Member')}</a>
88 89 90 91
          </li>
        </ul>
      </div>
      %endif
92
    </article>
93

94
    <aside class="content-supplementary" role="complementary">
95
      <div class="bit">
96
        <h3 class="title-3">${_("Course Team Roles")}</h3>
97
        <p>${_("Course team members with the Staff role are course co-authors. They have full writing and editing privileges on all course content.")}</p>
98
        ## Note that the "Admin" role below is identified as "Instructor" in the Django admin panel.
Mathew Peterson committed
99
        <p>${_("Admins are course team members who can add and remove other course team members.")}</p>
100
        <p>${_("All course team members are automatically enrolled in the course and can access content in Studio, the LMS, and Insights.")}</p>
101 102
      </div>

103
      % if show_transfer_ownership_hint:
104
      <div class="bit">
105
        <h3 class="title-3">${_("Transferring Ownership")}</h3>
Alison Hodges committed
106
        <p>${_("Every course must have an Admin. If you are the Admin and you want to transfer ownership of the course, click <strong>Add admin access</strong> to make another user the Admin, then ask that user to remove you from the Course Team list.")}</p>
107 108 109 110
      </div>
      % endif
    </aside>
  </section>
111
</div>
112
</%block>
113

114
<%block name="requirejs">
115 116 117 118 119 120 121 122
  require(["js/factories/manage_users"], function(ManageCourseUsersFactory) {
      ManageCourseUsersFactory(
        "${context_course.display_name | h}",
        ${json.dumps(users)},
        "${reverse('contentstore.views.course_team_handler', kwargs={'course_key_string': unicode(context_course.id), 'email': '@@EMAIL@@'})}",
        ${ request.user.id },
        ${str(allow_actions).lower()}
      );
123
  });
Lyla Fischer committed
124
</%block>