Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Newspapers Platform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labs-team
Newspapers Platform
Commits
e12e3222
Commit
e12e3222
authored
2 years ago
by
smayer
Browse files
Options
Downloads
Patches
Plain Diff
Update dataset views for including text content of articles and compound articles
parent
2ba47b8a
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Merging development into onb as preparation for Annolyzer release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/views/dataset/_document.html.erb
+8
-10
8 additions, 10 deletions
app/views/dataset/_document.html.erb
app/views/dataset/_documents.html.erb
+1
-1
1 addition, 1 deletion
app/views/dataset/_documents.html.erb
with
9 additions
and
11 deletions
app/views/dataset/_document.html.erb
+
8
−
10
View file @
e12e3222
...
...
@@ -3,15 +3,13 @@
data-action=
"click->dataset#toggleResultSelection"
data-doc-id=
"
<%=
doc
.
id
%>
"
>
<h5>
<%
if
doc
.
is_a?
(
Article
)
url
=
"/catalog/
#{
doc
.
issue_id
}
?selected=
#{
doc
.
id
}
"
<%
if
doc
.
is_a?
(
Article
)
url
=
"/catalog/
#{
doc
.
issue_id
}
?selected=
#{
doc
.
id
}
"
elsif
doc
.
is_a?
(
CompoundArticle
)
url
=
"/catalog/
#{
doc
.
issue_id
}
?selected_compound=
#{
doc
.
id
}
"
url
=
"/catalog/
#{
doc
.
issue_id
}
?selected_compound=
#{
doc
.
id
}
"
else
url
=
"/catalog/
#{
doc
.
id
}
"
end
%>
url
=
"/catalog/
#{
doc
.
id
}
"
end
%>
<a
href=
"
<%=
url
%>
"
>
<span
class=
"doc_index"
>
<%=
doc_index
%>
.
</span>
<%=
doc
.
is_a?
(
Article
)
?
doc
.
id
:
doc
.
title
%>
...
...
@@ -30,9 +28,9 @@
</div>
<div
class=
"col-4"
>
<%
if
!
highlight
.
nil?
and
!
highlight
.
first
.
nil?
%>
<%
highlight
.
first
[
1
].
each
do
|
extract
|
%>
<p>
...
<%=
extract
.
gsub
(
/\n/
,
'
<br/>
'
).
gsub
(
'
<br/><br/>
'
,
'
<br/>
'
).
html_safe
%>
...
</p>
<%
end
%>
<%
#
highlight.first[1].each do |extract| %>
<p>
<%=
highlight
unless
doc
.
is_a?
(
Issue
)
%>
<%
#
= extract.gsub(/\n/,
"
<br/>
"
).gsub(
"
<br/><br/>
", "
<br/>
"
).html_safe %>
</p>
<%
#
end %>
<%
end
%>
</div>
<div
class=
"col-4"
>
...
...
This diff is collapsed.
Click to expand it.
app/views/dataset/_documents.html.erb
+
1
−
1
View file @
e12e3222
<div
class=
"list-group list-group-flush w-100"
>
<%
docs
.
each_with_index
do
|
doc
,
idx
|
%>
<%# Highlight will be used when searching into a dataset %>
<%=
render
partial:
"document"
,
locals:
{
doc:
doc
,
highlight:
nil
,
doc_index:
(
pagenum
-
1
)
*
rows
+
idx
+
1
}
%>
<%=
render
partial:
"document"
,
locals:
{
doc:
doc
,
highlight:
doc
.
all_text
,
doc_index:
(
pagenum
-
1
)
*
rows
+
idx
+
1
}
%>
<hr/>
<%
end
%>
</div>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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