Commit f3bd9ab2 by cahrens

Get rid of empty, store ID.

parent 3dc97913
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
from lettuce import world, step from lettuce import world, step
from nose.tools import assert_true, assert_equal, assert_in from nose.tools import assert_true, assert_equal, assert_in
from terrain.steps import reload_the_page from terrain.steps import reload_the_page
from selenium.common.exceptions import StaleElementReferenceException
import time
############### ACTIONS #################### ############### ACTIONS ####################
...@@ -15,5 +13,5 @@ def i_created_blank_common_problem(step): ...@@ -15,5 +13,5 @@ def i_created_blank_common_problem(step):
step.given('I have added a new subsection') step.given('I have added a new subsection')
step.given('I expand the first section') step.given('I expand the first section')
world.css_click('a.new-unit-item') world.css_click('a.new-unit-item')
time.sleep(float(2)) world.css_click('.large-problem-icon')
# world.css_click('a.problem') world.css_click('#i4x://edx/templates/problem/Blank_Common_Problem')
...@@ -149,8 +149,7 @@ def edit_unit(request, location): ...@@ -149,8 +149,7 @@ def edit_unit(request, location):
component_templates[category].append(( component_templates[category].append((
template.display_name_with_default, template.display_name_with_default,
template.location.url(), template.location.url(),
hasattr(template, 'markdown') and template.markdown is not None, hasattr(template, 'markdown') and template.markdown is not None
template.cms.empty,
)) ))
components = [ components = [
......
...@@ -78,22 +78,13 @@ ...@@ -78,22 +78,13 @@
% endif % endif
<div class="tab current" id="tab1"> <div class="tab current" id="tab1">
<ul class="new-component-template"> <ul class="new-component-template">
% for name, location, has_markdown, is_empty in templates: % for name, location, has_markdown in templates:
% if has_markdown or type != "problem": % if has_markdown or type != "problem":
% if is_empty: <li class="editor-md">
<li class="editor-md empty"> <a href="#" id="${location}" data-location="${location}">
<a href="#" data-location="${location}"> <span class="name"> ${name}</span>
<span class="name"> ${name}</span> </a>
</a> </li>
</li>
% else:
<li class="editor-md">
<a href="#" data-location="${location}">
<span class="name"> ${name}</span>
</a>
</li>
% endif
% endif % endif
%endfor %endfor
...@@ -102,23 +93,14 @@ ...@@ -102,23 +93,14 @@
% if type == "problem": % if type == "problem":
<div class="tab" id="tab2"> <div class="tab" id="tab2">
<ul class="new-component-template"> <ul class="new-component-template">
% for name, location, has_markdown, is_empty in templates: % for name, location, has_markdown in templates:
% if not has_markdown: % if not has_markdown:
% if is_empty: <li class="editor-manual">
<li class="editor-manual empty"> <a href="#" id="${location}" data-location="${location}">
<a href="#" data-location="${location}"> <span class="name"> ${name}</span>
<span class="name">${name}</span> </a>
</a>
</li>
% else:
<li class="editor-manual">
<a href="#" data-location="${location}">
<span class="name"> ${name}</span>
</a>
</li> </li>
% endif
% endif % endif
% endfor % endfor
</ul> </ul>
......
...@@ -28,4 +28,4 @@ class CmsNamespace(Namespace): ...@@ -28,4 +28,4 @@ class CmsNamespace(Namespace):
""" """
published_date = DateTuple(help="Date when the module was published", scope=Scope.settings) published_date = DateTuple(help="Date when the module was published", scope=Scope.settings)
published_by = String(help="Id of the user who published this module", scope=Scope.settings) published_by = String(help="Id of the user who published this module", scope=Scope.settings)
empty = StringyBoolean(help="Whether this is an empty template", scope=Scope.settings, default=False)
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