diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index b3af6f7e7b..5495b5ea0b 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -66,7 +66,7 @@ log = logging.getLogger(__name__) COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video'] -DIRECT_ONLY_CATEGORIES = ['course', 'chapter', 'sequential'] +DIRECT_ONLY_CATEGORIES = ['course', 'chapter', 'sequential', 'about', 'static_tab', 'course_info'] def _modulestore(location): @@ -870,6 +870,27 @@ def edit_static(request, org, course, coursename): return render_to_response('edit-static-page.html', {}) +def edit_tabs(request, org, course, coursename): + location = ['i4x', org, course, 'course', coursename] + course_item = modulestore().get_item(location) + static_tabs_loc = Location('i4x', org, course, 'static_tab', None) + + static_tabs = modulestore('direct').get_items(static_tabs_loc) + + # import pudb; pudb.set_trace() + + components = [ + static_tab.location.url() + for static_tab + in static_tabs + ] + + return render_to_response('edit-tabs.html', { + 'active_tab': 'pages', + 'context_course':course_item, + 'components': components + }) + def not_found(request): return render_to_response('error.html', {'error': '404'}) diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 2b9b2c7884..0f5780a5d2 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -10,7 +10,7 @@ ${context_course.display_name}