Skip to content

Commit

Permalink
Add tooltip with number of nametags.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Dec 6, 2017
1 parent 2db85b3 commit 79465fd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/galaxy/scripts/mvc/history/history-item-li.js
@@ -1,15 +1,17 @@
function _labelIfName(tag) {
if (tag.indexOf("name:") == 0) {
if (tag.indexOf("name:") === 0) {
return `<span class="label label-info">${_.escape(tag.slice(5))}</span>`;
} else {
return "";
}
}

function nametagTemplate(historyItem) {
return `<div class="nametags">${_.sortBy(_.uniq(historyItem.tags))
.map(_labelIfName)
.join("")}</span>`;
let nametags = _.sortBy(_.uniq(historyItem.tags)).map(_labelIfName);
return `
<div class="nametags" title="${nametags.length} nametags">
${nametags.join("")}
</div>`;
}

export default {
Expand Down

0 comments on commit 79465fd

Please sign in to comment.