diff options
author | Jochen Topf <jochen@topf.org> | 2014-09-07 17:15:50 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-09-07 17:15:50 +0200 |
commit | eb33a1a95fb1357e048c159432fbfd0b196befb6 (patch) | |
tree | e1c299a957eabb48f4765330af4600621d654095 /web/public | |
parent | 71edd0277b7effa2b1dc18486a5be78cddf49425 (diff) | |
download | taginfo-eb33a1a95fb1357e048c159432fbfd0b196befb6.tar taginfo-eb33a1a95fb1357e048c159432fbfd0b196befb6.tar.gz |
Remove need for project icon redirect.
Diffstat (limited to 'web/public')
-rw-r--r-- | web/public/js/taginfo.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/public/js/taginfo.js b/web/public/js/taginfo.js index e944aaa..f859c86 100644 --- a/web/public/js/taginfo.js +++ b/web/public/js/taginfo.js @@ -197,8 +197,11 @@ function link_to_rtype(rtype, attr) { ); } -function link_to_project(id, name, attr) { - return img({ src: '/api/4/project/icon?project=' + id, width: 16, height: 16, alt: '' }) + ' ' + link( +function link_to_project(id, name, icon_url, attr) { + if (icon_url === null) { + icon_url = '/img/generic_project_icon.png'; + } + return img({ src: icon_url, width: 16, height: 16, alt: '' }) + ' ' + link( url_for_project(id), html_escape(name), attr |