app/views/shared/show.html.erb in adminpanel-1.2.12 vs app/views/shared/show.html.erb in adminpanel-2.0.0
- old
+ new
@@ -1,20 +1,20 @@
<% provide(:page_title, t("action.view") + " #{@model.display_name.capitalize}") -%>
<% breadcrumb_add(
- @model.display_name.capitalize.pluralize,
+ @model.display_name.capitalize.pluralize(I18n.default_locale),
{
:controller => params[:controller],
:action => "index"
}
) %>
<div class="row-fluid">
<div class="widget span6">
<div class="widget-header">
- <%= content_tag(:i, nil, :class => @model.icon) %>
+ <%= content_tag(:i, nil, class: "fa fa-#{@model.icon}") %>
<h5><%= @model.display_name.humanize %>
- <%= link_to content_tag(:i, nil, :class => 'icon-pencil'), [:edit, resource], :title => t("action.update") + " #{@model.display_name}" %>
+ <%= render 'shared/edit_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| %>
@@ -57,13 +57,13 @@
<% if @model.has_images? %>
<div class="widget widget-padding span6">
<div class="widget-header">
<%= content_tag(:i, nil, :class => @model.icon) %>
<h5><%= I18n.t("Gallery") %>: <%= @model.display_name.humanize %>
- <%= link_to content_tag(:i, nil, :class => 'icon-pencil'), [:edit, resource], :title => t("action.update") + " #{@model.display_name}" %>
+ <%= render 'shared/edit_icon_button', resource: resource, resource_name: @model.display_name %>
</h5>
</div>
- <% if @model.act_as_a_gallery?.nil? %>
+ <% if @model.gallery_children.nil? %>
<div class="widget-body row-fluid">
<div id="gallery-container" class="js-masonry"
data-masonry-options='{ "columnWidth": 3, "itemSelector": ".gallery-item" }'>
<% resource.send(@model.get_image_relationship).each do |image|%>
<div class="gallery-item">