<%
  text = resource.send(name)
  if name =~ /_id$/
    if resource.class.respond_to?(:reflect_on_association)
      # FIXME what if association was set with :foreign_key option
      rel_name = name.sub(/_id$/, '').to_sym
      if resource.class.reflect_on_association(rel_name)
        text = resource_to_text(resource.send(rel_name))
      end
    end
  elsif name =~ /(thumbnail|image|photo|picture|avatar|logo|icon)_uid$/
    unless resource.send(name).blank?
      text = image_tag resource.send(name.sub(/_uid$/, '')).thumb('x16').url, :alt => ''
    else
      text = ""
    end
  elsif text.is_a? TrueClass or text.is_a? FalseClass
    text = t(text ? 'yes' : 'no', :scope => 'admin.global')
  end
%>
<td>
  <a class="main" href="<%= url_for( :action => :edit, :id => resource.id ) %>"><span><%= text %></span></a>
</td>

<%
  text = resource.send(name)
  if name =~ /_id$/
    if resource.class.respond_to?(:reflect_on_association)
      # FIXME what if association was set with :foreign_key option
      rel_name = name.sub(/_id$/, '').to_sym
      if resource.class.reflect_on_association(rel_name)
        text = resource_to_text(resource.send(rel_name))
      end
    end
  elsif name =~ /(thumbnail|image|photo|picture|avatar|logo|icon)_uid$/
    unless resource.send(name).blank?
      text = image_tag resource.send(name.sub(/_uid$/, '')).thumb('x16').url, :alt => ''
    else
      text = ""
    end
  elsif text.is_a? TrueClass or text.is_a? FalseClass
    text = t(text ? 'yes' : 'no', :scope => 'admin.global')
  end
%>
<td>
  <% if @features[:edit] %>
  <a class="main" href="<%= url_for( :action => :edit, :id => resource.id ) %>"><span><%= text %></span></a>
  <% else %>
  <span><%= text %></span>
  <% end %>
</td>

Add href only if :edit feature is available
Add href only if :edit feature is available
