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}
- Courseware
- - Pages
+ - Tabs
- Assets
- Users
- Import
diff --git a/cms/urls.py b/cms/urls.py
index 7b3dd90a0b..0519debbe0 100644
--- a/cms/urls.py
+++ b/cms/urls.py
@@ -36,6 +36,7 @@ urlpatterns = ('',
'contentstore.views.remove_user', name='remove_user'),
url(r'^pages/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.static_pages', name='static_pages'),
url(r'^edit_static/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.edit_static', name='edit_static'),
+ url(r'^edit_tabs/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.edit_tabs', name='edit_tabs'),
url(r'^(?P[^/]+)/(?P[^/]+)/assets/(?P[^/]+)$', 'contentstore.views.asset_index', name='asset_index'),
# temporary landing page for a course
diff --git a/common/lib/xmodule/setup.py b/common/lib/xmodule/setup.py
index ba5bcd872f..74fa418c91 100644
--- a/common/lib/xmodule/setup.py
+++ b/common/lib/xmodule/setup.py
@@ -35,10 +35,10 @@ setup(
"videodev = xmodule.backcompat_module:TranslateCustomTagDescriptor",
"videosequence = xmodule.seq_module:SequenceDescriptor",
"discussion = xmodule.discussion_module:DiscussionDescriptor",
- "course_info = xmodule.html_module:HtmlDescriptor",
- "static_tab = xmodule.html_module:HtmlDescriptor",
+ "course_info = xmodule.html_module:CourseInfoDescriptor",
+ "static_tab = xmodule.html_module:StaticTabDescriptor",
"custom_tag_template = xmodule.raw_module:RawDescriptor",
- "about = xmodule.html_module:HtmlDescriptor"
+ "about = xmodule.html_module:AboutDescriptor"
]
}
)
diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py
index f6dddfdd4c..cae099845a 100644
--- a/common/lib/xmodule/xmodule/html_module.py
+++ b/common/lib/xmodule/xmodule/html_module.py
@@ -170,3 +170,25 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor):
elt = etree.Element('html')
elt.set("filename", relname)
return elt
+
+
+class AboutDescriptor(HtmlDescriptor):
+ """
+ These pieces of course content are treated as HtmlModules but we need to overload where the templates are located
+ in order to be able to create new ones
+ """
+ template_dir_name = "about"
+
+class StaticTabDescriptor(HtmlDescriptor):
+ """
+ These pieces of course content are treated as HtmlModules but we need to overload where the templates are located
+ in order to be able to create new ones
+ """
+ template_dir_name = "statictab"
+
+class CourseInfoDescriptor(HtmlDescriptor):
+ """
+ These pieces of course content are treated as HtmlModules but we need to overload where the templates are located
+ in order to be able to create new ones
+ """
+ template_dir_name = "courseinfo"