Sha256: 7f61780678934992822ab343a1d3693e9131ba465ac87e4dde610f861e234821

Contents?: true

Size: 821 Bytes

Versions: 11

Compression:

Stored size: 821 Bytes

Contents

<div class="picture-usage-info resource_info">
  <h3>
    <%= I18n.t(:image_used_in_this_models, scope: :alchemy_custom_model) %>
  </h3>
  <div id="pictures_page_list">
    <% used_in = Alchemy::Custom::Model::PictureUsedBy.used_by(@picture.id)%>
    <% if used_in.any? %>
      <ul>
        <% used_in.each do |m| %>
          <li>
            <% begin %>
              <h3>
                <%= render_icon 'file-alt' %>              
                <p><%= link_to "#{m.model_name.human}, #{m.try(:slug).to_s}", main_app.edit_polymorphic_path([:admin, m]) %></p>
              </h3>
            <% rescue %>
            <% end %>
          </li>
        <% end %>
      </ul>
    <% else %>
      <%= render_message do %>
        <%= Alchemy.t(:picture_not_in_use_yet) %>
      <% end %>
    <% end %>
  </div>
</div>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alchemy-custom-model-3.2 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.1.5 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.1.4 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.1.3 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.1.2 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.1.1 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.1.0 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-2.2.2 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-3.0.0 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-2.2.1 app/views/alchemy/admin/pictures/_custom_model_info.html.erb
alchemy-custom-model-2.2.0 app/views/alchemy/admin/pictures/_custom_model_info.html.erb