DISCO-188 publisher link

Add publisher link to settings dropdown if the features setting
is set.
This commit is contained in:
Nicholas D'Alfonso
2019-10-03 14:16:59 -04:00
parent b8a19b7b92
commit 545d5eddc8
3 changed files with 15 additions and 0 deletions

View File

@@ -648,6 +648,12 @@ def course_index(request, course_key):
deprecated_block_names = [block.name for block in deprecated_xblocks()]
deprecated_blocks_info = _deprecated_blocks_info(course_module, deprecated_block_names)
frontend_app_publisher_url = configuration_helpers.get_value_for_org(
course_module.location.org,
'FRONTEND_APP_PUBLISHER_URL',
settings.FEATURES.get('FRONTEND_APP_PUBLISHER_URL', False)
)
return render_to_response('course_outline.html', {
'language_code': request.LANGUAGE_CODE,
'context_course': course_module,
@@ -667,6 +673,7 @@ def course_index(request, course_key):
'action_state_id': current_action.id,
},
) if current_action else None,
'frontend_app_publisher_url': frontend_app_publisher_url,
})

View File

@@ -128,6 +128,9 @@ FEATURES['CERTIFICATES_HTML_VIEW'] = True
########################## AUTHOR PERMISSION #######################
FEATURES['ENABLE_CREATOR_GROUP'] = False
################### FRONTEND APPLICATION PUBLISHER URL ###################
FEATURES['FRONTEND_APP_PUBLISHER_URL'] = 'http://localhost:18400'
################################# DJANGO-REQUIRE ###############################
# Whether to run django-require in debug mode.

View File

@@ -106,6 +106,11 @@
<a href="${certificates_url}">${_("Certificates")}</a>
</li>
% endif
% if frontend_app_publisher_url:
<li class="nav-item nav-course-courseware-videos">
<a href="${frontend_app_publisher_url}/course-runs/${course_key}">${_("Publisher")}</a>
</li>
% endif
</ul>
</div>
</div>