Commit 42b4ffdc by cahrens

Cleanup.

parent 93b0fafe
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
from lettuce import world, step from lettuce import world, step
from common import * from common import *
from nose.tools import assert_equal, assert_true from nose.tools import assert_equal
############### ACTIONS #################### ############### ACTIONS ####################
......
...@@ -271,7 +271,7 @@ body.course.outline { ...@@ -271,7 +271,7 @@ body.course.outline {
.section-published-date { .section-published-date {
float: right; float: right;
width: 265px; width: 278px;
margin-right: 220px; margin-right: 220px;
@include border-radius(3px); @include border-radius(3px);
background: $lightGrey; background: $lightGrey;
......
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! <%!
from time import mktime
import dateutil.parser
import logging import logging
from datetime import datetime
from xmodule.util.date_utils import get_time_struct_display from xmodule.util.date_utils import get_time_struct_display
%> %>
...@@ -14,7 +11,6 @@ ...@@ -14,7 +11,6 @@
<%namespace name="units" file="widgets/units.html" /> <%namespace name="units" file="widgets/units.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%namespace name='datetime' module='datetime'/>
<%block name="content"> <%block name="content">
<div class="main-wrapper"> <div class="main-wrapper">
...@@ -39,18 +35,15 @@ ...@@ -39,18 +35,15 @@
<div class="scheduled-date-input row"> <div class="scheduled-date-input row">
<label>Release date:<!-- <span class="description">Determines when this subsection and the units within it will be released publicly.</span>--></label> <label>Release date:<!-- <span class="description">Determines when this subsection and the units within it will be released publicly.</span>--></label>
<div class="datepair" data-language="javascript"> <div class="datepair" data-language="javascript">
<% <input type="text" id="start_date" name="start_date" value="${get_time_struct_display(subsection.lms.start, '%m/%d/%Y')}" placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/>
start_date = datetime.fromtimestamp(mktime(subsection.lms.start)) if subsection.lms.start is not None else None <input type="text" id="start_time" name="start_time" value="${get_time_struct_display(subsection.lms.start, '%H:%M')}" placeholder="HH:MM" class="time" size='10' autocomplete="off"/>
parent_start_date = datetime.fromtimestamp(mktime(parent_item.lms.start)) if parent_item.lms.start is not None else None
%>
<input type="text" id="start_date" name="start_date" value="${start_date.strftime('%m/%d/%Y') if start_date is not None else ''}" placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/>
<input type="text" id="start_time" name="start_time" value="${start_date.strftime('%H:%M') if start_date is not None else ''}" placeholder="HH:MM" class="time" size='10' autocomplete="off"/>
</div> </div>
% if subsection.lms.start != parent_item.lms.start and subsection.lms.start: % if subsection.lms.start != parent_item.lms.start and subsection.lms.start:
% if parent_start_date is None: % if parent_item.lms.start is None:
<p class="notice">The date above differs from the release date of ${parent_item.display_name_with_default}, which is unset. <p class="notice">The date above differs from the release date of ${parent_item.display_name_with_default}, which is unset.
% else: % else:
<p class="notice">The date above differs from the release date of ${parent_item.display_name_with_default} – ${parent_start_date.strftime('%m/%d/%Y')} at ${parent_start_date.strftime('%H:%M')}. <p class="notice">The date above differs from the release date of ${parent_item.display_name_with_default} –
${get_time_struct_display(parent_item.lms.start, '%m/%d/%Y at %I:%M %p')}.
% endif % endif
<a href="#" class="sync-date no-spinner">Sync to ${parent_item.display_name_with_default}.</a></p> <a href="#" class="sync-date no-spinner">Sync to ${parent_item.display_name_with_default}.</a></p>
% endif % endif
......
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! <%!
from time import mktime
import dateutil.parser
import logging import logging
from datetime import datetime from xmodule.util.date_utils import get_time_struct_display
%> %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Course Outline</%block> <%block name="title">Course Outline</%block>
...@@ -163,11 +161,10 @@ ...@@ -163,11 +161,10 @@
</h3> </h3>
<div class="section-published-date"> <div class="section-published-date">
<% <%
start_date = datetime.fromtimestamp(mktime(section.lms.start)) if section.lms.start is not None else None start_date_str = get_time_struct_display(section.lms.start, '%m/%d/%Y')
start_date_str = start_date.strftime('%m/%d/%Y') if start_date is not None else '' start_time_str = get_time_struct_display(section.lms.start, '%I:%M %p')
start_time_str = start_date.strftime('%H:%M') if start_date is not None else ''
%> %>
%if start_date is None: %if section.lms.start is None:
<span class="published-status">This section has not been released.</span> <span class="published-status">This section has not been released.</span>
<a href="#" class="schedule-button" data-date="" data-time="" data-id="${section.location}">Schedule</a> <a href="#" class="schedule-button" data-date="" data-time="" data-id="${section.location}">Schedule</a>
%else: %else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment