Sha256: bfc356e144634f31893ff5071c877fb358e9d908fd7ea22e966b16d9cce29993
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
- if defined? site - edit_url = ->(n) { edit_site_newsitem_path( site, n ) } - delete_url = ->(n) { site_newsitem_path( site, n ) } - new_newsitem = new_site_newsitem_path( site.id ) - if defined? city - edit_url = ->(n) { edit_city_newsitem_path( city, n ) } - delete_url = ->(n) { city_newsitem_path( city, n ) } - new_newsitem = new_city_newsitem_path( city.id ) - newsitems = newsitems.page( params[:newsitems_page] ).per( 10 ) .manager-newsitems--index .row .col-sm-12 %h2 Newsitems (#{newsitems.count}) #{link_to '[+]', new_newsitem } = paginate newsitems, :param_name => 'newsitems_page' - newsitems.each do |n| .panel .panel-body %ul %li = link_to '[~]', edit_url.call( n ) = link_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' } Name: #{n.name} Desc: #{n.descr} %li Report id: #{n.report_id} %li Gallery id: #{n.gallery_id} = render 'ish_manager/newsitems/item', :newsitem => n %hr
Version data entries
5 entries across 5 versions & 1 rubygems