diff options
Diffstat (limited to 'registry-browser/static/index.html')
-rw-r--r-- | registry-browser/static/index.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/registry-browser/static/index.html b/registry-browser/static/index.html index e0c3a13..0ce7edf 100644 --- a/registry-browser/static/index.html +++ b/registry-browser/static/index.html @@ -93,7 +93,15 @@ $(function() { return; $.each(items, function(i, e) { - e['formatted-tags'] = '<li>' + e['tags'].join('</li><li>') + '</li>'; + // force 'latest' to be the first tag displayed + sorted_tags = e['tags']; + latest_idx = sorted_tags.indexOf('latest'); + if(latest_idx > 0) { + sorted_tags.splice(latest_idx, 1); + sorted_tags.unshift('latest'); + } + + e['formatted-tags'] = '<li>' + sorted_tags.join('</li><li>') + '</li>'; }); options = { |