<%inherit file="base.html" />
<%block name="bodyclass">index</%block>
<%block name="title">Courses</%block>

<%block name="header_extras">
  <script type="text/template" id="new-course-template">
    <section class="new-course">
      <div class="item-details">
        <form class="course-info">
          <div class="row">
            <label>Course Name</label>
            <input type="text" class="new-course-name" />
          </div>
          <div class="row">
            <div class="column">
              <label>Organization</label>
              <input type="text" class="new-course-org" />
            </div>
            <div class="column">
              <label>Course Number</label>
              <input type="text" class="new-course-number" />
            </div>
          </div>
          <div class="row">
            <input type="submit" value="Save" class="new-course-save" data-template="${new_course_template}" />
            <input type="button" value="Cancel" class="new-course-cancel" />
          </div>
        </form>
      </div>
    </section>
  </script>
</%block>

<%block name="content">
	<div class="main-wrapper">
		<div class="inner-wrapper">
			<h1>My Courses</h1>
			<article class="my-classes">
				% if user.is_active:
				<a href="#" class="new-button new-course-button"><span class="plus-icon white"></span> New Course</a>
				<ul class="class-list">
					%for course, url in courses:
			    <li>
						<a href="${url}" class="class-name">
							<span class="class-name">${course}</span>
							<!--
							<span class="detail">Started: 9/21/2012</span>
							<span class="detail">Ends: 10/21/2012</span>
							-->
						</a>
					</li>
			    	%endfor
				</ul>
				% else:
					<div class='warn-msg'>
						<p>
						In order to start authoring courses using edX studio, please click on the activation link in your email.
						</p>
					</div>
				% endif
			</article>
		</div>
	</div>
</%block>
