app/views/shared/show.html.erb in adminpanel-2.1.7 vs app/views/shared/show.html.erb in adminpanel-2.2.0
- old
+ new
@@ -9,29 +9,33 @@
<div class="row-fluid">
<div class="widget span6">
<div class="widget-header">
<%= content_tag(:i, nil, class: "fa fa-#{@model.icon}") %>
- <h5><%= @model.display_name.humanize %>
+ <h5>
+ <%= @model.display_name.humanize %>
+
<%= render 'shared/edit_icon_button', resource: resource, resource_name: @model.display_name %>
<%= render 'shared/fb_icon_button', resource: resource, resource_name: @model.display_name %>
+
+ <%= render 'shared/twitter_icon_button', resource: resource, resource_name: @model.display_name %>
</h5>
</div>
<div class="widget-body">
<div class="widget-tickets widget-tickets-large clearfix"><ul>
<% @model.display_attributes('show').each do |fields| %>
<% fields.each do |attribute, properties| %>
<% if properties["type"] != "adminpanel_file_field" %>
<li class="priority-high">
<div class="span3">
- <h6><%= properties["label"] %></h6>
+ <h6><%= properties['label'] %></h6>
</div>
<div class="span8">
<% if properties['type'] == 'wysiwyg_field' %>
<%= resource.send(attribute).html_safe -%>
<% elsif properties['type'] == 'belongs_to' %>
- <%= parent_object_name(resource, properties['model']) %>
+ <%= belong_to_object_name(resource, attribute.split('_id').first) %>
<% elsif properties['type'] == 'has_many' %>
<ul>
<% resource.send("#{pluralize_model(properties['model'])}").each do |member| %>
<li class="priority-low"><%= member.name %></li>