feat: Remove FOOTER_ORGANIZATION_IMAGE django settings depr52 (#32757)

* feat: Remove FOOTER_ORGANIZATION_IMAGE django settings depr52

* feat: Update api.py

* feat: Update api.py

* feat: Update footer.html

* feat: change in logo images path

* feat: Update footer.html

as per Diana's suggestion white space is removed.
This commit is contained in:
Yagnesh1998
2023-07-19 20:24:29 +05:30
committed by GitHub
parent 6825088801
commit 03b189fc7c
7 changed files with 2 additions and 30 deletions

View File

@@ -616,10 +616,6 @@ SOCIAL_SHARING_SETTINGS = {
'DASHBOARD_TWITTER': False
}
# This is just a placeholder image.
# Site operators can customize this with their organization's image.
FOOTER_ORGANIZATION_IMAGE = "images/logo.png"
############################# SET PATH INFORMATION #############################
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/cms
REPO_ROOT = PROJECT_ROOT.dirname()

View File

@@ -303,7 +303,6 @@ FINANCIAL_REPORTS:
BUCKET: null
ROOT_PATH: sandbox
STORAGE_TYPE: localfs
FOOTER_ORGANIZATION_IMAGE: images/logo.png
GITHUB_REPO_ROOT: /edx/var/edxapp/data
GIT_REPO_EXPORT_DIR: /edx/var/edxapp/export_course_repos
GOOGLE_ANALYTICS_ACCOUNT: null

View File

@@ -465,29 +465,18 @@ def _footer_logo_img(is_secure):
"""
default_local_path = 'images/logo.png'
brand_footer_logo_url = settings.LOGO_TRADEMARK_URL
footer_url_from_site_config = configuration_helpers.get_value(
'FOOTER_ORGANIZATION_IMAGE',
settings.FOOTER_ORGANIZATION_IMAGE
)
# `logo_name` is looked up from the configuration,
# which falls back on the Django settings, which loads it from
# `lms.yml`, which is created and managed by Ansible. Because of
# this runaround, we lose a lot of the flexibility that Django's
# staticfiles system provides, and we end up having to hardcode the path
# to the footer logo rather than use the comprehensive theming system.
# EdX needs the FOOTER_ORGANIZATION_IMAGE value to point to edX's
# logo by default, so that it can display properly on edx.org -- both
# within the LMS, and on the Drupal marketing site, which uses this API.
if footer_url_from_site_config:
return _absolute_url_staticfile(is_secure, footer_url_from_site_config)
if brand_footer_logo_url:
return brand_footer_logo_url
log.info(
"Failed to find footer logo at '%s', using '%s' instead",
footer_url_from_site_config,
default_local_path,
)

View File

@@ -159,7 +159,7 @@ class TestFooter(TestCase):
'name': 'reddit', 'icon-class': 'fa-reddit-square', 'title': 'Reddit'}
],
'mobile_links': [],
'logo_image': 'https://edx.org/static/images/logo.png',
'logo_image': '/static/images/logo.png',
'openedx_link': {
'url': 'https://open.edx.org',
'image': 'https://logos.openedx.org/open-edx-logo-tag.png',

View File

@@ -2098,10 +2098,6 @@ FOOTER_OPENEDX_URL = "https://open.edx.org"
# * https://logos.openedx.org/open-edx-logo-tag-dark.png
FOOTER_OPENEDX_LOGO_IMAGE = "https://logos.openedx.org/open-edx-logo-tag.png"
# This is just a placeholder image.
# Site operators can customize this with their organization's image.
FOOTER_ORGANIZATION_IMAGE = "images/logo.png"
# These are referred to both by the Django asset pipeline
# AND by the branding footer API, which needs to decide which
# version of the CSS to serve.

View File

@@ -335,7 +335,6 @@ FINANCIAL_REPORTS:
BUCKET: null
ROOT_PATH: sandbox
STORAGE_TYPE: localfs
FOOTER_ORGANIZATION_IMAGE: images/logo.png
GITHUB_REPO_ROOT: /edx/var/edxapp/data
GIT_REPO_DIR: /edx/var/edxapp/course_repos
GOOGLE_ANALYTICS_ACCOUNT: null

View File

@@ -30,16 +30,13 @@
<a href="/">
## The default logo is a placeholder.
## You can either replace this link entirely or update
## the FOOTER_ORGANIZATION_IMAGE in Django settings.
## If you customize FOOTER_ORGANIZATION_IMAGE, then the image
## can be included in the footer on other sites
## (e.g. a blog or marketing front-end) to provide a consistent
## user experience. See the branding app for details.
<img alt="${_('organization logo')}" src="${footer['logo_image']}">
</a>
</p>
</div>
</div>
## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
<p class="copyright">${footer['copyright']}
% if icp_license_info.get('icp_license'):
@@ -105,14 +102,11 @@
% if context.get('include_language_selector', footer_language_selector_is_enabled()):
<%include file="${static.get_template_path('widgets/footer-language-selector.html')}"/>
% endif
<div class="wrapper-logo">
<p>
<a href="/">
## The default logo is a placeholder.
## You can either replace this link entirely or update
## the FOOTER_ORGANIZATION_IMAGE in Django settings.
## If you customize FOOTER_ORGANIZATION_IMAGE, then the image
## can be included in the footer on other sites
## (e.g. a blog or marketing front-end) to provide a consistent
## user experience. See the branding app for details.
@@ -120,7 +114,6 @@
</a>
</p>
</div>
## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
<p class="copyright">${footer['copyright']}
% if icp_license_info.get('icp_license'):