Sha256: 826a9d53c74ef2d4db5724f204bcd45fdea2b16bfd695c1ff0275150dbaeb904

Contents?: true

Size: 1.76 KB

Versions: 2

Compression:

Stored size: 1.76 KB

Contents

<% title_attribute = (title = attributes.detect { |a| a.type.to_s == "string" }).present? ? title.name : 'title' -%>
<li class='clearfix record <%%= cycle("on", "on-hover") %>' id="<%%= dom_id(<%= singular_name %>) -%>">
  <span class='title'>
    <%%= <%= singular_name %>.<%= title_attribute %> %>
<% if localized? %>
    <%% if Answers::I18n.frontend_locales.many? %>
      <span class='preview'>
        <%% <%= singular_name %>.translations.each do |translation| %>
          <%% if translation.<%= title_attribute %>.present? %>
            <%%= link_to answers_icon_tag("flags/#{translation.locale}.png", :size => '16x11'),
                         answers.edit_<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>, :switch_locale => translation.locale),
                         :class => 'locale' %>
          <%% end %>
        <%% end %>
      </span>
    <%% end %>
<% end %>
  </span>
  <span class='actions'>
    <% unless skip_frontend? %>
    <%%= link_to answers_icon_tag("application_go.png"), answers.<%= namespacing.underscore %>_<%= singular_name %>_path(<%= singular_name %>),
        :title => t('.view_live_html'),
        :target => "_blank" %>
    <% end %>
    <%%= link_to answers_icon_tag("application_edit.png"), answers.edit_<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>),
         :title => t('.edit') %>
    <%%= link_to answers_icon_tag("delete.png"), answers.<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>),
        :class => "cancel confirm-delete",
        :title => t('.delete'),
        :data => {:confirm => t('message', :scope => 'answers.admin.delete', :title => <%= singular_name %>.<%= title_attribute %>)},
        :method => :delete %>
  </span>
</li>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
answers-core-0.0.0.2 lib/generators/answers/engine/templates/app/views/answers/namespace/admin/plural_name/_singular_name.html.erb
answers-core-0.0.0 lib/generators/answers/engine/templates/app/views/answers/namespace/admin/plural_name/_singular_name.html.erb