Nicolae Claudius
13 years ago
5 changed files with 38 additions and 5 deletions
@ -0,0 +1,23 @@
|
||||
<%# meaningful names for empty columns instead tiny dash "-" %> |
||||
|
||||
<% columns.each do |column| %> |
||||
<% authorized = record.authorized_for?(:crud_type => :read, :column => column.name) -%> |
||||
<% column_value = authorized ? get_column_value(record, column) : active_scaffold_config.list.empty_field_text -%> |
||||
|
||||
<% if column.name == :name %> |
||||
<td class="<%= column_class(column, column_value, record) %>" > |
||||
<% column_value = 'Manage All Records (0)' if column_value == '-' %> |
||||
<%= if authorized |
||||
link = render_list_column(column_value, column, record) |
||||
link_to link, "http://#{link}" |
||||
else |
||||
column_value |
||||
end %> |
||||
</td> |
||||
<% else %> |
||||
<td class="<%= column_class(column, column_value, record) %>" > |
||||
<%= authorized ? render_list_column(column_value, column, record) : column_value %> |
||||
</td> |
||||
<% end %> |
||||
|
||||
<% end -%> |
Loading…
Reference in new issue