This is easy to accomplish by creating a custom template for a cell.  In your 
table, instead of providing a data field for the column, provide a method name, 
have that method load a custom HTML template.

Here is an example of this without an image of this method: 
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/tables.py#L653

But adding an <img> in the HTML template works fine.

David

From: Dave Johnston [mailto:dave.johns...@owmobility.com] 
Sent: Thursday, March 20, 2014 9:20 AM
To: openstack-dev@lists.openstack.org
Subject: [openstack-dev] Display images/icon in Horizon Tables

​Hi,

I'm creating a custom panel for horizon.  I have developed a table that 
displays some information, and I would like to add a 'icon' to each row.  
Ideally, I want to be able to specify the URL of a remote image, and have it 
displayed using the <img> tag.

Can this be acheived with filters, or some other mechanism ?


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to