Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
bea81b1e
Commit
bea81b1e
authored
11 years ago
by
gnaegi
Browse files
Options
Downloads
Patches
Plain Diff
OO-759 fix display of uploader instead of author configured in file metadata
parent
cc8ea713
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/commons/modules/bc/components/ListRenderer.java
+9
-4
9 additions, 4 deletions
...olat/core/commons/modules/bc/components/ListRenderer.java
with
9 additions
and
4 deletions
src/main/java/org/olat/core/commons/modules/bc/components/ListRenderer.java
+
9
−
4
View file @
bea81b1e
...
...
@@ -290,7 +290,7 @@ public class ListRenderer {
//file metadata as tooltip
if
(
metaInfo
!=
null
)
{
sb
.
append
(
"<div id='o_sel_doc_tooltip_"
).
append
(
pos
).
append
(
"' class='b_ext_tooltip_wrapper
b_briefcase_meta
' style='display:none;'>"
);
sb
.
append
(
"<div id='o_sel_doc_tooltip_"
).
append
(
pos
).
append
(
"' class='b_ext_tooltip_wrapper' style='display:none;'>
<div class=\"b_briefcase_meta\">
"
);
if
(
StringHelper
.
containsNonWhitespace
(
metaInfo
.
getTitle
()))
{
sb
.
append
(
"<h5>"
).
append
(
Formatter
.
escapeDoubleQuotes
(
metaInfo
.
getTitle
())).
append
(
"</h5>"
);
}
...
...
@@ -303,15 +303,20 @@ public class ListRenderer {
sb
.
append
(
"); background-repeat:no-repeat; background-position:50% 50%;'> </div>"
);
}
String
author
=
metaInfo
.
getAuthor
();
if
(
StringHelper
.
containsNonWhitespace
(
author
))
{
// first try author info from metadata (creator)
String
author
=
metaInfo
.
getCreator
();
// fallback use file author (uploader)
if
(!
StringHelper
.
containsNonWhitespace
(
author
))
{
author
=
metaInfo
.
getAuthor
();
if
(!
"-"
.
equals
(
author
))
{
author
=
UserManager
.
getInstance
().
getUserDisplayName
(
author
);
}
}
if
(
StringHelper
.
containsNonWhitespace
(
author
))
{
sb
.
append
(
"<p>"
).
append
(
Formatter
.
escapeDoubleQuotes
(
translator
.
translate
(
"mf.author"
)));
sb
.
append
(
": "
).
append
(
Formatter
.
escapeDoubleQuotes
(
author
)).
append
(
"</p>"
);
}
sb
.
append
(
"</div>"
)
sb
.
append
(
"</div>
</div>
"
)
.
append
(
"<script type='text/javascript'>"
)
.
append
(
"/* <![CDATA[ */"
)
.
append
(
"jQuery(function() {"
)
...
...
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