Commit 806c8f20 authored by Vincent Michel's avatar Vincent Michel
Browse files

[views] Add safety belt on File icon view

parent 82d8a2fb4b52
......@@ -300,8 +300,12 @@ class BrainomicsResultsFileBox(component.CtxComponent):
w(u'<ul>')
for _file in _files:
title = _file.dc_title().rsplit('/')[-1]
if _file.__regid__ == 'File':
icon = _file.view('icon')
else:
icon = u''
w(u'<li>%s<a href="%s" title="%s">%s</a></li>'
% (_file.view('icon'), _file.absolute_url(vid='download'),
% (icon, _file.absolute_url(vid='download'),
xml_escape(title), xml_escape(title[:15]+'...')))
w(u'</ul>')
w(u'</div>')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment