export_git.html 2.48 KB
Newer Older
Mushtaq Ali committed
1
<%page expression_filter="h"/>
2 3 4
<%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/>

5
<%!
Carson Gee committed
6 7 8
  from django.core.urlresolvers import reverse
  from django.utils.translation import ugettext as _
%>
9 10
<%block name="title">${_("Export Course to Git")}</%block>
<%block name="bodyclass">is-signedin course tools view-export-git</%block>
11 12 13 14 15 16

<%block name="content">
<div class="wrapper-mast wrapper">
  <header class="mast has-subtitle">
    <h1 class="page-header">
      <small class="subtitle">${_("Tools")}</small>
17
      <span class="sr">&gt; </span>${_("Export to Git")}
18 19 20 21
    </h1>
  </header>
</div>

22
<div class="wrapper-content wrapper">
Carson Gee committed
23 24
  <section class="content">
    <article class="content-primary" role="main">
25

Carson Gee committed
26
      <div class="introduction">
27 28 29 30 31
        <h2 class="title">${_("About Export to Git")}</h2>
        <div class="copy">
          <p>${_("Use this to export your course to its git repository.")}</p>
          <p>${_("This will then trigger an automatic update of the main LMS site and update the contents of your course visible there to students if automatic git imports are configured.")}</p>
        </div>
32 33
      </div>

34 35 36
      <div class="export-git-controls">
        <h2 class="title">${_("Export Course to Git:")}</h2>

Carson Gee committed
37
        % if not context_course.giturl:
38
        <p class="error-text">${_("giturl must be defined in your course settings before you can export to git.")}</p>
Carson Gee committed
39 40 41
        % else:
        <ul class="list-actions">
          <li class="item-action">
Mushtaq Ali committed
42
            <a class="action action-export-git action-primary" href="${reverse('export_git', kwargs=dict(course_key_string=unicode(context_course.id)))}?action=push">
43
              <span class="icon fa fa-arrow-circle-o-down" aria-hidden="true"></span>
44
              <span class="copy">${_("Export to Git")}</span>
Carson Gee committed
45 46 47 48
            </a>
          </li>
        </ul>
        % endif
49
      </div>
50
      <div class="messages">
Carson Gee committed
51 52 53 54 55 56
        % if msg:
          % if failed:
          <h3 class="error-text">${_('Export Failed')}:</h3>
          % else:
          <h3>${_('Export Succeeded')}:</h3>
          % endif
Mushtaq Ali committed
57
        <pre>${msg}</pre>
Carson Gee committed
58
        % endif
59
      </div>
60
    </article>
61
    <aside class="content-supplementary" role="complementary">
62
      <dl class="export-git-info-block">
Carson Gee committed
63
        <dt>${_("Your course:")}</dt>
Mushtaq Ali committed
64
        <dd class="course_text">${context_course.id}</dd>
Carson Gee committed
65 66 67
        <dt>${_("Course git url:")}</dt>
        <dd class="giturl_text">${context_course.giturl}</dd>
      </dl>
68
    </aside>
Carson Gee committed
69
  </section>
70 71
</div>
</%block>