Sha256: c68cb978abbdab735b1a1e35eb86bba97a4afe2893151fd24365b3a196d2058e

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

<%
  output = {
    :iTotalDisplayRecords => @actualities.total_entries || 0,
    :aaData => @actualities.collect do |actuality|
      link_id = "actuality_#{actuality.id}"
      picture = actuality.picture.public_filename(:thumb) if actuality.picture
      klass = actuality.active? ? 'see-on' : 'see-off'
      author = actuality.administrator.lastname if actuality.administrator
      [
        content_tag(:div, tag(:div, :class=>'handler') + image_tag(picture || 'forgeos/admin/no-image.png'), :id => link_id, :class => 'handler_container'),
        content_tag(:div, actuality.date),
        content_tag(:div, link_to(actuality.title, [forgeos_cms, :admin, actuality]), :class => 'actuality-name'),
        content_tag(:div, author || 'not found'),
        link_to('', :url => forgeos_cms.activate_admin_actuality_path(actuality),
         :remote => true,
         :complete => "toggleActivate('#show_#{link_id}')",
         :html => {
           :class => "small-icons #{klass}",
           :id => "show_#{link_id}"
        }),
        link_to('', [forgeos_cms, :edit, :admin, actuality], :class => 'small-icons edit-link') +
        link_to('', :url => [forgeos_cms, :admin, actuality],
          :remote => true,
          :method => :delete,
          :confirm => t('actuality.destroy.confirm').capitalize,
          :success => "removedataTablesRow('#destroy_#{link_id}')",
          :html => {
            :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
          })
      ]
    end
  }
-%>
<%= raw output.to_json -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgeos_cms-1.9.0 app/views/admin/actualities/index.json.erb