Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
3a8d0297
Unverified
Commit
3a8d0297
authored
4 years ago
by
morenol
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add uses_pattern_library property to EdxFragmentView (#24027)
parent
37d92fa5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/plugin_api/views.py
+10
-1
10 additions, 1 deletion
openedx/core/djangoapps/plugin_api/views.py
with
10 additions
and
1 deletion
openedx/core/djangoapps/plugin_api/views.py
+
10
−
1
View file @
3a8d0297
...
...
@@ -21,6 +21,7 @@ class EdxFragmentView(FragmentView):
The base class of all Open edX fragment views.
"""
page_title
=
None
_uses_pattern_library
=
True
@staticmethod
def
get_css_dependencies
(
group
):
...
...
@@ -84,7 +85,8 @@ class EdxFragmentView(FragmentView):
Creates the base context for rendering a fragment as a standalone page.
"""
return
{
'
uses_pattern_library
'
:
True
,
'
uses_pattern_library
'
:
self
.
uses_pattern_library
,
'
uses_bootstrap
'
:
not
self
.
uses_pattern_library
,
'
disable_accordion
'
:
True
,
'
allow_iframing
'
:
True
,
'
disable_header
'
:
True
,
...
...
@@ -140,3 +142,10 @@ class EdxFragmentView(FragmentView):
template
=
'
fragments/standalone-page-v1.html
'
return
render_to_response
(
template
,
context
)
@property
def
uses_pattern_library
(
self
):
"""
Returns true if this fragment is rendered with edx-pattern-library.
"""
return
self
.
_uses_pattern_library
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment