Sha256: 306e222d1131077e52c55514e612c1aed6e51b028d0af3bf5d67997777c26b2c

Contents?: true

Size: 1.34 KB

Versions: 2

Compression:

Stored size: 1.34 KB

Contents

<%
  output = {
    :sEcho => params[:sEcho],
    :iTotalRecords => @blocks.total_entries || 0,
    :iTotalDisplayRecords => @blocks.size,
    :aaData => @blocks.collect do |block|
      link_id = "block_#{block.id}"
      nb_pages = block.page_cols.count
      [
        content_tag(:div, '<div class="image">&nbsp;<span class="small-icons block">&nbsp;</span></div>', :id => link_id, :class => 'some-variants plus'),
        content_tag(:div, link_to(block.title, [forgeos_cms, :edit, :admin, block]), :class => 'page-name'),

        content_tag(:span,"#{nb_pages.to_s} #{I18n.t('page', :count => nb_pages)}", :class=>'linked_to') +
        render(:partial => 'admin/blocks/pages.html.haml', :locals => { :link_id => link_id, :block => block }),

        link_to('', forgeos_cms.duplicate_admin_static_content_block_path(block), :class => 'small-icons duplicate-link') +
        link_to('', [forgeos_cms, :edit, :admin, block], :class => 'small-icons edit-link') +
        link_to('', [forgeos_cms, :admin, block],
          :remote => true,
          :method => :delete,
          :confirm => I18n.t('static_content_block.destroy.confirm').capitalize,
          :success => "removedataTablesRow('#destroy_#{link_id}')",
          :class => 'small-icons destroy-link',
          :id => "destroy_#{link_id}"
        )
      ]
    end
  }
-%>
<%= raw output.to_json -%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_cms-1.9.4 app/views/admin/static_content_blocks/index.json.erb
forgeos_cms-1.9.2 app/views/admin/static_content_blocks/index.json.erb