From eb33a1a95fb1357e048c159432fbfd0b196befb6 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 7 Sep 2014 17:15:50 +0200 Subject: Remove need for project icon redirect. --- web/public/js/taginfo.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'web/public') 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 -- cgit v1.2.3