Sha256: 236601cc32156c0fa818d444e4042a52e4e50c6ada69cd9b1c0746b756592bdb

Contents?: true

Size: 1.53 KB

Versions: 2

Compression:

Stored size: 1.53 KB

Contents

<%
  output = {
    :sEcho => params[:sEcho],
    :iTotalRecords => @roles.total_entries || 0,
    :iTotalDisplayRecords => @roles.size,
    :aaData => @roles.collect do |role|
      link_id = "role_#{role.id}"
      klass = role.active? ? 'see-on' : 'see-off'
      [
        content_tag(:div, '<div class="image">&nbsp;<span class="small-icons role-ico">&nbsp;</span></div>'.html_safe, :id => link_id, :class => role.administrators.count > 0 ? 'some-variants plus' : ''),
        content_tag(:div, link_to(role.name, [forgeos_core, :edit, :admin, role]), :class => 'role-name') +
          content_tag(:p,role.administrators.all.collect{ |admin| link_to("#{admin.firstname} #{admin.lastname}", [forgeos_core, :admin, admin]) }.join('<br />').html_safe, :style=>'display:none'),
        role.administrators.count,
        role.created_at.to_s(:short),
        link_to('', [forgeos_core, :activate ,:admin, role],
          :remote => true,
          :method => :post,
          :class => "small-icons #{klass}",
          :id => "show_#{link_id}"
        ),
        #link_to('', [:duplicate, :admin, role], :class => 'small-icons duplicate-link') +
        link_to('', [forgeos_core, :edit, :admin, role], :class => 'small-icons edit-link') +
        link_to('', [forgeos_core, :admin, role],
          :remote => true,
          :method => :delete,
          :confirm => I18n.t('role.destroy.confirm').capitalize,
          :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_core-1.9.4 app/views/admin/roles/index.json.erb
forgeos_core-1.9.3 app/views/admin/roles/index.json.erb