diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index da1eb3b8ea..21240593e9 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -32,7 +32,7 @@ def click_component_from_menu(instance_id, expected_css): if len(elements) == 1: # Multiple templates world.css_click(elem_css) else: # Single template - assert(len(filter(lambda ele: ele.has_class('single_template'), elements)) == 1) + assert(len(filter(lambda ele: ele.has_class('single-template'), elements)) == 1) assert_equal(1, len(world.css_find(expected_css))) diff --git a/cms/static/coffee/src/views/unit.coffee b/cms/static/coffee/src/views/unit.coffee index 11d219a546..058bcf0ce1 100644 --- a/cms/static/coffee/src/views/unit.coffee +++ b/cms/static/coffee/src/views/unit.coffee @@ -1,7 +1,7 @@ class CMS.Views.UnitEdit extends Backbone.View events: - 'click .new-component .new-component-type a.multiple_templates': 'showComponentTemplates' - 'click .new-component .new-component-type a.single_template': 'saveNewComponent' + 'click .new-component .new-component-type a.multiple-templates': 'showComponentTemplates' + 'click .new-component .new-component-type a.single-template': 'saveNewComponent' 'click .new-component .cancel-button': 'closeNewComponent' 'click .new-component-templates .new-component-template a': 'saveNewComponent' 'click .new-component-templates .cancel-button': 'closeNewComponent' diff --git a/cms/templates/unit.html b/cms/templates/unit.html index bb2a8f5193..aba9889b14 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -54,12 +54,12 @@
Add New Component
% for type, templates in sorted(component_templates.items()): + % if len(templates) > 1 or type == 'advanced':
% if type == "problem": -
- - % endif -
-
    - % for name, location, has_markdown in templates: - % if has_markdown or type != "problem": -
  • - - ${name} - -
  • - % endif - - %endfor -
-
- % if type == "problem": -
-
- % endif - Cancel -
+ % endif +
+ +
+ % if type == "problem": +
+ +
+
+ % endif + Cancel + + % endif % endfor