app/views/shared/index.html.erb in adminpanel-2.1.7 vs app/views/shared/index.html.erb in adminpanel-2.2.0
- old
+ new
@@ -28,19 +28,19 @@
<tbody>
<% collection.each do |member| %>
<tr>
<% @model.display_attributes('index').each do |fields| %>
<% fields.each do |attribute, properties| %>
- <% if properties["type"] == "wysiwyg_field" %>
+ <% if properties['type'] == "wysiwyg_field" %>
<td><%= member.send(attribute).html_safe -%></td>
<% elsif properties['type'] == 'belongs_to' %>
<td>
- <%= parent_object_name(member, properties['model']) %>
+ <%= belong_to_object_name(member, attribute.split('_id').first) %>
</td>
<% elsif properties['type'] == 'boolean' %>
<td><%= member.send(attribute) ? I18n.t('action.is_true') : I18n.t('action.is_false') %></td>
- <% elsif properties["type"] != "adminpanel_file_field" && properties["type"] != "has_many" %>
+ <% elsif properties['type'] != 'adminpanel_file_field' && properties['type'] != 'has_many' %>
<td><%= member.send(attribute) -%></td>
<% end %>
<% end %>
<% end %>
<td>
@@ -49,9 +49,11 @@
<%= render 'shared/edit_icon_button', resource: member %>
<%= render 'shared/delete_icon_button', resource: member %>
<%= render 'shared/fb_icon_button', resource: member %>
+
+ <%= render 'shared/twitter_icon_button', resource: member %>
</td>
</tr>
<% end %>
</tbody>
</table>