Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
bfa625ea
Commit
bfa625ea
authored
Feb 24, 2015
by
Dino Cikatic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SOL-258 Removing preview and content type from search list for sequence type
parent
00899dd9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
4 deletions
+12
-4
common/lib/xmodule/xmodule/seq_module.py
+1
-1
lms/static/js/search/views/search_item_view.js
+2
-1
lms/static/js/spec/search/search_spec.js
+3
-0
lms/templates/courseware/courseware.html
+1
-1
lms/templates/courseware_search/search_item.underscore
+1
-1
lms/templates/courseware_search/search_item_seq.underscore
+4
-0
No files found.
common/lib/xmodule/xmodule/seq_module.py
View file @
bfa625ea
...
...
@@ -204,6 +204,6 @@ class SequenceDescriptor(SequenceFields, MakoModuleDescriptor, XmlDescriptor):
xblock_body
[
"content"
]
.
update
(
html_body
)
else
:
xblock_body
[
"content"
]
=
html_body
xblock_body
[
"content_type"
]
=
self
.
category
.
title
()
xblock_body
[
"content_type"
]
=
"Sequence"
return
xblock_body
lms/static/js/search/views/search_item_view.js
View file @
bfa625ea
...
...
@@ -18,7 +18,8 @@ define([
},
initialize
:
function
()
{
this
.
tpl
=
_
.
template
(
$
(
'#search_item-tpl'
).
html
());
var
template_name
=
(
this
.
model
.
attributes
.
content_type
===
"Sequence"
)
?
'#search_item_seq-tpl'
:
'#search_item-tpl'
;
this
.
tpl
=
_
.
template
(
$
(
template_name
).
html
());
},
render
:
function
()
{
...
...
lms/static/js/spec/search/search_spec.js
View file @
bfa625ea
...
...
@@ -89,6 +89,7 @@ define([
beforeEach
(
function
()
{
TemplateHelpers
.
installTemplate
(
'templates/courseware_search/search_item'
);
TemplateHelpers
.
installTemplate
(
'templates/courseware_search/search_item_seq'
);
this
.
model
=
{
attributes
:
{
location
:
[
'section'
,
'subsection'
,
'unit'
],
...
...
@@ -279,6 +280,7 @@ define([
TemplateHelpers
.
installTemplates
([
'templates/courseware_search/search_item'
,
'templates/courseware_search/search_item_seq'
,
'templates/courseware_search/search_list'
,
'templates/courseware_search/search_loading'
,
'templates/courseware_search/search_error'
...
...
@@ -416,6 +418,7 @@ define([
);
TemplateHelpers
.
installTemplates
([
'templates/courseware_search/search_item'
,
'templates/courseware_search/search_item_seq'
,
'templates/courseware_search/search_list'
,
'templates/courseware_search/search_loading'
,
'templates/courseware_search/search_error'
...
...
lms/templates/courseware/courseware.html
View file @
bfa625ea
...
...
@@ -24,7 +24,7 @@ ${page_title_breadcrumbs(course_name())}
</script>
% endfor
% for template_name in ["search_item", "search_list", "search_loading", "search_error"]:
% for template_name in ["search_item", "search_
item_seq", "search_
list", "search_loading", "search_error"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"courseware_search/${template_name}.underscore"
/>
</script>
...
...
lms/templates/courseware_search/search_item.underscore
View file @
bfa625ea
<div class='sri-excerpt'><%= excerpt %></div>
<span class='sri-type'><%- content_type %></span>
<span class='sri-location'><%- location.join(' ▸ ') %></span>
<a class="sri-link" href="<%- url %>"><%= gettext("View") %> <i class="icon-arrow-right"></i></a>
<a class="sri-link" href="<%- url %>"><%= gettext("View") %> <i class="icon
fa fa
-arrow-right"></i></a>
lms/templates/courseware_search/search_item_seq.underscore
0 → 100644
View file @
bfa625ea
<div class='sri-excerpt'></div>
<span class='sri-type'></span>
<span class='sri-location'><%- location.join(' ▸ ') %></span>
<a class="sri-link" href="<%- url %>"><%= gettext("View") %> <i class="icon fa fa-arrow-right"></i></a>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment