sysadmin_dashboard.html 6.09 KB
Newer Older
Carson Gee committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<%inherit file="/main.html" />
<%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='/static_content.html'/>

<%block name="headextra">
  <%static:css group='style-course'/>
  <script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
  <script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.axislabels.js')}"></script>
</%block>

<style type="text/css">
a.active-section {
	color: #551A8B;
}
.sysadmin-dashboard-content h2 a {
	margin-right: 1.2em;
}
table.stat_table {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.stat_table th {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
	background-color: #dedede;
}
table.stat_table td {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
	background-color: #ffffff;
}

a.selectedmode { background-color: yellow; }

textarea {
  height: 200px;
}
</style>

<section class="container">
<div class="sysadmin-dashboard-wrapper">

  <section class="sysadmin-dashboard-content" style="margin-left:10pt;margin-top:10pt;margin-right:10pt;margin-bottom:20pt">
    <h1>${_('Sysadmin Dashboard')}</h1>
	<hr />
    <h2 class="instructor-nav">
	  <a href="${reverse('sysadmin')}" class="${modeflag.get('users')}">${_('Users')}</a>
      <a href="${reverse('sysadmin_courses')}" class="${modeflag.get('courses')}">${_('Courses')}</a>
      <a href="${reverse('sysadmin_staffing')}" class="${modeflag.get('staffing')}">${_('Staffing and Enrollment')}</a> 
59
      ## Translators: refers to http://git-scm.com/docs/git-log
Carson Gee committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
      <a href="${reverse('gitlogs')}">${_('Git Logs')}</a>
    </h2>
	<hr />
%if modeflag.get('users'):
	<h3>${_('User Management')}</h3>

    <form name="action" method="POST">
    <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }" />

	<ul class="list-input">
	  <li class="field text" style="padding-bottom: 1.2em">
		<label for="student_uname">${_('Email or username')}</label>
		<input type="text" name="student_uname" size=40 />
	  </li>

	  <li class="field text">
		<label for="student_fullname">${_('Full Name')}</label>
		<input type="text" name="student_fullname" size=40 />
	  </li>
	  <li class="field text">
		<label for="student_password">${_('Password')}</label>
		<input type="password" name="student_password" size=40 />
	  </li>
	</ul>

	<div class="form-actions">
	  <p>
		<button type="submit" name="action" value="del_user">${_('Delete user')}</button>
		<button type="submit" name="action" value="create_user">${_('Create user')}</button>
	  </p>
    </div>

	<hr />
    <p>
      <button type="submit" name="action" value="download_users" style="width: 350px;">
		${_('Download list of all users (csv file)')}
	  </button>
    </p>

    <p>
    <button type="submit" name="action" value="repair_eamap" style="width: 350px;">
	  ${_('Check and repair external authentication map')}
	</button>
    </p>

    <hr width="40%" style="align:left">
	</form>
 %endif

%if modeflag.get('staffing'):

<p>${_("Go to each individual course's Instructor dashboard to manage course enrollment.")}</p>
<hr />

<h3>${_('Manage course staff and instructors')}</h3><br/>
<form name="action" method="POST">
  <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }" />
  <button type="submit" name="action" value="get_staff_csv">${_('Download staff and instructor list (csv file)')}</button>
</form>

%endif

%if modeflag.get('courses'):
<h3>${_('Administer Courses')}</h3><br/>

<form name="action" method="POST">
  <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }" />
  <ul class="list-input">
	<li class="field text">
	  <label for="repo_location">
130
		## Translators: Repo is short for git repository or source of
131
		## courseware; see http://git-scm.com/about
132
		${_('Repo Location')}:
Carson Gee committed
133 134 135
	  </label>
	  <input type="text" name="repo_location" style="width:60%" />
	</li>
136 137
	<li class="field text">
	  <label for="repo_location">
138
		## Translators: Repo is short for git repository (http://git-scm.com/about) or source of
139
		## courseware and branch is a specific version within that repository
140 141 142 143
		${_('Repo Branch (optional)')}:
	  </label>
	  <input type="text" name="repo_branch" style="width:60%" />
	</li>
Carson Gee committed
144 145
  </ul>
  <div class="form-actions">
146
        ## Translators: Github is a popular website for hosting code
Carson Gee committed
147 148 149 150 151 152
	<button type="submit" name="action" value="add_course">${_('Load new course from github')}</button>
  </div>
  <hr />
  <ul class="list-input">
	<li class="field text">
	  <label for="course_id">
153
	        ## Translators: 'dir' is short for 'directory'
Carson Gee committed
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
		${_('Course ID or dir')}:
	  </label>
	  <input type="text" name="course_id" style="width:60%" />
	</li>
  </ul>
  <div class="form-actions">
	<button type="submit" name="action" value="del_course">${_('Delete course from site')}</button>
  </div>
</form>
<hr style="width:40%" />
%endif

%if msg:
    <p>${msg}</p>
%endif

%if datatable:

    <br/>
    <br/>
    <p>
      <hr width="100%">
      <h2>${datatable['title']}</h2>
      <table class="stat_table">
        <tr>
	%for hname in datatable['header']:
	  <th>${hname}</th>
	%endfor
	</tr>
        %for row in datatable['data']:
          <tr>
	    %for value in row:
	      <td>${value}</td>
	    %endfor
	  </tr>
        %endfor
      </table>
    </p>
%endif

%if plots:

    %for plot in plots:
      <br/>
      <h3>${plot['title']}</h3>
      <br/>
      <p>${plot['info']}</p>
      <br/>
      <div id="plot_${plot['id']}" style="width:600px;height:300px;"></div>
      <script type="text/javascript">
          $(function () {
              ${plot['data']}
              $.plot($("#plot_${plot['id']}"), ${plot['cmd']}  );
          });
      </script>
      <br/>
      <br/>
    %endfor

%endif

  </section>
216
  <div style="text-align:right; float: right"><span id="djangopid">'Django PID': ${djangopid}</span>
217
  ## Translators: A version number appears after this string
218
  | <span id="edxver">${_('Platform Version')}: ${edx_platform_version}</span></div>
Carson Gee committed
219 220
</div>
</section>