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
f4250271
Commit
f4250271
authored
Jun 01, 2015
by
Ben McMorran
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8048 from edx/benmcmorran/search-tags
Enable HTML in note tags and support highlighting
parents
0fc3c14d
6d2464a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
lms/djangoapps/edxnotes/helpers.py
+5
-2
lms/static/sass/course/_student-notes.scss
+7
-0
lms/templates/edxnotes/note-item.underscore
+1
-1
No files found.
lms/djangoapps/edxnotes/helpers.py
View file @
f4250271
...
...
@@ -139,11 +139,14 @@ def preprocess_collection(user, course, collection):
cache
=
{}
with
store
.
bulk_operations
(
course
.
id
):
for
model
in
collection
:
model
.
update
(
{
update
=
{
u"text"
:
sanitize_html
(
model
[
"text"
]),
u"quote"
:
sanitize_html
(
model
[
"quote"
]),
u"updated"
:
dateutil_parse
(
model
[
"updated"
]),
})
}
if
"tags"
in
model
:
update
[
u"tags"
]
=
[
sanitize_html
(
tag
)
for
tag
in
model
[
"tags"
]]
model
.
update
(
update
)
usage_id
=
model
[
"usage_id"
]
if
usage_id
in
cache
:
model
.
update
(
cache
[
usage_id
])
...
...
lms/static/sass/course/_student-notes.scss
View file @
f4250271
...
...
@@ -233,6 +233,13 @@ $divider-visual-tertiary: ($baseline/20) solid $gray-l4;
color
:
$m-gray-d2
;
}
// CASE: tag matches a search query
.reference-meta.reference-tags
.note-highlight
{
// needed because .note-highlight is a span, which overrides the color
@extend
%shame-link-text
;
background-color
:
$result-highlight-color-base
;
}
// Put commas between tags.
a
.reference-meta.reference-tags
:after
{
content
:
","
;
...
...
lms/templates/edxnotes/note-item.underscore
View file @
f4250271
...
...
@@ -38,7 +38,7 @@
<% if (tags.length > 0) { %>
<p class="reference-title"><%- gettext("Tags:") %></p>
<% for (var i = 0; i < tags.length; i++) { %>
<a class="reference-meta reference-tags" href="#"><%
-
tags[i] %></a>
<a class="reference-meta reference-tags" href="#"><%
=
tags[i] %></a>
<% } %>
<% } %>
</div>
...
...
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