Skip to content

Commit

Permalink
Minor library updates
Browse files Browse the repository at this point in the history
Show library owner in dropdown
  • Loading branch information
shinyichen committed Apr 13, 2021
1 parent b303e70 commit ee1d512
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/js/widgets/libraries_all/templates/library-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<i
class="fa fa-lg fa-unlock"
aria-hidden="true"
title="this library is public"
title="This library is public"
></i>
{{else}}
<i
class="fa fa-lg fa-lock text-light"
aria-hidden="true"
title="this library is private"
title="This library is private"
></i>
{{/if}}
</td>
Expand All @@ -39,13 +39,13 @@
<i
class="fa fa-lg fa-unlock"
aria-hidden="true"
title="this library is public"
title="This library is public"
></i>
{{else}}
<i
class="fa fa-lg fa-lock text-light"
aria-hidden="true"
title="this library is private"
title="This library is private"
></i>
{{/if}}
{{#compare permission 'owner'}}
Expand Down
5 changes: 4 additions & 1 deletion src/js/widgets/library_actions/widget.jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ define([
data,
(acc, d) => {
if (/^(owner|admin|write)$/i.test(d.permission)) {
acc.push(_.pick(d, ['id', 'name']));
const lib = _.pick(d, ['id', 'name']);
if (d.permission !== 'owner')
lib.name = `${lib.name} (${d.owner})`;
acc.push(lib);
}
return acc;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ <h5>Date Last Modified:</h5>
<i
class="fa fa-lg fa-unlock"
aria-hidden="true"
title="this library is public"
title="This library is public"
></i>
{{else}}
<i
class="fa fa-lg fa-lock text-light"
aria-hidden="true"
title="this library is private"
title="This library is private"
></i>
{{/if}}
{{#compare permission 'owner'}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3>
<i
class="fa fa-lg fa-unlock text-success"
title="this library is public"
title="This library is public"
></i>
ADS Public Library
</h3>
Expand Down

0 comments on commit ee1d512

Please sign in to comment.