{#
	SfsAdminBundle - Symfony2 project
	(c) Ramine AGOUNE <ramine.agoune@solidlynx.com>
#}

<td>
	{% if field.relation is defined and field.relation %}
		{% set relatedObject = admin_get_property(object, key) %}
		<a target="_blank" href="{{ admin_url('read', {'object': relatedObject}) }}">
			{{ relatedObject }}
		</a>
	{% else %}
		{{ admin_get_property(object, key) }}
	{% endif %}
</td>

{#
	SfsAdminBundle - Symfony2 project
	(c) Ramine AGOUNE <ramine.agoune@solidlynx.com>
#}

<td>
	{% if field.relation is defined and field.relation %}
		{% set value = admin_get_property(object, key) %}
		{% if field.relation is same as(true) %}
			{% set relatedObject = admin_get_property(object, key) %}
		{% else %}
			{% set relatedObject = admin_get_property(object, field.relation) %}
		{% endif %}

		{% if admin_has_action('read') %}
			<a target="_blank" href="{{ admin_url('read', {'object': relatedObject}) }}">
				{{ value }}
			</a>
		{% elseif admin_has_action('update') %}
			<a target="_blank" href="{{ admin_url('update', {'object': relatedObject}) }}">
				{{ value }}
			</a>
		{% else %}
			{{ admin_get_property(object, key) }}
		{% endif %}
	{% else %}
		{{ admin_get_property(object, key) }}
	{% endif %}
</td>

Fix relational links in listView when the given key is a property of the related element
Fix relational links in listView when the given key is a property of the related element
